﻿/* ==========================================
   Terddv Game Portal - Shared Styles
   Bright & Friendly Theme
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gd-bg: #f3f5fa;
    --gd-bg-white: #ffffff;
    --gd-bg-soft: #eef1f8;
    --gd-bg-hover: #e8ecf5;
    --gd-surface: #f8f9fc;
    --gd-primary: #4a7cf7;
    --gd-primary-light: rgba(74, 124, 247, 0.1);
    --gd-primary-soft: #dce6fd;
    --gd-coral: #ff6b6b;
    --gd-coral-light: rgba(255, 107, 107, 0.1);
    --gd-green: #38c95d;
    --gd-green-light: rgba(56, 201, 93, 0.1);
    --gd-amber: #f5a623;
    --gd-amber-light: rgba(245, 166, 35, 0.1);
    --gd-purple: #8b5cf6;
    --gd-purple-light: rgba(139, 92, 246, 0.1);
    --gd-teal: #14b8a6;
    --gd-text: #1e293b;
    --gd-text-mid: #475569;
    --gd-text-soft: #94a3b8;
    --gd-border: #e2e8f0;
    --gd-border-light: #f1f5f9;
    --gd-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --gd-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --gd-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --gd-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --gd-radius: 12px;
    --gd-radius-sm: 8px;
    --gd-radius-lg: 16px;
    --gd-radius-xl: 20px;
    --gd-radius-full: 9999px;
    --gd-ease: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --gd-max-w: 1300px;
    --gd-header-h: 62px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    color: var(--gd-text);
    background: var(--gd-bg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--gd-ease);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Layout Container ---- */
.gd-container {
    width: 100%;
    max-width: var(--gd-max-w);
    margin: 0 auto;
    padding: 0 24px;
    overflow: hidden;
}

/* ---- Header & Nav ---- */
.gd-header {
    width: 100%;
    background: var(--gd-bg-white);
    border-bottom: 1px solid var(--gd-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--gd-shadow-sm);
}

.gd-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--gd-header-h);
    max-width: var(--gd-max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.gd-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gd-nav-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

.gd-nav-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gd-text);
    letter-spacing: -0.5px;
}

.gd-nav-title span {
    color: var(--gd-primary);
}

.gd-nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: var(--gd-bg-soft);
    border-radius: var(--gd-radius-sm);
}

.gd-nav-toggle-icon {
    width: 18px;
    height: 2px;
    background: var(--gd-text);
    position: relative;
    transition: var(--gd-ease);
}

.gd-nav-toggle-icon::before,
.gd-nav-toggle-icon::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--gd-text);
    left: 0;
    transition: var(--gd-ease);
}

.gd-nav-toggle-icon::before { top: -6px; }
.gd-nav-toggle-icon::after { top: 6px; }

.gd-nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.gd-nav-link {
    display: block;
    padding: 7px 14px;
    color: var(--gd-text-mid);
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: var(--gd-radius-sm);
    transition: var(--gd-ease);
    white-space: nowrap;
}

.gd-nav-link:hover,
.gd-nav-link.is-active {
    color: var(--gd-primary);
    background: var(--gd-primary-light);
}

/* ---- Main Area ---- */
.gd-main {
    padding: 24px 0 50px;
    min-height: calc(100vh - var(--gd-header-h) - 180px);
}

.gd-section {
    margin-bottom: 36px;
}

.gd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gd-border-light);
}

.gd-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gd-text);
    position: relative;
}

.gd-section-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--gd-primary);
    border-radius: 2px;
}

.gd-section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gd-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: var(--gd-radius-full);
    background: var(--gd-primary-light);
    transition: var(--gd-ease);
}

.gd-section-more:hover {
    background: var(--gd-primary-soft);
}

/* ---- Game Grid ---- */
.gd-game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.gd-game-grid--compact {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* ---- Game Card ---- */
.gd-game-card {
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius);
    overflow: hidden;
    transition: var(--gd-ease);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gd-border);
    position: relative;
}

.gd-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gd-shadow-md);
    border-color: var(--gd-primary-soft);
}

.gd-game-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--gd-bg-soft);
}

.gd-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gd-game-card:hover .gd-game-thumb img {
    transform: scale(1.06);
}

