/* =============================================================================
   ZAMS CINEMA GAMING HUB 3.0 — NETFLIX / PLAYSTATION 5 / STEAM LOOK
   Desktop + Mobile App Experience + Full Admin Studio Compatibility
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg-dark: #07090e;
  --bg-2: #0d111a;
  --bg-surface: rgba(16, 20, 32, 0.86);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --primary: #6366f1;
  --text: #f7f9fc;
  --text-2: rgba(235, 241, 252, 0.74);
  --text-muted: rgba(215, 224, 242, 0.50);
  --radius: 14px;
  --blur-val: 18px;
  --glow-display: block;
  --hero-rgb: 34, 211, 238;
  --hero-rgb2: 59, 130, 246;
  --font-body: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Bebas Neue', 'Outfit', sans-serif;
  --font-cards: 'Bebas Neue', 'Outfit', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease;
}

/* Subtle cinema film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }

/* PS5 Dynamic Ambient Aura */
.hero-ambient-bleed {
  display: var(--glow-display, block);
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 135vw;
  height: 780px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 64% 58% at 64% 24%, rgba(var(--hero-rgb), 0.25), transparent 72%),
    radial-gradient(ellipse 48% 44% at 24% 38%, rgba(var(--hero-rgb2), 0.14), transparent 70%);
  transition: background 0.7s ease;
}

#overlayCanvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  overflow: hidden;
}

/* =============================================================================
   FLOATING CINEMA NAVBAR
   ============================================================================= */
.cinema-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  padding: 0 clamp(16px, 3.8vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 600;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.90) 0%, rgba(7, 9, 14, 0.36) 66%, transparent 100%);
  border-bottom: 1px solid transparent;
  transition: background 0.32s var(--ease), backdrop-filter 0.32s var(--ease), border-color 0.32s ease;
}
.cinema-nav.scrolled {
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
  color: #07090e;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 6px 24px rgba(var(--hero-rgb), 0.36);
  transition: transform 0.22s var(--ease), box-shadow 0.45s ease;
}
.nav-brand:hover .brand-mark { transform: scale(1.06); }
.brand-word {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 20%, rgba(255,255,255,0.72) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  background: transparent;
  border: 0;
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.live-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDot 1.8s infinite;
}
.live-pill-dot.green {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Direct Room-Code Pill in Navbar */
.code-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px 3px 3px 12px;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.code-pill:focus-within {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.13);
}
.code-pill input {
  width: 62px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.code-pill input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.code-go {
  border: 0;
  background: #fff;
  color: #07090e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.code-go:hover { transform: scale(1.04); }

.nav-btn-icon {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.065);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  backdrop-filter: blur(12px);
}
.nav-btn-icon:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.30);
  transform: translateY(-1px);
}
.nav-btn-icon.active {
  background: rgba(99, 102, 241, 0.24);
  border-color: rgba(129, 140, 248, 0.55);
}
.nav-btn-icon.lang-btn {
  width: auto;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.coin-chip {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fde68a;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.18s ease;
}
.coin-chip:hover { background: rgba(245, 158, 11, 0.24); }

.user-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  backdrop-filter: blur(12px);
}
.user-pill-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }
.user-pill-wins {
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  padding: 2px 7px;
  border-radius: 999px;
}

/* =============================================================================
   FULL-BLEED PS5 / NETFLIX HERO STAGE
   ============================================================================= */
.hero-stage {
  position: relative;
  width: 100%;
  min-height: clamp(500px, 74vh, 740px);
  display: flex;
  align-items: flex-end;
  padding: 108px clamp(16px, 3.8vw, 52px) 52px;
  overflow: hidden;
  isolation: isolate;
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #07090e;
}
.hero-art-layer {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  transition: opacity 0.45s var(--ease), transform 0.9s var(--ease);
}
.hero-art-layer.is-entering {
  animation: heroArtFadeIn 0.52s var(--ease);
}
@keyframes heroArtFadeIn {
  from { opacity: 0.25; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}
.hero-art-layer svg, .hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 9, 14, 0.96) 0%, rgba(7, 9, 14, 0.82) 32%, rgba(7, 9, 14, 0.25) 62%, rgba(7, 9, 14, 0.12) 100%),
    linear-gradient(0deg, #07090e 0%, rgba(7, 9, 14, 0.84) 17%, rgba(7, 9, 14, 0.10) 52%, rgba(7, 9, 14, 0.48) 100%);
}

