/* ============================================================
   fkeng.top Design System — my.css  v2 "Neon Arcade"
   Design: Dark Immersive · Neon Glow · Retro-Futuristic · Arcade Feel
   ============================================================ */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* ── Core Palette ──────────────────────────────────────── */
  --c-void:           #080c14;
  --c-abyss:          #0c1426;
  --c-midnight:       #111d38;
  --c-ocean:          #152544;
  --c-slate:          #1c3052;
  --c-steel:          #253d66;

  /* Neon Accent Colors */
  --c-neon-mint:      #83ffe7;
  --c-neon-mint-dim:  #4dcfad;
  --c-neon-cyan:      #00e5ff;
  --c-neon-cyan-dim:  #009fcc;
  --c-neon-pink:      #ff2d95;
  --c-neon-pink-dim:  #cc1a6e;
  --c-neon-gold:      #ffd54f;
  --c-neon-lime:      #76ff03;

  /* Text */
  --c-text:           #e8eaf0;
  --c-text-dim:       #b0b8cc;
  --c-text-muted:     #6e7894;

  /* Borders & Shadows */
  --c-border:         rgba(131,255,231,0.10);
  --c-border-bright:  rgba(131,255,231,0.22);
  --c-border-card:    rgba(255,255,255,0.06);
  --shadow-card:      0 4px 32px rgba(0,0,0,0.55);
  --shadow-glow-mint: 0 0 18px rgba(131,255,231,0.18), 0 0 4px rgba(131,255,231,0.08);
  --shadow-glow-cyan: 0 0 18px rgba(0,229,255,0.18), 0 0 4px rgba(0,229,255,0.08);
  --shadow-btn:       0 4px 14px rgba(131,255,231,0.12);
  --shadow-nav:       0 2px 32px rgba(0,0,0,0.6);

  /* Border Radius */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 999px;

  /* Sizing */
  --navbar-h:     68px;
  --catbar-h:     52px;
  --total-top:    calc(var(--navbar-h) + var(--catbar-h));

  /* Typography */
  --font-display:  'Torus', 'Impact', 'Arial Black', sans-serif;
  --font-body:     'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:    all 0.22s var(--ease-out-expo);
  --transition-fast: all 0.12s var(--ease-out-expo);
}

/* ── Global Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-void);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Background Texture — Grid + Glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(131,255,231,0.015) 2px,
      rgba(131,255,231,0.015) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(131,255,231,0.015) 2px,
      rgba(131,255,231,0.015) 4px
    ),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(131,255,231,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0,229,255,0.03) 0%, transparent 70%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
::selection {
  background: rgba(131,255,231,0.25);
  color: #fff;
}

/* ── Scrollbar Styling ──────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--c-abyss); }
::-webkit-scrollbar-thumb {
  background: var(--c-steel);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-neon-mint-dim); }

/* ═══════════════════════════════════════════════════════════
   Animation Keyframes
═══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(131,255,231,0.15); }
  50%      { box-shadow: 0 0 20px rgba(131,255,231,0.3); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   PC Navbar
═══════════════════════════════════════════════════════════ */
.fg-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--c-border);
  transition: var(--transition);
}

.fg-navbar--scrolled {
  background: rgba(8,12,20,0.95);
  box-shadow: var(--shadow-nav);
  border-bottom-color: var(--c-border-bright);
}

.fg-navbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--navbar-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.fg-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  transition: var(--transition);
}
.fg-logo:hover { transform: scale(1.03); }
.fg-logo:hover .fg-logo__icon svg {
  filter: drop-shadow(0 0 14px rgba(131,255,231,0.6));
}
.fg-logo__icon svg {
  filter: drop-shadow(0 0 10px rgba(131,255,231,0.4));
  transition: filter 0.3s;
}
.fg-logo__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--c-neon-mint);
  letter-spacing: -0.3px;
  text-shadow: 0 0 16px rgba(131,255,231,0.3);
  white-space: nowrap;
}

/* Search Trigger Button */
.fg-search {
  flex: 1;
  max-width: 480px;
}
.fg-search__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 18px;
  background: var(--c-midnight);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  color: var(--c-text-muted);
  font-size: 14px;
  transition: var(--transition);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.3);
}
.fg-search__trigger:hover {
  background: var(--c-ocean);
  border-color: var(--c-neon-mint);
  color: var(--c-text);
  box-shadow: var(--shadow-glow-mint), inset 0 1px 4px rgba(0,0,0,0.2);
}
.fg-search__trigger svg {
  fill: var(--c-text-muted);
  flex-shrink: 0;
  transition: fill 0.2s;
}
.fg-search__trigger:hover svg { fill: var(--c-neon-mint); }

/* Navigation Buttons */
.fg-navbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.fg-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--c-text-muted);
  transition: var(--transition);
  fill: currentColor;
}
.fg-nav-btn svg { fill: currentColor; }
.fg-nav-btn:hover,
.fg-nav-btn--active {
  background: rgba(131,255,231,0.08);
  border-color: rgba(131,255,231,0.2);
  color: var(--c-neon-mint);
  box-shadow: 0 0 12px rgba(131,255,231,0.08);
}