.gd-game-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 3;
}

.gd-tag-boys { background: var(--gd-primary); }
.gd-tag-girls { background: var(--gd-coral); }
.gd-tag-puzzle { background: var(--gd-green); }
.gd-tag-sports { background: var(--gd-coral); }
.gd-tag-strategy { background: var(--gd-amber); }
.gd-tag-casual { background: var(--gd-purple); }
.gd-tag-action { background: #ef4444; }
.gd-tag-adventure { background: var(--gd-teal); }
.gd-tag-popular { background: linear-gradient(135deg, var(--gd-primary), var(--gd-purple)); }
.gd-tag-best { background: linear-gradient(135deg, var(--gd-amber), var(--gd-coral)); }
.gd-tag-beauty { background: linear-gradient(135deg, var(--gd-coral), var(--gd-purple)); }

.gd-game-mark {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--gd-amber);
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

.gd-game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.gd-game-card:hover::after { opacity: 1; }

.gd-game-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--gd-bg-white);
    position: relative;
    z-index: 3;
}

.gd-game-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.2em;
    color: var(--gd-text);
}

.gd-game-desc {
    color: var(--gd-text-soft);
    font-size: 0.7rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gd-game-card--cover .gd-game-body { display: none; }
.gd-game-card--cover .gd-game-thumb { aspect-ratio: 4 / 5; }
.gd-game-card--compact { border-radius: var(--gd-radius-sm); }
.gd-game-card--compact .gd-game-thumb { aspect-ratio: 3 / 4; }
.gd-game-card--compact .gd-game-name {
    font-size: 0.75rem;
    min-height: auto;
    -webkit-line-clamp: 1;
}

/* ---- Channel Page Header ---- */
.gd-channel-header,
.gd-channel-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 28px;
    background: linear-gradient(135deg, var(--gd-primary) 0%, var(--gd-purple) 100%);
    border-radius: var(--gd-radius-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.gd-channel-banner::before,
.gd-channel-header::before {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.gd-channel-icon-lg {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.gd-channel-info { z-index: 1; color: #fff; }
.gd-channel-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 3px; color: #fff; }
.gd-channel-count { font-size: 0.86rem; opacity: 0.92; color: #fff; }

.gd-game-count {
    color: var(--gd-text-soft);
    font-size: 0.84rem;
    margin-bottom: 16px;
}

.gd-game-count strong { color: var(--gd-primary); font-weight: 700; }

/* ---- Breadcrumb ---- */
.gd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--gd-text-soft);
    flex-wrap: wrap;
}

.gd-breadcrumb a {
    color: var(--gd-primary);
    text-decoration: none;
    transition: var(--gd-ease);
}

.gd-breadcrumb a:hover { color: var(--gd-purple); }

.gd-breadcrumb-sep {
    color: var(--gd-border);
    font-size: 0.7rem;
}

/* ---- Game Detail Page ---- */
.gd-game-detail {
    padding: 8px 0 20px;
}

.gd-game-detail-main {
    display: flex;
    gap: 24px;
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--gd-border);
    box-shadow: var(--gd-shadow);
}

.gd-game-detail-cover {
    width: 220px;
    flex-shrink: 0;
    border-radius: var(--gd-radius);
    overflow: hidden;
    box-shadow: var(--gd-shadow);
}

.gd-game-detail-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.gd-game-detail-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.gd-game-detail-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gd-text);
    margin-bottom: 10px;
    line-height: 1.3;
}

.gd-game-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.gd-tag {
    display: inline-block;
    background: var(--gd-primary-light);
    color: var(--gd-primary);
    padding: 4px 12px;
    border-radius: var(--gd-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.gd-tag--date {
    background: var(--gd-green-light);
    color: var(--gd-green);
}

.gd-game-detail-desc {
    color: var(--gd-text-mid);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.gd-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--gd-primary), var(--gd-purple));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--gd-radius-full);
    transition: var(--gd-ease);
    width: fit-content;
    box-shadow: 0 4px 14px rgba(74, 124, 247, 0.3);
}

.gd-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 124, 247, 0.4);
}

