/* -------------------------------------------------------------------------- */
/* Ralbac Play — Design System & Styles (Canonical Ralbac Alignment)          */
/* -------------------------------------------------------------------------- */

:root {
  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Dark Theme (Default) */
  --bg-main: #0a0a0a;
  --bg-surface: #121212;
  --bg-surface-soft: #18181b;
  --bg-surface-elevated: #1f1f23;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-line: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(255, 255, 255, 0.3);
  
  --text-main: #ededed;
  --text-muted: #999999;
  --text-subtle: #666666;
  --fg: 237, 237, 237;
  --line: 255, 255, 255;
  
  --nav-bg: rgba(10, 10, 10, 0.82);
  --nav-link-color: #ededed;
  --nav-link-hover: rgba(237, 237, 237, 0.75);
  --btn-line-bg: rgba(255, 255, 255, 0.08);
  --btn-line-hover: rgba(255, 255, 255, 0.18);
  
  --accent-gold: #f6d27a;
  --accent-emerald: #10b981;
  --accent-cyan: #00eaff;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  
  --shell-max: 1180px;

  --fx-wordmark-bloom: 0.18;
  --scanlines-display: none;
  --streaks-display: none;
  
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f1f5f9;
  --bg-surface-elevated: #e2e8f0;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --border-line: rgba(148, 163, 184, 0.25);
  --border-focus: rgba(148, 163, 184, 0.5);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --fg: 15, 23, 42;
  --line: 148, 163, 184;

  --nav-bg: rgba(248, 250, 252, 0.85);
  --nav-link-color: #0f172a;
  --nav-link-hover: rgba(15, 23, 42, 0.7);
  --btn-line-bg: rgba(15, 23, 42, 0.06);
  --btn-line-hover: rgba(15, 23, 42, 0.12);

  --accent-gold: #b45309;
  --accent-emerald: #059669;
  --accent-cyan: #0284c7;

  color-scheme: light;
}

/* -------------------------------------------------------------------------- */
/* Reset & Base                                                               */
/* -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Layout Wrapper */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.section-container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .section-container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding: 0 32px;
  }
}

/* -------------------------------------------------------------------------- */
/* Main Header (Canonical Ralbac Navbar)                                      */
/* -------------------------------------------------------------------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: clip;
  border-bottom: 1px solid var(--border-line);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  height: 78px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .header-container {
    height: 88px;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .header-container {
    padding: 0 32px;
  }
}

/* Left: Glitch Wordmark */
.header-logo-col {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-self: start;
  gap: 8px;
}

.brand-wordmark-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-self: start;
}

/* Center: Main Nav Links */
.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .main-nav {
    gap: 40px;
  }
}

.nav-link {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.025em;
  color: var(--text-main);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .nav-link {
    font-size: 19px;
  }
}

.nav-link:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

.nav-link.nav-link--active {
  opacity: 1;
  font-weight: 700;
  position: relative;
}

.nav-link.nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-main);
  border-radius: var(--radius-pill);
  opacity: 0.8;
}

/* Right: Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  height: 36px;
  width: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-line);
  background: var(--btn-line-bg);
  color: var(--text-main);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.action-btn:hover {
  background: var(--btn-line-hover);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn--fullscreen {
  display: inline-flex;
}

@media (min-width: 768px) {
  .action-btn--fullscreen {
    display: none;
  }
}

.action-btn--menu {
  display: inline-flex;
}

@media (min-width: 768px) {
  .action-btn--menu {
    display: none;
  }
}

/* Desktop Theme Toggle Wrapper */
#theme-toggle-desktop {
  display: none;
}

@media (min-width: 768px) {
  #theme-toggle-desktop {
    display: inline-flex;
  }
}

/* Theme Toggle Pill Switch */
.theme-toggle-switch {
  position: relative;
  display: inline-flex;
  height: 32px;
  width: 56px;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-line);
  background: var(--btn-line-bg);
  padding: 3px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.theme-toggle-switch:hover {
  border-color: var(--border-focus);
}