/* ── Category Navigation Bar ────────────────────────────── */
/* ═══ Category Navigation — Neon Arcade Pills ═══ */
.fg-category-nav {
  position: sticky;
  top: var(--navbar-h);
  z-index: 900;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(131,255,231,0.08);
  height: var(--catbar-h);
  overflow: hidden;
}
.fg-category-nav::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(131,255,231,0.15) 20%, rgba(0,229,255,0.15) 50%, rgba(131,255,231,0.15) 80%, transparent);
}
.fg-category-nav__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fg-category-nav__inner::-webkit-scrollbar { display: none; }

.fg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-dim);
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(131,255,231,0.06);
  background: rgba(131,255,231,0.02);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.fg-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(131,255,231,0.08) 0%, rgba(0,229,255,0.04) 100%);
  opacity: 0;
  transition: opacity 0.25s;
}
.fg-pill:hover {
  color: var(--c-neon-mint);
  border-color: rgba(131,255,231,0.25);
  background: rgba(131,255,231,0.08);
  box-shadow: 0 0 16px rgba(131,255,231,0.08), inset 0 1px 0 rgba(131,255,231,0.08);
  transform: translateY(-1px);
}
.fg-pill:hover::before { opacity: 1; }
.fg-pill:active { transform: translateY(0) scale(0.97); }
.fg-pill--active,
.fg-pill[aria-current] {
  color: var(--c-abyss);
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 100%);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(131,255,231,0.3), 0 2px 8px rgba(0,0,0,0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════════
    Hero Section (Homepage Banner)
═══════════════════════════════════════════════════════════ */
/* ═══ Hero — Immersive Arcade Banner ═══ */
.fg-hero {
  position: relative;
  padding: 64px 24px 56px;
  margin-bottom: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% 20%, rgba(0,229,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 50%, rgba(255,45,149,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(131,255,231,0.04) 0%, transparent 60%),
    linear-gradient(180deg, rgba(13,20,38,0.8) 0%, rgba(8,12,20,0.4) 50%, rgba(8,12,20,0) 100%);
}
.fg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(131,255,231,0.008) 2px, rgba(131,255,231,0.008) 4px);
  pointer-events: none;
}
.fg-hero__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.fg-hero__text h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.fg-hero__text h1 .fg-hero__accent {
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 50%, #ff2d95 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(131,255,231,0.5));
  animation: heroShimmer 4s ease-in-out infinite;
}
@keyframes heroShimmer {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(131,255,231,0.5)); }
  50% { filter: drop-shadow(0 0 32px rgba(0,229,255,0.7)); }
}
.fg-hero__text p {
  font-size: 17px;
  color: var(--c-text-dim);
  margin: 0 0 24px;
  max-width: 480px;
  line-height: 1.6;
}
.fg-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(131,255,231,0.06);
  border: 1px solid rgba(131,255,231,0.15);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-neon-mint);
  backdrop-filter: blur(8px);
}
.fg-hero__badge svg { fill: var(--c-neon-mint); animation: fireFlicker 1.5s ease-in-out infinite; }
@keyframes fireFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.fg-hero__visual { flex-shrink: 0; position: relative; }
.fg-hero__visual::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(131,255,231,0.1), rgba(0,229,255,0.05), rgba(255,45,149,0.05));
  filter: blur(20px);
  z-index: -1;
}
.fg-hero__visual-inner {
  width: 130px;
  height: 130px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(131,255,231,0.15) 0%, rgba(0,229,255,0.08) 50%, rgba(255,45,149,0.05) 100%);
  border: 1.5px solid rgba(131,255,231,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  animation: glowPulse 3s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(131,255,231,0.1), inset 0 0 30px rgba(131,255,231,0.04);
}

/* ═══════════════════════════════════════════════════════════
   Main Layout (Content + Sidebar)
═══════════════════════════════════════════════════════════ */
.fg-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  gap: 28px;
}
.fg-content { flex: 1; min-width: 0; }

/* ═══ Sidebar — Neon Glass Panel ═══ */
.fg-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--total-top) + 24px);
  align-self: flex-start;
  max-height: calc(100vh - var(--total-top) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(131,255,231,0.15) transparent;
}
.fg-sidebar::-webkit-scrollbar { width: 4px; }
.fg-sidebar::-webkit-scrollbar-thumb { background: rgba(131,255,231,0.15); border-radius: 4px; }

