/* ================================================
   GameAgent Platform — Obsidian & Amber
   Premium dark tech, crisp geometry, warm accent
   ================================================ */

:root {
    /* Glass tokens */
    --glass-bg: rgba(20, 24, 35, 0.6);
    --glass-bg-hover: rgba(28, 33, 48, 0.65);
    --glass-bg-strong: rgba(34, 40, 58, 0.75);
    --glass-blur: 20px;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-strong: rgba(255, 255, 255, 0.14);
    --glass-highlight: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 50%);

    /* Surfaces (solid fallback) */
    --bg-canvas: #07090f;
    --bg-surface: rgba(20, 24, 35, 0.6);
    --bg-elevated: rgba(28, 33, 48, 0.65);
    --bg-hover: rgba(40, 47, 68, 0.5);
    --bg-inset: rgba(12, 14, 22, 0.6);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Accent — Indigo Purple */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-text: #a5b4fc;

    /* Secondary — Purple */
    --purple: #a855f7;
    --purple-soft: rgba(168, 85, 247, 0.15);

    /* Neon — Cyan */
    --neon: #22d3ee;
    --neon-soft: rgba(34, 211, 238, 0.15);

    /* Gold — for prices */
    --gold: #fbbf24;
    --gold-soft: rgba(251, 191, 36, 0.15);

    /* Status */
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: #475569;

    /* Radius — clean geometry */
    --r-1: 4px;
    --r-2: 6px;
    --r-3: 10px;
    --r-4: 12px;
    --r-5: 16px;
    --r-6: 20px;

    /* Shadows — layered for glass depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.5);

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #07090f;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    font-feature-settings: "kern", "liga", "clamp";
    letter-spacing: 0.01em;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(99, 102, 241, 0.25), transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(168, 85, 247, 0.2), transparent 50%),
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(6, 182, 212, 0.15), transparent 50%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 40%, transparent 100%);
    pointer-events: none;
}

a { color: var(--accent-text); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: #fff; }

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    border-radius: var(--r-3);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    color: #fff;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-outline {
    background: transparent;
    color: var(--accent-text);
    border-color: var(--accent);
}
.btn-outline:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.btn-neon {
    background: transparent;
    color: var(--neon);
    border-color: rgba(34, 211, 238, 0.4);
}
.btn-neon:hover:not(:disabled) {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.btn-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1104;
    border-color: transparent;
}
.btn-gold:hover:not(:disabled) {
    background: linear-gradient(135deg, #fcd34d, #fbbf24);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
}

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-2); }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: var(--r-4); }
.btn-block { width: 100%; }

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 15, 0.75);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px var(--space-6);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.header-logo:hover { color: var(--text-primary); }
.header-logo i {
    width: 34px;
    height: 34px;
    border-radius: var(--r-2);
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.header-search {
    flex: 1;
    max-width: 420px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-4);
    padding: 0 var(--space-4);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.header-search:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.header-search i { color: var(--text-muted); font-size: 13px; }
.header-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 0;
    height: 100%;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    font-size: 13px;
    transition: color 0.15s;
}
.header-search button:hover { color: var(--accent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.agent-chip {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 3px 12px 3px 3px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
}
.agent-chip img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}
.agent-chip span {
    color: var(--text-primary);
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== GATE ===== */
.search-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
}

.gate-card {
    width: 100%;
    max-width: 460px;
    background: rgba(15, 18, 28, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: var(--space-9) var(--space-8);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.gate-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #06b6d4);
    border-radius: 25px;
    z-index: -1;
    opacity: 0.3;
    animation: gateGlow 4s ease-in-out infinite alternate;
}

@keyframes gateGlow {
    from { opacity: 0.2; }
    to { opacity: 0.5; }
}

.gate-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-6);
    border-radius: var(--r-4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #a5b4fc;
}

.gate-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 var(--space-3);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gate-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 var(--space-7);
    line-height: 1.6;
}

.gate-subtitle strong {
    color: var(--accent-hover);
    font-weight: 700;
}

.gate-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0 var(--space-4);
    height: 52px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    margin-bottom: var(--space-2);
}
.gate-search:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.gate-search i { color: var(--text-muted); font-size: 14px; }
.gate-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    height: 100%;
    min-width: 0;
}
.gate-search input::placeholder { color: var(--text-faint); }
.gate-search .btn { height: 40px; flex-shrink: 0; }

.gate-error {
    margin-top: var(--space-2);
    color: var(--danger);
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}

.gate-actions {
    margin-top: var(--space-7);
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* ===== CAROUSEL ===== */
.carousel-wrap {
    margin: var(--space-7) 0 var(--space-8);
}

.carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
    background: #0f1420;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
    min-height: 360px;
    background: #0f1420;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f1420;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-7) var(--space-8) var(--space-9);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    z-index: 2;
}
.carousel-caption h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 var(--space-3);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.carousel-caption p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 520px;
    line-height: 1.6;
    margin: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: var(--r-4);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    z-index: 5;
}
.carousel-btn:hover {
    background: rgba(99, 102, 241, 0.6);
    border-color: transparent;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}