.theme-toggle-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: rgba(100, 116, 139, 0.15);
  transition: background 0.2s ease;
}

:root[data-theme="light"] .theme-toggle-bg {
  background: rgba(245, 158, 11, 0.18);
}

.theme-toggle-knob {
  position: relative;
  z-index: 2;
  display: inline-flex;
  height: 24px;
  width: 24px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(0);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

:root[data-theme="light"] .theme-toggle-knob {
  transform: translateX(24px);
}

.theme-toggle-knob .icon-sun {
  display: none;
}

.theme-toggle-knob .icon-moon {
  display: block;
}

:root[data-theme="light"] .theme-toggle-knob .icon-sun {
  display: block;
  color: #b45309;
}

:root[data-theme="light"] .theme-toggle-knob .icon-moon {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Mobile Dropdown Navigation                                                 */
/* -------------------------------------------------------------------------- */
.mobile-main-nav {
  display: none;
  border-top: 1px solid var(--border-line);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 767px) {
  .mobile-main-nav.is-open {
    display: block;
    animation: mobileNavFade 0.2s ease-out;
  }
}

@keyframes mobileNavFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-content {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 12px 16px 16px 16px;
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav-link {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  background: var(--btn-line-bg);
  padding: 10px 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text-main);
  transition: background 0.15s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: var(--btn-line-hover);
}

.mobile-nav-link.mobile-nav-link--active {
  background: var(--bg-surface-soft);
  border-color: var(--border-focus);
  font-weight: 700;
}

.mobile-nav-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  background: var(--btn-line-bg);
  padding: 10px 14px;
}

/* -------------------------------------------------------------------------- */
/* Glitch Wordmark (Canonical Monochrome Slice Glitch)                        */
/* -------------------------------------------------------------------------- */
.gw {
  --gw-bloom: 0.35;
  --gw-intensity: 0.85;
  --gw-scanline-opacity: 0.05;
  --gw-slice-count: 12;
  --gw-cycle: 2600ms;

  position: relative;
  width: 100%;
  max-width: var(--gw-max-width, 220px);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.gw-main {
  position: relative;
  display: inline-grid;
  place-items: center;
  z-index: 5;
}

.gw-measure {
  font-family: var(--font-display);
  font-size: var(--gw-font-size, clamp(1.45rem, 6.4vw, 2.6rem));
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  font-style: italic;
  white-space: nowrap;
  user-select: none;
  visibility: hidden;
}

.gw-slice {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--gw-font-size, clamp(1.45rem, 6.4vw, 2.6rem));
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  font-style: italic;
  user-select: none;
  white-space: nowrap;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  clip-path: inset(var(--t, 0%) -0.18em var(--b, 0%) -0.18em);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.gw-slice-inner {
  display: inline-block;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  animation: gw-micro-jitter 620ms steps(2, end) infinite;
  animation-delay: calc(var(--d, 0ms) * 0.18);
}

.gw-slice-main {
  color: rgb(var(--fg));
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(var(--fg), 0.06)) drop-shadow(0 0 74px rgba(255, 255, 255, calc(var(--fx-wordmark-bloom) * var(--gw-bloom))));
  animation: gw-slice-main-cycle var(--gw-cycle) steps(2, end) infinite;
  animation-delay: 0ms;
}

.gw-clone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  will-change: opacity;
  animation: gw-clone-cycle var(--gw-cycle) steps(1, end) infinite;
}

.gw-clone-a {
  filter: blur(0.45px);
}

.gw-clone-b {
  filter: blur(0.7px);
}

.gw-clone .gw-slice {
  color: rgba(var(--fg), var(--o, 0.35));
  animation: gw-slice-clone-cycle var(--gw-cycle) steps(2, end) infinite;
  animation-delay: var(--d, 0ms);
}