.fg-sidebar__section {
  background: linear-gradient(180deg, rgba(21,28,52,0.8) 0%, rgba(16,22,42,0.7) 100%);
  border: 1px solid rgba(131,255,231,0.08);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.fg-sidebar__section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(131,255,231,0.2), transparent);
}
.fg-sidebar__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--c-neon-mint);
  margin: 0 0 16px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fg-sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.fg-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-text-dim);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
}
.fg-sidebar__link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(131,255,231,0.3);
  flex-shrink: 0;
  transition: all 0.25s;
}
.fg-sidebar__link:hover {
  background: rgba(131,255,231,0.06);
  color: var(--c-neon-mint);
  padding-left: 18px;
}
.fg-sidebar__link:hover::before {
  background: var(--c-neon-mint);
  box-shadow: 0 0 8px rgba(131,255,231,0.5);
}
.fg-sidebar__link--active {
  background: linear-gradient(90deg, rgba(131,255,231,0.08) 0%, rgba(131,255,231,0.03) 100%);
  color: var(--c-neon-mint);
  font-weight: 700;
  border: 1px solid rgba(131,255,231,0.12);
}
.fg-sidebar__link--active::before {
  background: var(--c-neon-mint);
  box-shadow: 0 0 12px rgba(131,255,231,0.6);
  width: 8px;
  height: 8px;
}

/* ═══ Section Title — Neon Divider ═══ */
.fg-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 44px 0 22px;
  position: relative;
}
.fg-section-title__text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  position: relative;
}
.fg-section-title__text::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 40%;
  height: 2px;
  background: var(--c-neon-mint);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(131,255,231,0.4);
}
.fg-section-title__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(131,255,231,0.25) 0%, rgba(0,229,255,0.1) 50%, transparent 100%);
  min-width: 60px;
}
.fg-section-title__count {
  font-size: 13px;
  color: var(--c-text-muted);
  font-weight: 600;
  white-space: nowrap;
  background: rgba(131,255,231,0.06);
  padding: 4px 12px;
  border-radius: var(--r-full);
  border: 1px solid rgba(131,255,231,0.08);
}

/* ═══════════════════════════════════════════════════════════
   Game Grid
═══════════════════════════════════════════════════════════ */
.pgTlDsvMokOdehB3D11L,
.fg-game-ul {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Game Card */
.fg-game-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-slate);
  border: 1px solid var(--c-border-card);
  transition: var(--transition);
  cursor: pointer;
}
.fg-game-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-bright);
  box-shadow: var(--shadow-card), var(--shadow-glow-mint);
}
.fg-game-card:active { transform: scale(0.97); }

.fg-game-card__thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--c-midnight);
}
.fg-game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}
.fg-game-card:hover .fg-game-card__thumb img {
  transform: scale(1.08);
}

/* Card Shine Effect */
.fg-game-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(131,255,231,0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 2;
}
.fg-game-card:hover::after { left: 120%; }

.fg-game-card__label {
  padding: 11px 12px 13px;
}
.fg-game-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Play Button Overlay */
.fg-game-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
}
.fg-game-card:hover .fg-game-card__play { opacity: 1; }
.fg-game-card__play-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(131,255,231,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(131,255,231,0.4);
  transform: scale(0.8);
  transition: transform 0.25s var(--ease-spring);
}
.fg-game-card:hover .fg-game-card__play-btn { transform: scale(1); }
.fg-game-card__play-btn svg {
  width: 20px; height: 20px;
  fill: var(--c-abyss);
  margin-left: 2px;
}

/* ── Legacy Class Compatibility ─────────────────────────── */
div.thumb a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: inherit;
}
.thumb img { border: none !important; }

.game-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  padding: 0;
}
.tag-game {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.gt {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-slate);
  border: 1px solid var(--c-border-card);
  transition: var(--transition);
  min-height: 135px;
}
.gt:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-bright);
  box-shadow: var(--shadow-card), var(--shadow-glow-mint);
}
.gt a { display: block; }
.gt a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}
.gt:hover a img { transform: scale(1.06); }

/* ── Ad Placeholder ─────────────────────────────────────── */
.fg-ad {
  text-align: center;
  margin: 28px 0;
  min-height: 90px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(21,28,52,0.3);
}
.fg-ad--mobile-banner { margin: 16px 12px; min-height: 60px; }
.fg-ad--mobile-rect   { margin: 20px 12px; min-height: 250px; }

/* ═══════════════════════════════════════════════════════════
   Search Overlay
═══════════════════════════════════════════════════════════ */
.fg-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  animation: fadeInScale 0.2s var(--ease-out-expo);
}
.fg-search-overlay__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: transparent;
}
.fg-search-overlay__input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--c-border-bright);
  border-radius: var(--r-full);
  background: var(--c-midnight);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: var(--transition-fast);
}
.fg-search-overlay__input:focus {
  border-color: var(--c-neon-mint);
  box-shadow: var(--shadow-glow-mint);
}
.fg-search-overlay__input::placeholder { color: var(--c-text-muted); }
.fg-search-overlay__back {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--c-text-dim);
  cursor: pointer;
  transition: var(--transition-fast);
}
.fg-search-overlay__back:hover { color: var(--c-neon-mint); }

