/* ==========================================================================
   CLEAN DARK GAMING PORTAL - CSS STYLESHEET
   AdX-Optimized, High Performance, Zero-CLS Architecture
   ========================================================================== */

/* --- CSS Variables & Theme --- */
:root {
  --bg-primary: #0f172a;       /* Slate 900 */
  --bg-secondary: #0b1120;     /* Slate 950 */
  --bg-surface: #1e293b;       /* Slate 800 */
  --bg-surface-hover: #334155; /* Slate 700 */
  --bg-surface-glass: rgba(30, 41, 59, 0.85);
  --bg-card: #1e293b;
  --bg-card-glass: rgba(30, 41, 59, 0.7);

  --border-color: #334155;
  --border-subtle: rgba(51, 65, 85, 0.6);
  --border-glow: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  --accent-primary: #6366f1;   /* Indigo 500 */
  --accent-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(217, 70, 239, 0.2) 100%);
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --ad-badge-bg: rgba(100, 116, 139, 0.15);
  --ad-badge-text: #94a3b8;
  --ad-slot-bg: #131d31;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);

  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
  overflow-x: hidden !important;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(217, 70, 239, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(56, 189, 248, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

/* --- Container & Grid Helpers --- */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }
}

/* ==========================================================================
   GOOGLE AdX ADVERTISING SLOTS (Unconstrained & Cleanly Centered)
   ========================================================================== */
/* Ad Slot Wrapper */
.ad-slot-wrapper {
  margin: 1.25rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

/* Auto-collapse when empty (0 margin, 0 padding, 0 height) */
.ad-slot-wrapper.ad-slot-collapsed,
.ad-slot-collapsed,
.ad-slot-wrapper:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: none !important;
}

/* Native In-Feed Ad Card */
.ad-slot-native {
  width: 100%;
  margin: 2rem 0;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .navbar {
    height: 60px;
    gap: 0.65rem;
  }
  .brand-logo {
    font-size: 1.15rem;
    gap: 0.45rem;
  }
  .brand-icon {
    width: 34px;
    height: 34px;
  }
  .brand-icon svg {
    width: 18px;
    height: 18px;
  }
  .search-input {
    height: 38px;
    font-size: 0.82rem;
    padding: 0 0.75rem 0 2.2rem;
  }
  .search-icon {
    left: 0.7rem;
    width: 15px;
    height: 15px;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.brand-name span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 1rem 0 2.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: var(--bg-surface);
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  display: none;
  cursor: pointer;
  padding: 4px;
}

/* Category Quick Filter Bar */
.category-filter-nav {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.65rem 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
}

.category-filter-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-pills {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cat-pill {
  padding: 0.4rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-pill:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-surface-hover);
}

.cat-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Nav Actions & Quick Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link-btn {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* ==========================================================================
   BLOCK SECTION HEADERS & STYLES
   ========================================================================== */
.block-section {
  padding: 2.25rem 0;
  position: relative;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   BLOK 1: GAME GRID (1:1 Aspect Ratio Thumbnails)
   ========================================================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

@media (max-width: 540px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
}

/* 1:1 Game Card (Thumbnail Only with Hover Title) */
.game-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1; /* Strict 1:1 Square */
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-card:hover,
.game-card:focus {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  z-index: 5;
}

/* Exact 1:1 Ratio Thumbnail Container with Zero-CLS Skeleton */
.game-card-thumb-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, #1e293b 8%, #334155 18%, #1e293b 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.game-card-thumb-wrap.loaded {
  animation: none;
  background: var(--bg-surface);
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-smooth);
}

.game-card-img.loaded {
  opacity: 1;
}

.game-card:hover .game-card-img {
  transform: scale(1.1);
}

/* Card Hover/Tap Overlay displaying Game Title (Replaces Play Button) */
.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.65) 45%, rgba(15, 23, 42, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 1rem 0.85rem;
  opacity: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity var(--transition-normal);
  z-index: 3;
}

.game-card:hover .game-card-overlay,
.game-card:focus .game-card-overlay {
  opacity: 1;
}

.game-card-hover-title {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  transform: translateY(8px);
  transition: transform var(--transition-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card:hover .game-card-hover-title,
.game-card:focus .game-card-hover-title {
  transform: translateY(0);
}

/* Infinite Games Stream */
#infinite-games-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   BLOK 2: VIDEO WALKTHROUGH (16:9 Aspect Ratio Grid / Carousel)
   ========================================================================== */
.video-block-wrapper {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
  margin: 1.5rem 0;
}

.video-carousel-container {
  position: relative;
  width: 100%;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* 16:9 Video Card */
.video-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-rose);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(244, 63, 94, 0.3);
}

/* Exact 16:9 Ratio Thumbnail Container */
.video-card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9; /* Strict 16:9 Widescreen */
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, #1e293b 8%, #334155 18%, #1e293b 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.video-card-thumb-wrap.loaded {
  animation: none;
  background: var(--bg-surface);
}

.video-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-smooth);
}

.video-card-img.loaded {
  opacity: 1;
}

.video-card:hover .video-card-img {
  transform: scale(1.06);
}