.gw-streaks {
  position: absolute;
  inset: 28% -18%;
  z-index: 6;
  pointer-events: none;
  display: var(--streaks-display);
  opacity: 0.42;
  filter: blur(0.25px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.gw-streak {
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 0%);
  width: var(--w, 40%);
  height: 1px;
  opacity: var(--o, 0.12);
  background: linear-gradient(90deg, transparent, rgba(var(--fg), 0.92), transparent);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation: gw-streak-cycle var(--gw-cycle) steps(2, end) infinite;
  animation-delay: var(--d, 0ms);
}

.gw-scanlines {
  position: absolute;
  inset: -10% -12%;
  z-index: 7;
  pointer-events: none;
  display: var(--scanlines-display);
  opacity: calc(var(--gw-scanline-opacity) * 0);
  background: repeating-linear-gradient(to bottom, rgba(var(--line), 0.22) 0 1px, transparent 1px 4px);
}

@keyframes gw-micro-jitter {
  0% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(calc(var(--s1, 18px) * 0.045 * var(--gw-intensity)), 0, 0); }
  28% { transform: translate3d(calc(var(--s2, -12px) * 0.035 * var(--gw-intensity)), 0, 0); }
  42% { transform: translate3d(calc(var(--s1, 18px) * -0.03 * var(--gw-intensity)), 0, 0); }
  56% { transform: translate3d(calc(var(--s2, -12px) * -0.02 * var(--gw-intensity)), 0, 0); }
  70% { transform: translate3d(calc(var(--s1, 18px) * 0.02 * var(--gw-intensity)), 0, 0); }
  84% { transform: translate3d(calc(var(--s2, -12px) * 0.018 * var(--gw-intensity)), 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes gw-slice-main-cycle {
  0%, 7%, 70%, 100% { transform: translate3d(0, 0, 0); }
  9% { transform: translate3d(calc(var(--s1, 18px) * 0.08), 0, 0); }
  11% { transform: translate3d(0, 0, 0); }
  43% { transform: translate3d(calc(var(--s2, -12px) * 0.06), 0, 0); }
  45% { transform: translate3d(0, 0, 0); }
  72% { transform: translate3d(calc(var(--s1, 18px) * 0.14), 0, 0); }
  74% { transform: translate3d(0, 0, 0); }
  79% { transform: translate3d(var(--s1, 18px), 0, 0); }
  82% { transform: translate3d(var(--s2, -12px), 0, 0); }
  85% { transform: translate3d(calc(var(--s1, 18px) * -0.38), 0, 0); }
  88% { transform: translate3d(0, 0, 0); }
}

@keyframes gw-clone-cycle {
  0%, 76%, 100% { opacity: 0; }
  79% { opacity: 1; }
  86% { opacity: 0.38; }
  92% { opacity: 0; }
}

@keyframes gw-slice-clone-cycle {
  0%, 74%, 100% { transform: translate3d(0, 0, 0); opacity: 0.3; }
  79% { transform: translate3d(calc(var(--s1, 22px) * 1.05), 0, 0); opacity: 0.95; }
  82% { transform: translate3d(calc(var(--s2, -14px) * 1.1), 0, 0); opacity: 0.65; }
  86% { transform: translate3d(calc(var(--s1, 22px) * -0.55), 0, 0); opacity: 0.46; }
  92% { transform: translate3d(0, 0, 0); opacity: 0.2; }
}

@keyframes gw-streak-cycle {
  0%, 70%, 100% { transform: translate3d(0, 0, 0); opacity: var(--o, 0.12); }
  79% { transform: translate3d(calc(30px * var(--gw-intensity)), 0, 0); opacity: calc(var(--o, 0.12) + 0.18); }
  83% { transform: translate3d(calc(-16px * var(--gw-intensity)), 0, 0); opacity: calc(var(--o, 0.12) + 0.1); }
  87% { transform: translate3d(0, 0, 0); opacity: var(--o, 0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .gw-slice,
  .gw-slice-inner,
  .gw-clone,
  .gw-clone .gw-slice,
  .gw-streak,
  .gw-streaks,
  .gw-scanlines {
    animation: none !important;
  }
  .gw-clone,
  .gw-streaks,
  .gw-scanlines {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Featured Hero Section                                                      */
/* -------------------------------------------------------------------------- */
.featured-section {
  padding: 20px 0 16px 0;
}

.featured-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-line);
  background: var(--bg-surface);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.featured-banner:hover {
  border-color: var(--border-focus);
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6);
}

.featured-banner:active {
  transform: scale(0.99);
}

.featured-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 10, 10, 0.94) 0%,
    rgba(10, 10, 10, 0.72) 45%,
    rgba(10, 10, 10, 0.2) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px;
  z-index: 2;
}

:root[data-theme="light"] .featured-overlay {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.76) 45%,
    rgba(255, 255, 255, 0.25) 100%
  );
}

.featured-top-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-featured {
  background: rgba(246, 210, 122, 0.18);
  border: 1px solid rgba(246, 210, 122, 0.35);
  color: var(--accent-gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.badge-live {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.featured-bottom-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

.featured-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-play-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text-main);
  color: var(--bg-main);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s ease;
}

.btn-play-hero:hover {
  opacity: 0.9;
}

/* -------------------------------------------------------------------------- */
/* Catalog Section (Grid)                                                     */
/* -------------------------------------------------------------------------- */
.catalog-section {
  padding: 24px 0 40px 0;
}

.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.catalog-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-line);
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.catalog-filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: var(--bg-surface-soft);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Game Cards Grid */
.game-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .game-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .game-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

/* Game Card */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  aspect-ratio: 16 / 10;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.game-card:active {
  transform: scale(0.98);
}

.card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.05) 30%,
    rgba(10, 10, 10, 0.8) 70%,
    rgba(10, 10, 10, 0.98) 100%
  );
}