/* ═══════════════════════════════════════════════════════════
   Footer
═══════════════════════════════════════════════════════════ */
/* ═══ Footer — Neon Pipeline ═══ */
.fg-footer {
  position: relative;
  border-top: none;
  background: var(--c-abyss);
  padding: 48px 0 0;
  margin-top: 60px;
}
.fg-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-neon-mint) 20%, var(--c-neon-cyan) 50%, #ff2d95 80%, transparent);
  opacity: 0.6;
}
.fg-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.fg-footer__brand p {
  color: var(--c-text-muted);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0;
  max-width: 360px;
}
.fg-footer__brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  background: linear-gradient(135deg, var(--c-neon-mint), var(--c-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.fg-footer__col-title {
  font-weight: 800;
  color: #fff;
  font-size: 13px;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.fg-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fg-footer__links a {
  color: var(--c-text-muted);
  font-size: 13.5px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fg-footer__links a::before {
  content: "→";
  color: var(--c-neon-mint);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.25s;
  font-size: 12px;
}
.fg-footer__links a:hover {
  color: var(--c-neon-mint);
  padding-left: 4px;
}
.fg-footer__links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}
.fg-footer__bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(131,255,231,0.06);
  text-align: center;
  color: var(--c-text-muted);
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════════════════════
   Mobile
═══════════════════════════════════════════════════════════ */
.fg-mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  background: rgba(8,12,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}
.fg-mobile-nav__logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--c-neon-mint);
}
.fg-mobile-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fg-mobile-nav__btn {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--c-text-dim);
  transition: var(--transition-fast);
}
.fg-mobile-nav__btn:active { background: rgba(131,255,231,0.1); color: var(--c-neon-mint); }

.fg-mobile-search {
  padding: 12px 16px;
  background: var(--c-abyss);
}
.fg-mobile-search__wrap { position: relative; }
.fg-mobile-search__input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1px solid var(--c-border-card);
  border-radius: var(--r-full);
  background: var(--c-midnight);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}
.fg-mobile-search__input:focus {
  border-color: var(--c-neon-mint);
  box-shadow: var(--shadow-glow-mint);
}
.fg-mobile-search__input::placeholder { color: var(--c-text-muted); }
.fg-mobile-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  fill: var(--c-text-muted);
  pointer-events: none;
}

.fg-mobile-hero {
  padding: 24px 16px 20px;
  text-align: center;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(0,229,255,0.05) 0%, transparent 60%);
}
.fg-mobile-hero__text h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 6px;
}
.fg-mobile-hero__text p {
  font-size: 14px;
  color: var(--c-text-dim);
  margin: 0;
}

/* Mobile Category Horizontal Scroll */
.fg-mobile-cats {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--c-border);
}
.fg-mobile-cats__scroll {
  display: flex;
  gap: 8px;
  padding: 4px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fg-mobile-cats__scroll::-webkit-scrollbar { display: none; }

.fg-mobile-cat-pill {
  display: inline-flex;
  align-items: center;
  height: 33px;
  padding: 0 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-dim);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.fg-mobile-cat-pill:active,
.fg-mobile-cat-pill--active {
  color: var(--c-neon-mint);
  background: rgba(131,255,231,0.1);
  border-color: rgba(131,255,231,0.2);
}

.fg-mobile-grid-wrap {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fg-mobile-grid-wrap .gt {
  min-height: 100px;
}

/* ═══════════════════════════════════════════════════════════
   Detail Page (detail.html)
═══════════════════════════════════════════════════════════ */
.fg-detail-page {
  background: var(--c-void);
  min-height: 100vh;
}
.fg-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--c-abyss);
  border-bottom: 1px solid var(--c-border);
}
.fg-detail-header__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--c-neon-mint);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}
.fg-detail-header__back:hover { opacity: 0.8; }
.fg-detail-header__title {
  font-family: var(--font-display);
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}
.fg-detail-header__home {
  color: var(--c-text-dim);
  transition: var(--transition-fast);
}
.fg-detail-header__home:hover { color: var(--c-neon-mint); }

.fg-detail-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - 56px);
  padding: 8px;
}
.fg-detail-sidebar {
  width: 160px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fg-detail-sidebar__item {
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-slate);
  border: 1px solid var(--c-border-card);
  transition: var(--transition-fast);
}
.fg-detail-sidebar__item:hover {
  border-color: var(--c-border-bright);
  transform: scale(1.03);
}
.fg-detail-sidebar__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.fg-detail-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fg-detail-main iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: var(--r-sm);
  background: #000;
}

/* Pre-game Guide Screen */
.fg-pregame {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-midnight);
  border: 1px solid var(--c-border-card);
}
.fg-pregame__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.3);
  transform: scale(1.2);
}
.fg-pregame__content {
  position: relative;
  text-align: center;
  z-index: 1;
}
.fg-pregame__icon {
  width: 100px;
  height: 100px;
  border-radius: var(--r-xl);
  margin: 0 auto 20px;
  border: 2px solid rgba(131,255,231,0.3);
  box-shadow: var(--shadow-glow-mint);
  object-fit: cover;
}
.fg-pregame__name {
  font-family: var(--font-display);
  font-size: 28px;
  color: #fff;
  font-weight: 900;
  margin: 0 0 8px;
}
.fg-pregame__desc {
  color: var(--c-text-dim);
  font-size: 14px;
  margin: 0 0 24px;
}
.fg-pregame__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  border-radius: var(--r-full);
  border: none;
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 100%);
  color: var(--c-abyss);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-display);
  transition: var(--transition);
  box-shadow: 0 0 24px rgba(131,255,231,0.3);
}
.fg-pregame__btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 36px rgba(131,255,231,0.5);
}
.fg-pregame__btn:active { transform: scale(0.96); }