/* Duration Tag */
.video-duration {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  z-index: 2;
  font-family: monospace;
}

/* Play Icon Overlay */
.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  transition: background var(--transition-fast);
  z-index: 2;
}

.video-play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.6);
  transition: transform var(--transition-normal), background var(--transition-fast);
}

.video-play-btn-circle svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
  margin-left: 3px;
}

.video-card:hover .video-play-btn-circle {
  transform: scale(1.15);
  background: #f43f5e;
}

.video-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 3;
}

.video-card:hover .video-card-overlay {
  opacity: 1;
}

.btn-watch-action {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.5);
}

/* Video Card Details */
.video-card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--bg-surface);
  flex: 1;
}

.video-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* ==========================================================================
   INFINITE SCROLL LOADER & SENTINEL
   ========================================================================== */
.infinite-sentinel {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2.5rem 0 3.5rem 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.btn-load-more:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.btn-load-more svg {
  transition: transform var(--transition-fast);
}

.btn-load-more:hover svg {
  transform: translateY(2px);
}

.loading-spinner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.spinner-icon {
  width: 26px;
  height: 26px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Shimmer Animation */
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   DEDICATED SPA VIEWS (Play View & Watch View)
   ========================================================================== */
.spa-view {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.spa-view.active {
  display: block;
}

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

/* Navigation Breadcrumb Bar */
.view-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  gap: 1rem;
}

@media (max-width: 640px) {
  .view-nav-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }
  .breadcrumb-trail {
    font-size: 0.78rem;
    flex-wrap: wrap;
  }
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-trail a {
  color: var(--text-secondary);
}

.breadcrumb-trail a:hover {
  color: var(--text-primary);
}

.breadcrumb-trail .current-crumb {
  color: var(--accent-cyan);
  font-weight: 600;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2-Column AdX Layout for Play & Watch */
.detail-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1080px) {
  .detail-layout-grid {
    grid-template-columns: 100%;
    gap: 1.5rem;
  }
  .sidebar-sticky-col {
    position: static !important;
    top: auto !important;
    width: 100% !important;
  }
}

/* Main Content Area */
.main-stage-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 16:9 Game / Video Player Wrapper */
.player-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Strict 16:9 */
  background: #000000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.player-frame-wrapper.theater-mode {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 72px);
  z-index: 95;
  border-radius: 0;
  border: none;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Dedicated Quick Player Controls Bar (Directly Under Iframe) */
.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  margin-top: -0.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
}

.controls-bar-left,
.controls-bar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .player-controls-bar {
    padding: 0.6rem;
    gap: 0.5rem;
    margin-top: -0.5rem;
  }
  .controls-bar-left,
  .controls-bar-right {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }
  .controls-bar-left .btn-fullscreen-action {
    grid-column: span 2;
  }
}

/* Game Title & Engagement Bar */
.stage-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .stage-info-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    gap: 1rem;
  }
}

.stage-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.stage-title-box h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

@media (max-width: 640px) {
  .stage-title-box h1 {
    font-size: 1.25rem;
    line-height: 1.35;
  }
}

.stage-stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .stage-stats-row {
    font-size: 0.78rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

.stage-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .stage-actions-group {
    width: 100%;
    margin-top: 0.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .stage-actions-group .btn-fullscreen-action {
    grid-column: span 2;
  }
}

.stage-action-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

@media (max-width: 640px) {
  .stage-action-btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
  }
}

.stage-action-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.btn-fullscreen-action {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-fullscreen-action:hover {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.6);
}

/* Native Fullscreen Container */
.player-frame-wrapper:fullscreen,
.player-frame-wrapper:-webkit-full-screen,
.player-frame-wrapper:-moz-full-screen,
.player-frame-wrapper:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  aspect-ratio: auto !important;
  background: #000000;
}

/* Game Controls Instructions Guide */
.controls-guide-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

@media (max-width: 640px) {
  .controls-guide-box {
    padding: 0.85rem;
  }
}

.controls-guide-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .controls-list-grid { grid-template-columns: 1fr; }
}

.control-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  min-width: 0;
}

.control-key {
  background: #334155;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  border: 1px solid #475569;
  box-shadow: 0 2px 0 #1e293b;
  flex-shrink: 0;
}

.control-action {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: 8px;
}

/* Description Text */
.stage-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #cbd5e1;
}

/* Sticky Sidebar (AdX Optimized 300x250/300x600) */
.sidebar-sticky-col {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

@media (max-width: 640px) {
  .sidebar-widget-card {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
}

.sidebar-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.side-rec-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.side-rec-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.side-rec-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

/* Watch View Dedicated Games Section */
.watch-games-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .watch-games-section {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
  }
}

.side-rec-info {
  flex: 1;
  min-width: 0;
}

.side-rec-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-rec-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   POLICY & COMPLIANCE MODALS (AdX Mandatory)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  line-height: 1.7;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.modal-body h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem 0;
}

.modal-body p {
  margin-bottom: 0.85rem;
}

/* ==========================================================================
   FOOTER (AdX Trust & Compliance)
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links-list a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  cursor: pointer;
}

.footer-links-list a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