.hero-inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.hero-copy {
  max-width: 610px;
  animation: heroFadeIn 0.4s var(--ease);
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(var(--hero-rgb), 0.22);
  border: 1px solid rgba(var(--hero-rgb), 0.50);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #a7f3d0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 6.8vw, 90px);
  line-height: 0.94;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.72);
}

.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 14px;
}
.hero-meta-pill {
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.20);
  font-size: 12px;
  color: #fff;
  background: rgba(255,255,255,0.07);
}
.hero-meta-sep { opacity: 0.35; }

.hero-desc {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(240, 245, 255, 0.85);
  margin-bottom: 24px;
  max-width: 540px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.btn-play {
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  background: #ffffff;
  color: #07090e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.46), 0 0 26px rgba(var(--hero-rgb), 0.32);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-play:hover {
  transform: scale(1.045);
  box-shadow: 0 14px 38px rgba(0,0,0,0.58), 0 0 38px rgba(var(--hero-rgb), 0.52);
}
.btn-play.locked {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.65);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-play.locked:hover { transform: none; }

.btn-glass {
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s var(--ease), border-color 0.18s ease;
}
.btn-glass:hover {
  background: rgba(255,255,255,0.19);
  border-color: rgba(255,255,255,0.38);
  transform: translateY(-1px);
}

.btn-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s ease, color 0.18s ease;
}
.btn-circle:hover { background: rgba(255,255,255,0.2); transform: scale(1.07); }
.btn-circle.fav { color: #fbbf24; border-color: rgba(251,191,36,0.55); background: rgba(251,191,36,0.16); }

/* Right Hero Spotlight Thumbnails + Arrow Controls + Idle Auto-Scroll Bar */
.hero-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
  width: min(614px, 46vw);
  max-width: 100%;
  min-width: 0;
}
.hero-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.hero-rail-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hero-rail-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-rail-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-progress-track {
  display: block;
  flex: 1;
  min-width: 44px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}
.hero-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--hero-rgb), 0.85), #ffffff);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  transition: opacity 0.2s ease;
}
.hero-stage.is-auto-paused .hero-progress-fill {
  opacity: 0.45;
}
.hero-nav-arrows {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.hero-arrow {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.20);
}
.hero-arrow:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.42);
}
.hero-thumbs {
  position: relative;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 6px 2px 6px;
  margin: -6px -2px;
}
.hero-thumbs::-webkit-scrollbar { display: none; }
.hero-thumb {
  flex: 0 0 114px;
  width: 114px;
  height: 66px;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.14);
  opacity: 0.62;
  background: #0d111a;
  transition: transform 0.24s var(--ease), opacity 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}
.hero-thumb:hover { opacity: 0.94; transform: translateY(-3px); }
.hero-thumb.active {
  opacity: 1;
  border-color: #fff;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 28px rgba(0,0,0,0.56), 0 0 20px rgba(var(--hero-rgb), 0.45);
}
.hero-thumb svg, .hero-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,9,14,0.88) 0%, transparent 65%);
}
.hero-thumb-name {
  position: absolute;
  z-index: 2;
  left: 7px; right: 7px; bottom: 5px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95);
}

/* =============================================================================
   SUB-HEADER TOOLBAR (CATEGORY PILLS + LIVE STATS + FORMAT TOGGLE)
   ============================================================================= */
.hub-body {
  position: relative;
  z-index: 3;
  margin-top: -18px;
  padding-bottom: 92px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.hub-toolbar-wrap {
  padding: 0 clamp(16px, 3.8vw, 52px);
}
.hub-toolbar {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.category-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.category-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.05);
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}
.cat-pill:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cat-pill.active {
  background: #fff;
  color: #07090e;
  border-color: #fff;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.live-visitors-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
  font-size: 12.5px;
  font-weight: 700;
}