/* ---- Detail Quick Info Bar ---- */
.gd-detail-info-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gd-detail-info-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gd-bg-white);
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius);
    font-size: 0.82rem;
    color: var(--gd-text-mid);
    box-shadow: var(--gd-shadow-sm);
    flex: 1;
    min-width: 140px;
}

.gd-detail-info-chip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.gd-detail-info-chip strong {
    color: var(--gd-text);
    font-weight: 600;
}

/* ---- Detail Content Sections ---- */
.gd-detail-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.gd-detail-section-card {
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius);
    padding: 22px;
    border: 1px solid var(--gd-border);
    box-shadow: var(--gd-shadow-sm);
}

.gd-detail-section-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gd-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-detail-section-card h3 span {
    font-size: 1.1rem;
}

.gd-detail-section-card p {
    color: var(--gd-text-mid);
    font-size: 0.86rem;
    line-height: 1.75;
}

/* ---- Detail Related Games ---- */
.gd-detail-related {
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius-lg);
    padding: 22px;
    border: 1px solid var(--gd-border);
    box-shadow: var(--gd-shadow-sm);
    margin-bottom: 24px;
}

.gd-detail-related-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gd-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-detail-related-title span { font-size: 1.1rem; }

/* ---- Content Sections ---- */
.gd-game-section {
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius);
    padding: 26px;
    margin-bottom: 20px;
    border: 1px solid var(--gd-border);
    box-shadow: var(--gd-shadow-sm);
}

.gd-game-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gd-text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gd-border-light);
    position: relative;
}

.gd-game-section-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gd-primary);
}

.gd-game-section-content {
    color: var(--gd-text);
    font-size: 0.9rem;
    line-height: 1.8;
}

.gd-game-section-content p { margin-bottom: 12px; }

.gd-game-section-content ul,
.gd-game-section-content ol {
    padding-left: 22px;
    margin-bottom: 12px;
}

.gd-game-section-content li { margin-bottom: 6px; list-style: disc; }
.gd-game-section-content ol li { list-style: decimal; }
.gd-game-section-content strong { color: var(--gd-primary); }

/* ---- Article / Legal Pages ---- */
.gd-article {
    max-width: 840px;
    margin: 0 auto;
    background: var(--gd-bg-white);
    border-radius: var(--gd-radius);
    padding: 34px;
    border: 1px solid var(--gd-border);
    box-shadow: var(--gd-shadow);
}

.gd-article h1 {
    font-size: 1.6rem;
    color: var(--gd-text);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gd-border-light);
    font-weight: 800;
}

.gd-article h1::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gd-primary);
    margin-top: -2px;
    border-radius: 2px;
}

.gd-article h2 {
    font-size: 1.15rem;
    color: var(--gd-text);
    margin: 26px 0 10px;
    padding-left: 14px;
    border-left: 3px solid var(--gd-primary);
    font-weight: 700;
}

.gd-article h3 {
    font-size: 1rem;
    color: var(--gd-text);
    margin: 18px 0 8px;
    font-weight: 600;
}

.gd-article p {
    color: var(--gd-text-mid);
    font-size: 0.9rem;
    line-height: 1.85;
    margin-bottom: 12px;
}

.gd-article ul, .gd-article ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.gd-article li {
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 6px;
    list-style: disc;
    color: var(--gd-text-mid);
}

.gd-article ol li { list-style: decimal; }
.gd-article a { color: var(--gd-primary); text-decoration: underline; }
.gd-article a:hover { color: var(--gd-purple); }
.gd-article strong { color: var(--gd-text); }

.gd-article-date {
    color: var(--gd-text-soft);
    font-size: 0.82rem;
    margin-bottom: 18px;
}

.gd-contact-email {
    display: inline-block;
    background: var(--gd-primary-light);
    color: var(--gd-primary);
    padding: 7px 16px;
    border-radius: var(--gd-radius-sm);
    font-weight: 600;
    margin: 6px 0 12px;
    border: 1px dashed var(--gd-primary-soft);
    font-size: 0.88rem;
}

/* FAQ Accordion */
.gd-faq-item {
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
    transition: var(--gd-ease);
    background: var(--gd-bg-white);
}

.gd-faq-item:hover { border-color: var(--gd-primary-soft); }

.gd-faq-question {
    width: 100%;
    padding: 15px 20px;
    background: var(--gd-surface);
    color: var(--gd-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--gd-ease);
}