/* ═══ Detail page critical overrides ═══ */
/* Override main.css white html background */
.fg-detail-page,
html:has(.fg-detail-page) {
    background: var(--c-void) !important;
}

/* Override main.css detailContBox overlay after game starts */
.detailBox .detailContBox {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0,0,0,.65);
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: auto;
}
/* When pregame is hidden, allow clicks through to game */
.detailBox .detailContBox:has(.fg-pregame[style*="display: none"]),
.detailBox .detailContBox.detailContBox--hidden {
    pointer-events: none !important;
    background: transparent !important;
}

/* Make sure game iframe is interactable */
.fg-detail-main {
    position: relative;
    z-index: 1;
}
.fg-detail-main iframe {
    position: relative;
    z-index: 1;
}

/* Fix detail layout — prevent overlap */
.fg-detail-layout {
    position: relative;
    z-index: 1;
}

/* Responsive fixes */
@media (max-width: 760px) {
    .detailBox .detailContBox {
        position: fixed;
        height: 100vh;
    }
}


/* Related Games on Detail Page */
.fg-related-games {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.fg-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.fg-related-item {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-slate);
  border: 1px solid var(--c-border-card);
  transition: var(--transition-fast);
}
.fg-related-item:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-bright);
  box-shadow: var(--shadow-card);
}
.fg-related-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.fg-related-item__name {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--c-text-dim);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   Loading / Skeleton / Error States
═══════════════════════════════════════════════════════════ */
.fg-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--c-text-muted);
}
.fg-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-slate);
  border-top-color: var(--c-neon-mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}
.fg-skeleton {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--c-slate) 25%, var(--c-steel) 50%, var(--c-slate) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.fg-skeleton--card { aspect-ratio: 1; }

.error-state {
  color: #ff6b6b;
  padding: 24px;
  text-align: center;
  background: rgba(255,107,107,0.06);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,107,107,0.15);
  margin: 24px 0;
}
.retry-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 100%);
  color: var(--c-abyss);
  border: none;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.retry-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(131,255,231,0.3);
}

/* Category Page Banner */
.fg-category-banner {
  padding: calc(var(--total-top) + 24px) 24px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0,229,255,0.04) 0%, transparent 60%);
}
.fg-category-banner h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
  word-break: break-word;
}
.fg-category-banner p {
  font-size: 14px;
  color: var(--c-text-dim);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   Accessibility & Helpers
═══════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--c-neon-mint);
  outline-offset: 2px;
  border-radius: 4px;
}
.buttonReset:focus-visible { outline: 2px solid var(--c-neon-mint); }

.preload { opacity: 0; transition: opacity 0.3s ease; }
.loaded  { opacity: 1; }
.lazy-image { background: var(--c-slate); position: relative; }
.lazy-image::before { content: ""; display: block; padding-top: 100%; }

.structured-data { display: none; }
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.noscript-content {
  padding: 20px;
  background: var(--c-midnight);
  border: 1px solid var(--c-border);
  margin: 20px;
  border-radius: var(--r-md);
  color: var(--c-text);
}

#scroll-sentinel { height: 20px; text-align: center; padding: 20px 0; color: var(--c-text-muted); }