.fmt-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 3px;
}
.fmt-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fmt-btn.active { background: rgba(255,255,255,0.16); color: #fff; }

/* =============================================================================
   HORIZONTAL CINEMA SHELVES (NETFLIX / PS5 / STEAM)
   ============================================================================= */
.shelf {
  position: relative;
  padding: 0 clamp(16px, 3.8vw, 52px);
}
.shelf-head {
  max-width: 1500px;
  margin: 0 auto 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.shelf-title {
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.shelf-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  white-space: nowrap;
}
.shelf-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}
.shelf-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.shelf-arrow:hover { background: rgba(255,255,255,0.18); transform: scale(1.06); }

.shelf-track-wrap {
  max-width: 1500px;
  margin: 0 auto;
  position: relative;
}
.shelf-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 12px 4px 24px;
  margin: -12px -4px -24px;
  scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }

/* Filtered Grid Mode (when category or search is active) */
.filtered-grid-section {
  padding: 0 clamp(16px, 3.8vw, 52px);
}
.filtered-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 20px;
}
body.wide-posters .filtered-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.filtered-grid .poster-card {
  flex: none;
  width: 100%;
}

/* =============================================================================
   LIVE LOBBIES STRIP
   ============================================================================= */
.live-lobbies-section { display: none; }
.live-lobbies-section.has-lobbies { display: block; }

.live-card {
  flex: 0 0 326px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(15, 20, 32, 0.88);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.26s var(--ease), border-color 0.24s ease, box-shadow 0.26s ease;
}
.live-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(255,255,255,0.38);
  box-shadow: 0 18px 40px rgba(0,0,0,0.58);
}
.live-mini-cover {
  width: 66px; height: 88px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0d111a;
  box-shadow: 0 8px 20px rgba(0,0,0,0.48);
}
.live-mini-cover svg, .live-mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-info { flex: 1; min-width: 0; }
.live-badge-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
  padding: 2px 7px;
  border-radius: 5px;
}
.live-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(255,255,255,0.08);
  padding: 2px 7px;
  border-radius: 5px;
}
.live-game-name {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.live-meta { font-size: 12.5px; color: var(--text-2); margin-bottom: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #07090e;
  background: #fff;
  padding: 5px 12px;
  border-radius: 999px;
}

/* =============================================================================
   2:3 PORTRAIT POSTER CARDS & 16:9 WIDESCREEN CARDS
   ============================================================================= */
.poster-card, .wide-card {
  position: relative;
  border-radius: var(--radius, 14px);
  overflow: hidden;
  cursor: pointer;
  background: #0d121d;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
  transition: transform 0.34s var(--ease), box-shadow 0.34s var(--ease), border-color 0.25s ease;
  scroll-snap-align: start;
  flex-shrink: 0;
  user-select: none;
}
.poster-card {
  flex: 0 0 206px;
  aspect-ratio: 2 / 3;
}
.wide-card {
  flex: 0 0 360px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
}
body.wide-posters .poster-card {
  flex: 0 0 310px;
  aspect-ratio: 16 / 10;
}

.poster-card:hover, .wide-card:hover {
  transform: translateY(-9px) scale(1.045);
  z-index: 20;
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.75),
    0 0 34px rgba(var(--card-rgb, 56, 189, 248), 0.38);
}

.poster-card.wip-locked, .wide-card.wip-locked {
  filter: saturate(0.45) brightness(0.75);
}

.poster-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.55s var(--ease);
}
.poster-card:hover .poster-art, .wide-card:hover .poster-art { transform: scale(1.06); }
.poster-art svg, .poster-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  display: block;
}
.wide-card .poster-art img { object-position: 72% 35%; }

/* Soft gloss highlight */
.poster-card::before, .wide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, transparent 35%, transparent 68%, rgba(0,0,0,0.42) 100%);
}