.carousel-btn.prev { left: var(--space-5); }
.carousel-btn.next { right: var(--space-5); }

.carousel-dots {
    position: absolute;
    bottom: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, width 0.3s;
}
.carousel-dot.active {
    background: #fff;
    width: 28px;
}

/* ===== SECTIONS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.01em;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    border-radius: 2px;
}

/* ===== CATEGORIES ===== */
.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
}

.chip {
    padding: 8px 18px;
    border-radius: var(--r-3);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--glass-border-strong);
    text-decoration: none;
}
.chip.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2));
    border-color: rgba(99, 102, 241, 0.5);
    color: #e0e7ff;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    gap: var(--space-5);
    padding-bottom: var(--space-9);
}

.game-card {
    background: rgba(20, 24, 35, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--r-5);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.35s cubic-bezier(.2,.8,.2,1), transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s cubic-bezier(.2,.8,.2,1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0), rgba(168, 85, 247, 0));
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.15);
}

.game-card:hover::after { opacity: 1; }

.game-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-canvas);
}
.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-canvas);
    transition: transform 0.4s ease;
}
.game-card:hover .game-thumb img {
    transform: scale(1.05);
}

.game-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
    background: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--r-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.game-body {
    padding: var(--space-4) var(--space-5) var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-cat {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-1);
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-2);
    align-self: flex-start;
}

.game-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.game-price {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.game-price .cur {
    font-size: 14px;
    font-weight: 600;
    margin-right: 1px;
}

.game-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #818cf8;
    font-size: 13px;
    font-weight: 600;
    transition: gap 0.15s, color 0.15s;
}
.card:hover .game-cta {
    gap: 8px;
    color: #a5b4fc;
}
.game-cta i { transition: transform 0.15s; }

.game-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}
.game-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
    min-width: 0;
}

/* ===== EMPTY / LOADING ===== */
.empty-state,
.loading-state {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: var(--text-muted);
    grid-column: 1 / -1;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: var(--space-4);
    opacity: 0.4;
}
.loading-state .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto var(--space-3);
}
.loading-state p,
.empty-state p { font-size: 14px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FOOTER ===== */
.site-footer {
    background: rgba(15, 18, 28, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--space-9) 0 var(--space-6);
    margin-top: var(--space-9);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    text-align: center;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}
.footer-logo i { color: #818cf8; font-size: 18px; }
.footer-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-3);
}
.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-subtle);
}

/* ===== MODAL ===== */
.modal,
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
}
.modal.show,
.modal-overlay.show { display: flex; }

.modal-content {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-6);
    box-shadow: var(--shadow-xl);
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    border-radius: var(--r-6) var(--r-6) 0 0;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: var(--space-7) var(--space-7) 0;
    text-align: center;
    position: relative;
}
.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 32px;
    height: 32px;
    border-radius: var(--r-2);
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 24px;
}
.modal-icon.success { background: var(--success-soft); color: var(--success); }
.modal-icon.error { background: var(--danger-soft); color: var(--danger); }
.modal-icon.warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.modal-title { font-size: 20px; font-weight: 700; margin: 0; color: var(--text-primary); }
.modal-body { padding: var(--space-5) var(--space-7); }
.modal-text { color: var(--text-secondary); font-size: 14px; line-height: 1.6; text-align: center; margin: 0; }
.modal-footer { padding: 0 var(--space-7) var(--space-7); display: flex; gap: var(--space-3); }
.modal-footer .btn { flex: 1; }

/* ===== FORMS ===== */
.form-group { margin-bottom: var(--space-5); }
.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}
.form-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-4);
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    outline: none;
}
.form-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder { color: var(--text-muted); }

.error-text {
    color: var(--danger);
    font-size: 13px;
    margin-top: var(--space-2);
    min-height: 18px;
    display: block;
}

/* ===== DETAIL PAGE ===== */
.detail-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-6);
    overflow: hidden;
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    z-index: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    padding: var(--space-7);
}

.detail-gallery { display: flex; flex-direction: column; gap: var(--space-4); }

.detail-main-img {
    max-width: 100%;
    width: fit-content;
    margin: 0 auto;
    border-radius: var(--r-5);
    overflow: hidden;
    background: var(--bg-canvas);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-main-img img { max-width: 100%; max-height: 600px; object-fit: contain; background: var(--bg-canvas); display: block; }

.detail-thumbs { display: flex; gap: var(--space-3); }
.detail-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--r-3);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: border-color 0.15s;
    background: var(--bg-canvas);
}
.detail-thumb.active,
.detail-thumb:hover { border-color: var(--accent); }
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-canvas); }