/* ═══════════════════════════════════════════════════════════
   Responsive Breakpoints
═══════════════════════════════════════════════════════════ */
@media (max-width: 1300px) {
  .pgTlDsvMokOdehB3D11L,
  .fg-game-ul,
  .game-container,
  .tag-game {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1100px) {
  .fg-sidebar { display: none; }
  .fg-layout { padding: 0 16px 32px; }
  .pgTlDsvMokOdehB3D11L,
  .fg-game-ul,
  .game-container,
  .tag-game {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (max-width: 720px) {
  :root { --navbar-h: 56px; }
  .fg-navbar,
  .fg-category-nav,
  .fg-hero,
  .fg-layout { display: none; }

  .fg-mobile-nav { display: flex; }
  body { padding-top: 56px; }

  .pgTlDsvMokOdehB3D11L,
  .fg-game-ul,
  .game-container,
  .tag-game {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .gt { min-height: 100px; }

  .fg-footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .pgTlDsvMokOdehB3D11L,
  .fg-game-ul,
  .game-container,
  .tag-game {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fg-mobile-grid-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════
   @font-face
═══════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Torus';
  src: url('/fonts/torus-bold-latin.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/proxima-nova-regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Proxima Nova';
  src: url('/fonts/proxima-nova-bold-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ═══════════════════════════════════════════════════════════════
   GAME CARD OVERRIDES — old selectors from loadgame.js / category.js
   ═══════════════════════════════════════════════════════════════ */

/* Desktop game grid container */
#app-root > .lStd1276e_IhuA3g3FIs.s9w4UjUUDL2klmhRDNdo {
    display: flex !important;
    gap: 20px;
    padding: 0;
}
#app-root > .lStd1276e_IhuA3g3FIs.s9w4UjUUDL2klmhRDNdo > div:first-child {
    flex: 1;
    min-width: 0;
}
#app-root > .lStd1276e_IhuA3g3FIs.s9w4UjUUDL2klmhRDNdo > div:first-child > div:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 10px 0 20px;
}

/* Game card list (first 5 featured games) */
.fg-game-list,
ul.fg-game-list,
#fg-game-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

/* ═══ Individual Game Card ═══ */
.I_N3HLb877sRrr2UZJfZ {
    display: block;
    position: relative;
    background: rgba(10, 16, 30, 0.85);
    border: 1px solid rgba(131, 255, 231, 0.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.I_N3HLb877sRrr2UZJfZ:hover {
    transform: translateY(-4px);
    border-color: rgba(131, 255, 231, 0.35);
    box-shadow: 0 8px 32px rgba(0, 229, 255, 0.15), 0 0 0 1px rgba(131, 255, 231, 0.15);
}
.I_N3HLb877sRrr2UZJfZ:active {
    transform: translateY(-2px) scale(0.98);
}

/* Game card picture container */
.EtaFjSLj6ZlVyLWzxjzK {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(0, 229, 255, 0.03);
}

/* Game card image */
.omIThBX9w3QarB_pnFby {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.I_N3HLb877sRrr2UZJfZ:hover .omIThBX9w3QarB_pnFby {
    transform: scale(1.08);
}

/* Game card title */
.MHaP7Us7V6KqGxb8muHM,
.global-cq-title {
    display: block;
    padding: 8px 10px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #c8d0dc;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    transition: color 0.3s;
}
.I_N3HLb877sRrr2UZJfZ:hover .MHaP7Us7V6KqGxb8muHM,
.I_N3HLb877sRrr2UZJfZ:hover .global-cq-title {
    color: #83ffe7;
}

/* ═══ Staggered entrance animation ═══ */
@keyframes fgCardFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.I_N3HLb877sRrr2UZJfZ {
    animation: fgCardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.ip0 { animation-delay: 0.05s; }
.ip1 { animation-delay: 0.1s; }
.ip2 { animation-delay: 0.15s; }
.ip3 { animation-delay: 0.2s; }
.ip4 { animation-delay: 0.25s; }

/* ═══ Category page game containers ═══ */
/* Title */
.WkgGPoj56g0c5Rdpt85Z {
    font-size: 28px;
    font-weight: 700;
    color: #83ffe7;
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Featured games list (first 5) */
.Wz4fsOmhQR4bEYpqHqhc {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.Wz4fsOmhQR4bEYpqHqhc > li {
    list-style: none;
}

/* Remaining games grid */
.vtbwTfQNi80Hes0DzmGs.JgLfL7LclbiAmVJ1BGIg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 0 0 30px;
}

/* Category page section container */
#fg-cat-content.lStd1276e_IhuA3g3FIs {
    padding: 20px 0;
}

/* ═══ Responsive game grid ═══ */
@media (max-width: 1200px) {
    .fg-game-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .Wz4fsOmhQR4bEYpqHqhc { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    #app-root > .lStd1276e_IhuA3g3FIs > div:first-child > div:nth-child(2) {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
@media (max-width: 768px) {
    .fg-game-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .Wz4fsOmhQR4bEYpqHqhc { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    #app-root > .lStd1276e_IhuA3g3FIs > div:first-child > div:nth-child(2) {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
    }
}


/* Game grid container — receives <li> from both loadDeskGames (into ul) and loadRemainingDeskGames (directly) */
.fg-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.fg-game-grid > li {
    list-style: none;
}
.fg-game-grid > ul.fg-game-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
}

/* Empty div for remaining games — styled same as grid */
.fg-game-more {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}


/* ═══════════════════════════════════════════════════════════
   UI Polish — Neon Arcade Extras
   ═══════════════════════════════════════════════════════════ */

/* ── Ad container ── */
.fg-ad {
  margin: 28px 0;
  padding: 16px;
  background: rgba(21,28,52,0.5);
  border: 1px solid rgba(131,255,231,0.06);
  border-radius: 14px;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* ── Category Banner (category.html) ── */
.fg-category-banner {
  position: relative;
  padding: calc(var(--total-top) + 28px) 24px 32px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 30%, rgba(0,229,255,0.06) 0%, transparent 60%),
    linear-gradient(180deg, rgba(13,20,38,0.7) 0%, rgba(8,12,20,0) 100%);
  text-align: center;
  margin-bottom: 8px;
  overflow: visible;
}
.fg-category-banner h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
  word-break: break-word;
}
.fg-category-banner p {
  color: var(--c-text-dim);
  font-size: 15px;
  margin: 0 auto;
}

/* ── Page transitions ── */
.fg-layout {
  animation: fgFadeSlideIn 0.4s ease-out;
}
@keyframes fgFadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Custom scrollbar ── */
body {
  scrollbar-width: thin;
  scrollbar-color: rgba(131,255,231,0.12) transparent;
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb {
  background: rgba(131,255,231,0.12);
  border-radius: 3px;
}
body::-webkit-scrollbar-thumb:hover { background: rgba(131,255,231,0.25); }

/* ── Selection ── */
::selection {
  background: rgba(131,255,231,0.2);
  color: #fff;
}

/* ── Game card section container ── */
#app-root > .lStd1276e_IhuA3g3FIs.s9w4UjUUDL2klmhRDNdo > div:first-child {
  background: rgba(10,16,30,0.3);
  border-radius: 18px;
  padding: 0 20px 8px;
  border: 1px solid rgba(131,255,231,0.05);
}

/* Logo domain badge */
.fg-logo__domain {
    font-size: 0.55em;
    font-weight: 600;
    color: var(--c-neon-cyan);
    margin-left: 2px;
    vertical-align: super;
    letter-spacing: 0.5px;
    opacity: 0.85;
}
.fg-detail-header__domain {
    font-size: 11px;
    color: var(--c-neon-cyan);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.fg-detail-header__domain:hover { opacity: 1; }
/* ═══════════════════════════════════════════════════════════
   UI POLISH — Neon Arcade v2.1
   ═══════════════════════════════════════════════════════════ */

/* Scroll-to-Top Button */
.fg-scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 100%);
  border: none;
  color: var(--c-abyss);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(131,255,231,0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fg-scroll-top--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fg-scroll-top:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 28px rgba(131,255,231,0.5);
}
.fg-scroll-top:active { transform: scale(0.92); }

/* Game Card: Play Overlay */
.fg-game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}
.fg-game-card:hover .fg-game-card__overlay,
.gt:hover .fg-game-card__overlay,
.I_N3HLb877sRrr2UZJfZ:hover .fg-game-card__overlay { opacity: 1; }
.fg-game-card__play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--c-neon-mint) 0%, var(--c-neon-cyan) 100%);
  color: var(--c-abyss);
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fg-game-card:hover .fg-game-card__play-btn,
.gt:hover .fg-game-card__play-btn,
.I_N3HLb877sRrr2UZJfZ:hover .fg-game-card__play-btn { transform: translateY(0); }

/* Card Glow Animation */
@keyframes cardGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,229,255,0.12), 0 0 0 1px rgba(131,255,231,0.1); }
  50%      { box-shadow: 0 8px 32px rgba(0,229,255,0.2), 0 0 0 1px rgba(131,255,231,0.25); }
}
.fg-game-card:focus-visible,
.gt:focus-visible,
.I_N3HLb877sRrr2UZJfZ:focus-visible { animation: cardGlow 2s ease-in-out infinite; }

/* Hero Badge Pulse */
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(131,255,231,0.08); }
  50%      { box-shadow: 0 0 24px rgba(131,255,231,0.2); }
}
.fg-hero__badge { animation: badgeGlow 3s ease-in-out infinite; }

/* Footer Polish */
.fg-footer__bottom {
  letter-spacing: 0.5px;
  font-size: 11.5px;
  color: var(--c-text-muted);
  opacity: 0.7;
}
.fg-footer__domain-link { color: var(--c-neon-cyan); font-weight: 600; }
.fg-footer__domain-link:hover { text-decoration: underline; }

/* Sidebar Active Route */
.fg-sidebar__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(131,255,231,0.12) 0%, rgba(131,255,231,0.03) 100%);
  color: var(--c-neon-mint);
  font-weight: 700;
  border: 1px solid rgba(131,255,231,0.12);
}
.fg-sidebar__link[aria-current="page"]::before {
  background: var(--c-neon-mint);
  box-shadow: 0 0 12px rgba(131,255,231,0.6);
  width: 8px;
  height: 8px;
}