.poster-top-bar {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.poster-badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.poster-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(7, 9, 14, 0.74);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  color: #fff;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-badge.new { background: linear-gradient(135deg, #22d3ee, #3b82f6); border-color: transparent; color: #050811; }
.poster-badge.hot { background: linear-gradient(135deg, #f97316, #ef4444); border-color: transparent; color: #fff; }
.poster-badge.wip { background: rgba(245, 158, 11, 0.28); border-color: rgba(251, 191, 36, 0.55); color: #fde68a; }

.poster-live-pill {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(6, 78, 59, 0.82);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
  backdrop-filter: blur(6px);
}
.poster-live-pill.has-live { display: inline-flex; }

.poster-fav {
  pointer-events: auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(7, 9, 14, 0.60);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.82);
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}
.poster-card:hover .poster-fav, .wide-card:hover .poster-fav, .poster-fav.is-fav { opacity: 1; }
.poster-fav.is-fav { color: #fbbf24; border-color: rgba(251,191,36,0.6); background: rgba(20,14,4,0.78); }
.poster-fav:hover { transform: scale(1.12); }

/* Admin Quick-Edit Button on Poster (visible only in Admin Edit Mode) */
.card-edit-btn {
  display: none;
  position: absolute;
  top: 46px; right: 10px;
  z-index: 6;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.7);
  background: rgba(15, 23, 42, 0.92);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
body.is-admin:not(.preview-mode) .card-edit-btn { display: inline-flex; }
.card-edit-btn:hover { background: #6366f1; color: #fff; }

.poster-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  padding: 56px 14px 13px;
  background: linear-gradient(0deg, rgba(6, 8, 13, 0.97) 0%, rgba(6, 8, 13, 0.76) 56%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wide-card .poster-footer { padding: 42px 18px 14px; }

.poster-title {
  font-family: var(--font-cards);
  font-size: 26px;
  line-height: 0.97;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.95);
}
.wide-card .poster-title { font-size: 29px; }

.poster-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(235, 241, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.poster-hover-dock {
  display: flex;
  gap: 7px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.26s var(--ease), opacity 0.22s ease, margin-top 0.22s ease;
}
.poster-card:hover .poster-hover-dock, .wide-card:hover .poster-hover-dock {
  max-height: 44px;
  opacity: 1;
  margin-top: 6px;
}
.poster-play-mini {
  flex: 1;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #07090e;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.poster-info-mini {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.cinema-footer {
  margin-top: auto;
  padding: 28px clamp(16px, 3.8vw, 52px) 36px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  position: relative;
  z-index: 3;
}
.cinema-footer a { color: var(--text-2); text-decoration: none; }
.cinema-footer a:hover { color: #fff; }

/* =============================================================================
   MOBILE FLOATING BOTTOM TABBAR (APP EXPERIENCE <= 768px)
   ============================================================================= */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 10px; right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 650;
  background: rgba(11, 15, 24, 0.90);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 6px 6px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72);
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.m-tab {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 7px 4px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  transition: color 0.16s ease, background 0.16s ease;
}
.m-tab-ico { font-size: 18px; line-height: 1; }
.m-tab.active { color: #fff; background: rgba(255,255,255,0.12); }
.m-tab.code-accent {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.m-tab-dot {
  display: none;
  position: absolute;
  top: 5px; right: 16px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.m-tab-dot.show { display: block; }

/* =============================================================================
   MODALS: GAME DETAIL (BOTTOM SHEET ON MOBILE) + SPOTLIGHT + CODE-JOIN
   ============================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(4, 6, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-overlay.open { display: flex; animation: modalFade 0.2s ease; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.detail-card {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  background: #0b0f18;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 34px 90px rgba(0,0,0,0.92);
}
.detail-banner {
  position: relative;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #07090e;
}
.detail-banner-art, .detail-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.detail-banner-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.detail-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b0f18 4%, rgba(11,15,24,0.52) 55%, rgba(11,15,24,0.28) 100%);
}
.modal-close-x {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 6;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(7, 9, 14, 0.78);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.detail-banner-copy {
  position: relative;
  padding: 64px 26px 20px;
  z-index: 4;
}
.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 54px);
  line-height: 0.96;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.detail-body {
  padding: 10px 26px 26px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}
.detail-feat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.detail-feat {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.45;
}
.detail-feat .chk { color: #34d399; font-weight: 900; flex-shrink: 0; }
.detail-side-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 15px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  height: fit-content;
}
.detail-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
}
.detail-stat-row strong { color: #fff; }

/* Spotlight Search Overlay */
.spotlight-box {
  width: min(720px, 100%);
  border-radius: 22px;
  background: rgba(13, 17, 26, 0.97);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 32px 88px rgba(0,0,0,0.88);
  overflow: hidden;
  align-self: flex-start;
  margin-top: 8vh;
}
.spotlight-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.spotlight-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
}
.spotlight-results {
  padding: 14px;
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.spot-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.spot-item:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.24); }
.spot-thumb { width: 42px; height: 58px; border-radius: 7px; overflow: hidden; flex-shrink: 0; background: #0a0e18; }
.spot-thumb svg, .spot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Mobile Code-Join Sheet */
.code-sheet {
  width: min(460px, 100%);
  border-radius: 24px;
  background: #0f1420;
  border: 1px solid rgba(255,255,255,0.16);
  padding: 24px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.85);
}
.code-sheet-input {
  width: 100%;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  outline: none;
}
.code-sheet-input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,0.25); }

/* =============================================================================
   EXISTING MODALS (ACCOUNT, LEADERBOARD, ROULETTE, ADMIN STUDIO, INSPECTORS)
   ============================================================================= */
.modal-dialog {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0f1420;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.85);
  color: #fff;
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.drawer-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 16px;
}
.drawer-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 11px;
  padding: 10px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.form-input:focus { border-color: #6366f1; }
select.form-input option { background: #0f1420; color: #fff; }

.a-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.a-btn:hover { background: rgba(255,255,255,0.14); }
.a-btn.save-btn { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: #fff; }
.a-btn.highlight-btn { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; }
.a-btn.danger-btn { background: rgba(239, 68, 68, 0.16); border-color: rgba(239,68,68,0.45); color: #fca5a5; }
.a-btn.danger-btn:hover { background: rgba(239, 68, 68, 0.30); color: #fff; }

.auth-tab-bar {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.auth-tab-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.auth-tab-btn.active { background: #fff; color: #07090e; }

.status-alert-box {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.status-alert-error { background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }

.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.leaderboard-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.leaderboard-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.leaderboard-table tr:hover td { background: rgba(255,255,255,0.03); }
.rank-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,0.06); font-weight: 800; font-size: 12px; }
.rank-1 { background: rgba(245,158,11,0.22); }
.rank-2 { background: rgba(148,163,184,0.22); }
.rank-3 { background: rgba(180,83,9,0.25); }

.roulette-box { padding: 24px; text-align: center; }
.roulette-slot {
  font-size: 24px;
  font-weight: 900;
  padding: 22px 16px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  margin-bottom: 18px;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(4, 6, 11, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.login-modal.open { display: flex; }
.login-card {
  width: min(420px, 100%);
  background: #0f1420;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,0.85);
}

/* =============================================================================
   ADMIN STUDIO SIDEBAR, DRAWER & FREEFORM OVERLAYS
   ============================================================================= */
.admin-bar {
  display: none;
  position: fixed;
  left: 0; top: 72px; bottom: 0;
  width: 264px;
  z-index: 750;
  background: rgba(11, 15, 24, 0.96);
  border-right: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
  flex-direction: column;
  transition: transform 0.28s var(--ease);
}
body.is-admin .admin-bar { display: flex; }
body.is-admin.admin-bar-collapsed .admin-bar { transform: translateX(-100%); }
.admin-sidebar-reopen {
  display: none;
  position: fixed;
  left: 0; top: 88px;
  z-index: 760;
  padding: 8px 12px;
  border-radius: 0 10px 10px 0;
  border: 1px solid rgba(239,68,68,0.5);
  border-left: 0;
  background: rgba(15, 20, 32, 0.94);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
body.is-admin.admin-bar-collapsed .admin-sidebar-reopen { display: inline-flex; }
.admin-bar-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-bar-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.admin-bar-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.admin-collapse-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: #fff; cursor: pointer;
}
.admin-bar-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.admin-sec-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.admin-btn-col { display: flex; flex-direction: column; gap: 7px; }
.admin-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.a-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }
#selectedItemActions { display: none; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3); }
#selectedItemActions.active { display: flex; }

.admin-drawer {
  position: fixed;
  top: 0; right: -440px; bottom: 0;
  width: min(420px, 95vw);
  z-index: 9200;
  background: #0d111a;
  border-left: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  transition: right 0.3s var(--ease);
  box-shadow: -20px 0 60px rgba(0,0,0,0.75);
}
.admin-drawer.open { right: 0; }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h2 { font-size: 16px; font-weight: 800; }
.drawer-nav { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); overflow-x: auto; }
.dn-tab { padding: 7px 11px; border-radius: 8px; border: 0; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.dn-tab.active { background: #6366f1; color: #fff; }
.drawer-content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.d-sec { display: none; }
.d-sec.active { display: block; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; gap: 8px; }
.theme-presets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.theme-preset-btn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.theme-preset-btn:hover { background: rgba(255,255,255,0.11); }
.preset-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.color-row, .slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type="range"] { flex: 1; accent-color: #6366f1; }
.slider-val { font-size: 12px; font-weight: 700; color: var(--text-2); min-width: 42px; text-align: right; }
.effects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.effect-check-label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; cursor: pointer; }
.feature-tag { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); margin-bottom: 6px; font-size: 13px; }
.feature-tag button { border: 0; background: transparent; color: #f87171; cursor: pointer; font-weight: 800; }

/* Freeform Overlay Canvas Items */
.overlay-item { position: absolute; pointer-events: none; user-select: none; }
body.is-admin:not(.preview-mode) .overlay-item { pointer-events: auto; cursor: move; }
body.is-admin:not(.preview-mode) .overlay-item.selected { outline: 2px dashed #818cf8; outline-offset: 4px; }
.overlay-handle { display: none; position: absolute; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; cursor: pointer; }
body.is-admin:not(.preview-mode) .overlay-item.selected .overlay-handle { display: flex; }
.oh-rot { top: -28px; left: 50%; transform: translateX(-50%); background: #fbbf24; color: #000; }
.oh-se { right: -12px; bottom: -12px; background: #6366f1; color: #fff; cursor: nwse-resize; }
.oh-del { top: -12px; right: -12px; background: #ef4444; color: #fff; }
.overlay-text-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 10px; }

/* Stackable FX Animations */
.fx-float, .anim-float { animation: floatAnim 3s ease-in-out infinite; }
@keyframes floatAnim { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.fx-bounce, .anim-bounce { animation: bounceAnim 1.4s ease infinite; }
@keyframes bounceAnim { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.fx-wiggle, .anim-wiggle { animation: wiggleAnim 1.8s ease-in-out infinite; }
@keyframes wiggleAnim { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.fx-pulse-glow, .anim-pulse-glow { animation: pulseGlow 2.4s ease-in-out infinite; }
@keyframes pulseGlow { 0%,100% { filter: drop-shadow(0 0 8px rgba(99,102,241,0.5)); } 50% { filter: drop-shadow(0 0 24px rgba(56,189,248,0.9)); } }
.fx-neon-flicker, .anim-neon-flicker { animation: neonFlicker 3s infinite; }
@keyframes neonFlicker { 0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; } 20%,24%,55% { opacity: 0.45; } }
.fx-shimmer, .anim-shimmer { background: linear-gradient(90deg, #fff 0%, #7dd3fc 50%, #fff 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: textShimmer 2.8s linear infinite; }
@keyframes textShimmer { to { background-position: 200% center; } }
.fx-gradient-flow, .anim-gradient-flow { background: linear-gradient(90deg, #38bdf8, #818cf8, #f472b6, #38bdf8); background-size: 240% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: textShimmer 5s linear infinite; }
.fx-cyber-glitch, .anim-cyber-glitch { animation: cyberGlitch 2.2s infinite; }
@keyframes cyberGlitch { 0%,92%,100% { transform: translate(0); } 94% { transform: translate(-2px, 1px); } 96% { transform: translate(2px, -1px); } }

/* Toast */
.toast-pill {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 20, 32, 0.96);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
  z-index: 10000;
}
.toast-pill.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================================================
   RESPONSIVE / MOBILE-FIRST POLISH (<= 980px & <= 768px)
   ============================================================================= */
@media (max-width: 1220px) {
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .hero-rail {
    display: flex;
    width: 100%;
  }
  .nav-left { gap: 16px; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 7px 10px; font-size: 13px; }
  #tvModeBtn, #soundToggleBtn { display: none !important; }
}

@media (max-width: 768px) {
  .cinema-nav {
    height: 62px;
    padding: 0 14px;
  }
  .nav-links, .code-pill, .desktop-only-nav { display: none !important; }
  .mobile-tabbar { display: grid; }
  .hub-body { padding-bottom: 106px; gap: 30px; }
  .cinema-footer { padding-bottom: 100px; }
  .toast-pill { bottom: 92px; }

  /* Mobile Compact Cinema Hero */
  .hero-stage {
    min-height: 58vh;
    padding: 82px 16px 34px;
  }
  .hero-backdrop img { object-position: 62% 28%; }
  .hero-vignette {
    background:
      linear-gradient(0deg, #07090e 0%, rgba(7,9,14,0.88) 28%, rgba(7,9,14,0.34) 64%, rgba(7,9,14,0.58) 100%);
  }
  .hero-title { font-size: clamp(42px, 12vw, 58px); margin-bottom: 10px; }
  .hero-desc { font-size: 14px; -webkit-line-clamp: 2; margin-bottom: 18px; }
  .hero-actions { width: 100%; gap: 9px; }
  .hero-actions .btn-play { flex: 1; height: 46px; font-size: 14.5px; }
  .hero-actions .btn-glass { height: 46px; padding: 0 16px; font-size: 13.5px; }
  .hero-actions .btn-circle { width: 46px; height: 46px; }
  .hero-rail { margin-top: 2px; }
  .hero-thumbs { display: none; }
  .hero-arrow { width: 38px; height: 38px; font-size: 19px; }

  /* Mobile Swipe Shelves with natural right-edge Peek */
  .shelf-controls, .fmt-toggle { display: none; }
  .shelf { padding: 0 0 0 14px; }
  .shelf-head { padding-right: 14px; margin-bottom: 10px; }
  .shelf-track {
    gap: 12px;
    padding: 8px 18px 18px 0;
    margin: -8px 0 -18px 0;
    scroll-snap-type: x mandatory;
  }
  .poster-card { flex: 0 0 43vw; max-width: 184px; }
  .wide-card { flex: 0 0 78vw; max-width: 320px; }
  .live-card { flex: 0 0 82vw; max-width: 326px; }
  .poster-title { font-size: 22px; }
  .poster-hover-dock { display: none !important; }
  .poster-fav { opacity: 0.92; width: 28px; height: 28px; font-size: 13px; }
  .poster-card:hover, .wide-card:hover { transform: none; }

  .filtered-grid-section { padding: 0 14px; }
  .filtered-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  /* Mobile Bottom Sheet for Game Detail Modal */
  #gameDetailModal {
    align-items: flex-end;
    padding: 0;
    background: rgba(4, 6, 11, 0.92);
  }
  #gameDetailModal .detail-card {
    border-radius: 24px 24px 0 0;
    max-height: 88vh;
    border-bottom: 0;
    background: #0b0f18;
  }
  .detail-banner { min-height: 215px; height: auto; }
  .detail-banner-copy { padding: 54px 18px 16px; }
  .detail-body { grid-template-columns: 1fr; padding: 8px 18px max(28px, env(safe-area-inset-bottom)); gap: 16px; background: #0b0f18; }

  /* Mobile Bottom Sheet for Code-Join */
  #mobileCodeModal {
    align-items: flex-end;
    padding: 0;
  }
  #mobileCodeModal .code-sheet {
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .spotlight-box { margin-top: 2vh; }
  .spotlight-results { grid-template-columns: 1fr; }
}