.gd-faq-question:hover { background: var(--gd-bg-soft); }

.gd-faq-question::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--gd-primary);
    transition: transform 0.3s;
    font-weight: 300;
}

.gd-faq-item.is-open .gd-faq-question::after { transform: rotate(45deg); }

.gd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.gd-faq-item.is-open .gd-faq-answer { max-height: 600px; }

.gd-faq-answer-inner {
    padding: 16px 20px;
    color: var(--gd-text-mid);
    font-size: 0.88rem;
    line-height: 1.8;
    background: var(--gd-bg-white);
}

/* ---- Footer ---- */
.gd-footer {
    background: var(--gd-bg-white);
    color: var(--gd-text-mid);
    padding: 44px 0 22px;
    margin-top: 50px;
    border-top: 1px solid var(--gd-border);
}

.gd-footer-inner {
    max-width: var(--gd-max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.gd-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.gd-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gd-footer-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gd-text);
    font-size: 1.2rem;
    font-weight: 800;
}

.gd-footer-brand-name img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.gd-footer-brand-desc {
    color: var(--gd-text-soft);
    font-size: 0.84rem;
    line-height: 1.7;
}

.gd-footer-col-title {
    color: var(--gd-text);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.gd-footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.gd-footer-links a {
    color: var(--gd-text-soft);
    font-size: 0.82rem;
    transition: var(--gd-ease);
}

.gd-footer-links a:hover {
    color: var(--gd-primary);
    padding-left: 4px;
}

.gd-footer-bottom {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid var(--gd-border);
    color: var(--gd-text-soft);
    font-size: 0.78rem;
    line-height: 1.7;
}

.gd-footer-bottom a { color: var(--gd-text-mid); }
.gd-footer-bottom a:hover { color: var(--gd-primary); }

/* ---- 404 Error Page ---- */
.gd-error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 20px;
    min-height: 55vh;
}

.gd-error-code {
    font-size: 6.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gd-primary), var(--gd-coral), var(--gd-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 14px;
}

.gd-error-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gd-text);
    margin-bottom: 10px;
}

.gd-error-desc {
    color: var(--gd-text-mid);
    font-size: 0.92rem;
    margin-bottom: 28px;
    max-width: 460px;
}

.gd-error-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: linear-gradient(135deg, var(--gd-primary), var(--gd-purple));
    color: #fff;
    font-weight: 600;
    border-radius: var(--gd-radius-full);
    transition: var(--gd-ease);
    font-size: 0.9rem;
}

.gd-error-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 124, 247, 0.35);
}