.detail-info { display: flex; flex-direction: column; justify-content: center; }

.detail-cat {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 4px 12px;
    border-radius: var(--r-2);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-4);
    align-self: flex-start;
}

.detail-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.detail-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 var(--space-7);
}

.detail-meta {
    display: flex;
    gap: var(--space-7);
    margin-bottom: var(--space-7);
    padding: var(--space-5);
    background: rgba(20, 24, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--r-5);
}

.detail-meta-item { display: flex; flex-direction: column; }
.detail-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-1);
}
.detail-meta-value {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-content {
    background: rgba(20, 24, 35, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--r-6);
    padding: var(--space-8);
    margin-bottom: var(--space-9);
    position: relative;
}

.detail-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.detail-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 var(--space-5);
    color: var(--text-primary);
}
.detail-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0 0 var(--space-4);
}
.detail-content img,
.detail-content video {
    max-width: 100%;
    height: auto;
    margin: var(--space-5) auto;
    border-radius: var(--r-4);
    display: block;
}

/* ===== AGENT INFO ===== */
.agent-info-block {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-5);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-3);
}
.agent-info-block:last-child { margin-bottom: 0; }
.agent-info-block-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-3);
}
.agent-info-line {
    display: flex;
    align-items: flex-start;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-3);
}
.agent-info-line:last-child { border-bottom: none; }
.agent-info-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 96px;
    flex-shrink: 0;
    font-size: 13px;
}
.agent-info-val {
    flex: 1;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    word-break: break-all;
    font-size: 13px;
}
.agent-info-val a { color: var(--neon); word-break: break-all; }

.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 9px;
    border-radius: var(--r-1);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    font-family: inherit;
}
.copy-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.price-tag {
    color: var(--accent);
    font-weight: 700;
}

/* ===== MOBILE BAR ===== */
.mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 18, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 90;
    padding: 10px var(--space-4);
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    gap: var(--space-3);
}
.mobile-bar .btn { flex: 1; padding: 10px; font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .detail-grid { grid-template-columns: 1fr; gap: var(--space-6); padding: var(--space-6); }
    .detail-name { font-size: 26px; }
    .carousel-caption h3 { font-size: 30px; }
    .carousel-slide { padding: var(--space-6); }
}

@media (max-width: 768px) {
    /* Glass degradation for mobile performance */
    .site-header,
    .gate-card,
    .game-card,
    .carousel,
    .detail-hero,
    .detail-content,
    .site-footer {
        backdrop-filter: blur(16px) saturate(150%);
        -webkit-backdrop-filter: blur(16px) saturate(150%);
    }

    .container { padding: 0 var(--space-4); }
    .header-inner { padding: 12px var(--space-4); gap: var(--space-3); flex-wrap: wrap; }
    .header-logo { font-size: 14px; }
    .header-logo i { width: 30px; height: 30px; font-size: 13px; }
    .header-search { order: 3; width: 100%; max-width: none; height: 34px; }
    .agent-chip span { display: none; }
    .search-gate { padding: var(--space-4); }
    .gate-card { padding: var(--space-7) var(--space-5); }
    .gate-title { font-size: 22px; }
    .gate-search { height: 46px; }
    .carousel-wrap { margin: var(--space-5) 0 var(--space-6); }
    .carousel-slide { min-height: 240px; }
    .carousel-caption { padding: var(--space-5) var(--space-5) var(--space-7); }
    .carousel-caption h3 { font-size: 22px; }
    .carousel-caption p { font-size: 13px; }
    .carousel-btn { width: 36px; height: 36px; }
    .carousel-btn.prev { left: var(--space-3); }
    .carousel-btn.next { right: var(--space-3); }
    .chip { padding: 6px 14px; font-size: 12px; }
    .section-title { font-size: 17px; margin-bottom: var(--space-4); }
    .game-body { padding: var(--space-4); }
    .game-name { font-size: 14px; }
    .game-desc { font-size: 12px; -webkit-line-clamp: 1; }
    .game-price { font-size: 17px; }
    .detail-hero { border-radius: var(--r-5); }
    .detail-grid { padding: var(--space-5); }
    .detail-name { font-size: 22px; }
    .detail-meta { padding: var(--space-4); gap: var(--space-5); }
    .detail-meta-value { font-size: 20px; }
    .detail-content { padding: var(--space-5); }
    .modal-content { margin: var(--space-2); }
    .modal-header, .modal-body, .modal-footer { padding-left: var(--space-5); padding-right: var(--space-5); }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; gap: var(--space-4); }
    .game-actions { flex-direction: column; }
    .game-actions .btn { width: 100%; }
    .detail-thumbs { flex-wrap: wrap; }
    .mobile-bar { display: flex; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-canvas); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