/* Sidebar Count Badge */
.fg-sidebar__count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(131,255,231,0.1);
  color: var(--c-neon-mint);
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid rgba(131,255,231,0.15);
}

/* Navbar Hot Button */
.fg-nav-btn--hot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
}
.fg-nav-btn--hot:hover,
.fg-nav-btn--hot.fg-nav-btn--active {
  color: var(--c-neon-pink);
  border-color: rgba(255,45,149,0.2);
  background: rgba(255,45,149,0.08);
  box-shadow: 0 0 12px rgba(255,45,149,0.1);
}

/* Category Banner Emoji */
.fg-category-banner__emoji { font-size: 48px; display: block; margin-bottom: 12px; }

/* Hot Page Unified Styles */
.hot-hero {
  text-align: center;
  padding: 60px 24px 40px;
  background: radial-gradient(ellipse 60% 80% at 50% 30%, rgba(255,45,149,0.06) 0%, transparent 60%), radial-gradient(ellipse 50% 50% at 80% 50%, rgba(255,107,53,0.04) 0%, transparent 50%), linear-gradient(180deg, rgba(13,20,38,0.8) 0%, rgba(8,12,20,0) 100%);
  position: relative;
  overflow: hidden;
}
.hot-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,45,149,0.008) 2px, rgba(255,45,149,0.008) 4px);
  pointer-events: none;
}
.hot-hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}
.hot-hero h1 span {
  background: linear-gradient(135deg, var(--c-neon-gold), #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hot-hero p { color: var(--c-text-dim); font-size: 16px; position: relative; z-index: 1; }
.hot-rank {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.hot-rank-item {
  position: relative;
  background: linear-gradient(180deg, rgba(21,28,52,0.9) 0%, rgba(16,22,42,0.7) 100%);
  border: 1px solid rgba(131,255,231,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  display: block;
}
.hot-rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(131,255,231,0.3);
  box-shadow: 0 8px 32px rgba(0,229,255,0.15), 0 0 0 1px rgba(131,255,231,0.12);
}
.hot-rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  z-index: 2;
  color: #fff;
}
.hot-rank-badge--gold   { background: linear-gradient(135deg, #ffd54f, #ff8f00); box-shadow: 0 2px 8px rgba(255,213,79,0.4); }
.hot-rank-badge--silver { background: linear-gradient(135deg, #b0bec5, #78909c); box-shadow: 0 2px 8px rgba(176,190,197,0.3); }
.hot-rank-badge--bronze { background: linear-gradient(135deg, #ff8a65, #d84315); box-shadow: 0 2px 8px rgba(255,138,101,0.3); }
.hot-rank-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.hot-rank-name {
  display: block;
  padding: 10px 12px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}
.hot-rank-item:hover .hot-rank-name { color: var(--c-neon-mint); }

/* About Page Polish */
.about-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.about-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-neon-mint);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 32px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid rgba(131,255,231,0.15);
  transition: var(--transition);
  background: rgba(131,255,231,0.04);
}
.about-page .back-link:hover {
  background: rgba(131,255,231,0.1);
  border-color: rgba(131,255,231,0.3);
  box-shadow: 0 0 12px rgba(131,255,231,0.1);
}
.about-page h1 {
  font-family: var(--font-display);
  font-size: 38px;
  color: #fff;
  margin: 0 0 8px;
}
.about-page h1 span {
  background: linear-gradient(135deg, var(--c-neon-mint), var(--c-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-page .subtitle {
  color: var(--c-text-dim);
  font-size: 16px;
  margin: 0 0 44px;
  line-height: 1.5;
}
.about-page h2 {
  color: var(--c-neon-mint);
  font-size: 20px;
  margin: 36px 0 12px;
  font-family: var(--font-display);
  position: relative;
  padding-left: 16px;
}
.about-page h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--c-neon-mint);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(131,255,231,0.4);
}
.about-page p { color: var(--c-text-dim); line-height: 1.8; margin: 0 0 18px; font-size: 15px; }
.about-page a { color: var(--c-neon-cyan); text-decoration: underline; text-underline-offset: 3px; }
.about-page a:hover { color: var(--c-neon-mint); }

/* Mobile Polish */
.fg-mobile-cats { padding: 0 0 12px; border-bottom: 1px solid rgba(131,255,231,0.06); }
.fg-mobile-search {
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(12,20,38,0.9) 0%, var(--c-abyss) 100%);
  position: sticky;
  top: 56px;
  z-index: 100;
}
.fg-mobile-nav__logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--c-neon-mint), var(--c-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fg-mobile-hero__text h1 {
  background: linear-gradient(135deg, #fff, var(--c-neon-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pill Auto-scroll */
.fg-category-nav__inner { scroll-behavior: smooth; }

/* Search Overlay */
.kWQWzdYW881_EYiVCO5J .Y9efeKQ20Yrp3CP8gdCB {
  background: rgba(8,12,20,0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Skeleton Pulse */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.7; }
}
.fg-skeleton { animation: skeletonPulse 2s ease-in-out infinite; }

/* Responsive Polish */
@media (max-width: 720px) {
  .fg-scroll-top { bottom: 20px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
  .about-page { padding: 20px 16px 60px; }
  .about-page h1 { font-size: 28px; }
  .hot-hero { padding: 40px 16px 24px; }
  .hot-hero h1 { font-size: 28px; }
}



/* Navbar link (used in category.html) */
.fg-navbar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--c-text-muted);
  transition: var(--transition);
}
.fg-navbar__link svg { fill: currentColor; }
.fg-navbar__link:hover {
  background: rgba(131,255,231,0.08);
  border-color: rgba(131,255,231,0.2);
  color: var(--c-neon-mint);
  box-shadow: 0 0 12px rgba(131,255,231,0.08);
}

/* Sidebar hidden - content full width */
.fg-sidebar[style*="display:none"] + .fg-content,
#fg-sidebar[style*="display:none"] ~ .fg-content { max-width: 100%; }
.fg-layout:has(.fg-sidebar[style*="display:none"]) .fg-content { max-width: 100%; }