:root[data-theme="light"] .card-gradient {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(255, 255, 255, 0.82) 70%,
    rgba(255, 255, 255, 0.98) 100%
  );
}

.card-badges {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 10px;
}

.badge-live-sm {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent-emerald);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.card-content {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.card-name {
  font-family: var(--font-display);
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------------------- */
/* About Section                                                              */
/* -------------------------------------------------------------------------- */
.about-section {
  padding: 28px 0 40px 0;
  border-top: 1px solid var(--border-line);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.about-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.about-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.about-item-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.about-item-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* -------------------------------------------------------------------------- */
/* PRE / Lab Section                                                          */
/* -------------------------------------------------------------------------- */
.pre-section {
  padding: 28px 0 40px 0;
  border-top: 1px solid var(--border-line);
}

.pre-header {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pre-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pre-description {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 620px;
}

.badge-pre {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

:root[data-theme="light"] .badge-pre {
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.3);
  color: #9333ea;
}

.badge-pre-sm {
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

:root[data-theme="light"] .badge-pre-sm {
  background: rgba(147, 51, 234, 0.15);
  border-color: rgba(147, 51, 234, 0.35);
  color: #9333ea;
}

.card-tag--pre {
  color: #c084fc !important;
}

:root[data-theme="light"] .card-tag--pre {
  color: #9333ea !important;
}

.game-card--pre {
  border-color: rgba(168, 85, 247, 0.3);
}

.game-card--pre:hover {
  border-color: rgba(168, 85, 247, 0.6);
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.main-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-line);
  background: var(--bg-main);
  padding: 20px 0;
}

.footer-container {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 768px) {
  .footer-container {
    padding: 0 24px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-subtle);
}

.footer-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/* Responsive Tweaks                                                          */
/* -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .section-container {
    padding: 0 12px;
  }

  .game-cards-grid {
    gap: 10px;
  }

  .card-content {
    padding: 8px 10px;
  }

  .featured-overlay {
    padding: 14px 16px;
  }

  .featured-banner {
    aspect-ratio: 16 / 9;
  }
}