/* ---- Back to Top ---- */
.gd-back-top {
    position: fixed;
    right: 22px;
    bottom: 70px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

.gd-back-top.is-visible { display: flex; }

.gd-back-btn {
    width: 42px;
    height: 42px;
    background: var(--gd-bg-white);
    border: 1px solid var(--gd-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--gd-ease);
    box-shadow: var(--gd-shadow);
}

.gd-back-btn:hover {
    background: var(--gd-primary-light);
    border-color: var(--gd-primary-soft);
    transform: translateY(-2px);
}

.gd-back-btn img {
    width: 20px;
    height: 20px;
}

/* ---- Iframe Play Page ---- */
.gd-iframe-wrap {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
}

.gd-iframe-back {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gd-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: var(--gd-ease);
    box-shadow: var(--gd-shadow);
}

.gd-iframe-back:hover {
    background: var(--gd-primary-light);
    border-color: var(--gd-primary-soft);
}

.gd-iframe-back img { width: 22px; height: 22px; }

.gd-game-iframe {
    display: block;
    width: 100%;
    height: 100vh;
    border: 0;
    overflow: hidden;
}

/* ---- Animations ---- */
@keyframes gd-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.gd-fade-in { animation: gd-fade-in 0.4s ease-out; }

/* ---- Utility ---- */
.gd-text-center { text-align: center; }
.gd-mt-2 { margin-top: 16px; }
.gd-mb-2 { margin-bottom: 16px; }

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
    .gd-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .gd-game-detail-main {
        flex-direction: column;
        align-items: center;
    }

    .gd-game-detail-cover {
        width: 180px;
    }

    .gd-detail-sections {
        grid-template-columns: 1fr;
    }

    .gd-detail-info-bar {
        flex-wrap: wrap;
    }

    .gd-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 640px) {
    :root {
        --gd-header-h: 54px;
    }

    .gd-container { padding: 0 14px; }
    .gd-navbar { padding: 0 14px; }
    .gd-nav-title { font-size: 1.15rem; }
    .gd-nav-logo { width: 32px; height: 32px; }

    .gd-nav-toggle { display: flex; }

    .gd-nav-menu {
        display: none;
        position: absolute;
        top: var(--gd-header-h);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--gd-bg-white);
        border-bottom: 1px solid var(--gd-border);
        padding: 6px 0;
        box-shadow: var(--gd-shadow);
    }

    .gd-nav-menu.is-open { display: flex; }

    .gd-nav-link {
        color: var(--gd-text-mid);
        padding: 11px 20px;
        border-radius: 0;
        font-size: 0.9rem;
    }

    .gd-game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gd-game-grid--compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .gd-game-body { padding: 8px 10px 10px; }
    .gd-game-name { font-size: 0.74rem; min-height: 2em; }
    .gd-game-desc { display: none; }
    .gd-game-tag { font-size: 0.58rem; padding: 2px 6px; }

    .gd-section-header { margin-bottom: 12px; padding-bottom: 8px; }
    .gd-section-title { font-size: 1rem; }
    .gd-section-more { font-size: 0.72rem; padding: 4px 10px; }

    .gd-game-detail-main {
        flex-direction: column;
        align-items: center;
        padding: 16px;
        gap: 16px;
    }

    .gd-game-detail-cover {
        width: 160px;
    }

    .gd-game-detail-cover img { aspect-ratio: 3 / 4; }
    .gd-game-detail-meta { align-items: center; text-align: center; }
    .gd-game-detail-title { font-size: 1.15rem; margin-bottom: 8px; }
    .gd-game-detail-tags { justify-content: center; margin-bottom: 10px; }
    .gd-game-detail-desc { font-size: 0.85rem; line-height: 1.65; margin-bottom: 14px; }
    .gd-play-btn { width: 100%; max-width: none; padding: 12px 28px; font-size: 0.9rem; }

    .gd-detail-info-bar { gap: 8px; flex-wrap: wrap; }
    .gd-detail-info-chip { padding: 8px 12px; font-size: 0.78rem; min-width: 0; flex: 1 1 45%; }
    .gd-detail-sections { grid-template-columns: 1fr; gap: 12px; }
    .gd-detail-section-card { padding: 16px; }
    .gd-detail-related { padding: 16px; }

    .gd-breadcrumb {
        font-size: 0.74rem;
        gap: 6px;
        padding: 10px 0;
        margin-bottom: 12px;
    }

    .gd-footer-brand-desc { font-size: 0.8rem; }
    .gd-footer-col-title { font-size: 0.76rem; }

    .gd-article { padding: 18px; }
    .gd-article h1 { font-size: 1.25rem; }
    .gd-article h2 { font-size: 1rem; }
    .gd-article p { font-size: 0.85rem; line-height: 1.7; }
    .gd-article li { font-size: 0.85rem; }

    .gd-section { margin-bottom: 24px; }
    .gd-footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .gd-error-code { font-size: 4rem; }
    .gd-error-title { font-size: 1.1rem; }
    .gd-back-top { right: 14px; bottom: 60px; }
    .gd-back-btn { width: 38px; height: 38px; }
    .gd-back-btn img { width: 18px; height: 18px; }

    .gd-game-detail-desc,
    .gd-article p,
    .gd-article li {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* ---- Very Small Screens ---- */
@media (max-width: 380px) {
    .gd-container { padding: 0 10px; }
    .gd-footer-grid { grid-template-columns: 1fr; gap: 18px; }
    .gd-bubble-nav { gap: 6px; }
    .gd-bubble-icon { width: 38px; height: 38px; font-size: 1rem; }
    .gd-bubble-label { font-size: 0.6rem; }
    .gd-spotlight-name { font-size: 1rem; }
    .gd-carousel-card { flex: 0 0 125px; }
    .gd-game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gd-detail-info-chip { flex: 1 1 100%; }
}
