:root {
  --bg-deep: #05070f;
  --bg-surface: #0b101e;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-bg-heavy: rgba(11, 16, 30, 0.88);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(56, 189, 248, 0.45);

  --neon-cyan: #06b6d4;
  --neon-blue: #3b82f6;
  --neon-indigo: #6366f1;
  --neon-violet: #8b5cf6;
  --neon-rose: #f43f5e;
  --neon-emerald: #10b981;
  --neon-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --shadow-card: 0 14px 34px -8px rgba(0, 0, 0, 0.65);
  --shadow-neon: 0 0 25px rgba(6, 182, 212, 0.32);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: clip;
  line-height: 1.5;
}

/* ==================== AMBIENT NEON BACKGROUND ==================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, #0f172a 0%, #05070f 75%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-cyan {
  width: 520px;
  height: 520px;
  background: var(--neon-cyan);
  top: -140px;
  left: -100px;
}

.orb-indigo {
  width: 600px;
  height: 600px;
  background: var(--neon-indigo);
  top: 22%;
  right: -180px;
  animation-delay: -6s;
}

.orb-rose {
  width: 460px;
  height: 460px;
  background: var(--neon-violet);
  bottom: -120px;
  left: 25%;
  animation-delay: -11s;
}

.ambient-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(45px, 35px) scale(1.12);
  }
}

/* ==================== GLASSMORPHISM UTILITIES ==================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.glass-card {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.hidden {
  display: none !important;
}

.text-emerald {
  color: #34d399 !important;
}

/* ==================== STICKY GLASS NAVBAR ==================== */
.cinema-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 2rem;
  background: rgba(7, 10, 20, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
}

.play-triangle {
  font-size: 1rem;
  color: #fff;
  margin-left: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.neon-gradient-text {
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.18);
}

.nav-pill-count {
  background: rgba(244, 63, 94, 0.25);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
  font-size: 0.7rem;
  padding: 0.05rem 0.45rem;
  border-radius: 99px;
}

.nav-center {
  flex: 1;
  max-width: 440px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.6rem 2.6rem 0.6rem 2.4rem;
  border-radius: 99px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--neon-cyan);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.search-shortcut {
  position: absolute;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  pointer-events: none;
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.queue-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.queue-status-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--text-main);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
}

.pulse-dot.active-crawl {
  background: var(--neon-amber);
  box-shadow: 0 0 12px var(--neon-amber);
  animation: pulseGlow 1.1s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

.btn-neon-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: #fff;
  border: none;
  padding: 0.58rem 1.1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-neon-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);
}

.btn-glass-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  text-decoration: none;
  padding: 0.52rem 0.9rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-glass-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ==================== MAIN CONTAINER ==================== */
.cinema-main {
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ==================== 1. HERO BILLBOARD (NETFLIX STYLE) ==================== */
.hero-billboard {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2.75rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  background: #080d1a;
}

.hero-backdrop-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(26px) brightness(0.45) saturate(1.35);
  transform: scale(1.12);
  transition: background-image 0.5s ease, transform 6s ease;
}

.hero-billboard:hover .hero-backdrop-img {
  transform: scale(1.16);
}

.hero-right-showcase {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.hero-poster-frame {
  position: relative;
  width: 390px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.78), 0 0 26px rgba(6, 182, 212, 0.22);
  background: #060913;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hero-poster-frame:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--neon-cyan);
}

.hero-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-poster-play-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.65);
  pointer-events: none;
}

.hero-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(5, 7, 15, 0.88);
  backdrop-filter: blur(12px);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 15, 0.96) 0%, rgba(5, 7, 15, 0.78) 48%, rgba(5, 7, 15, 0.25) 100%),
    linear-gradient(0deg, rgba(5, 7, 15, 0.98) 0%, rgba(5, 7, 15, 0.3) 50%, rgba(5, 7, 15, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 0.28rem 0.75rem;
  border-radius: 99px;
}

.meta-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.pill-cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.pill-violet {
  background: rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.pill-glass {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-title {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  max-width: 620px;
  line-height: 1.6;
}

.hero-stats-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dot-sep {
  opacity: 0.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.btn-hero-play {
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  color: #05070f;
  border: none;
  padding: 0.8rem 1.65rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-hero-play:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  color: #fff;
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.55);
}

.btn-hero-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.78rem 1.2rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-hero-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.hero-QuickStats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius-md);
}

.qs-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.qs-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.qs-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.qs-divider {
  width: 1px;
  height: 34px;
  background: var(--glass-border);
}

/* ==================== 2. THEATER PLAYER SECTION ==================== */
.theater-section {
  position: relative;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.section-neon-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan);
}

.section-title-group h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.now-playing-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.theater-mode-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-tool {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: all 0.2s;
}

.btn-tool:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-tool.active {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.45);
}

.theater-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.5rem;
  align-items: start;
  transition: all 0.3s ease;
}

.theater-grid.theater-expanded {
  grid-template-columns: 1fr;
}

.player-stage-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.player-ambilight-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
}

.ambilight-canvas {
  position: absolute;
  inset: -18px;
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  z-index: 0;
  filter: blur(55px) saturate(220%);
  opacity: 0.72;
  pointer-events: none;
  border-radius: var(--radius-xl);
  transition: opacity 0.4s ease;
}

.ambilight-canvas.off {
  opacity: 0 !important;
}

.cinema-video-box {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.cinema-video-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Nerd Stats Overlay (YouTube style telemetry) */
.nerd-stats-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  width: 310px;
  background: rgba(7, 10, 20, 0.86);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.nerd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nerd-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.nerd-grid {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.nerd-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.nerd-row strong {
  color: #f8fafc;
}

.nerd-bitrate-bar-wrap {
  margin-top: 0.6rem;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.nerd-bitrate-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  transition: width 0.35s ease;
}

/* Error Banner inside Player */
.player-error-banner {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(5, 7, 15, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.err-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.err-icon {
  font-size: 2.2rem;
}

/* Player Info & Controls Bar */
.player-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
}

.playing-meta-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 240px;
  flex: 1;
}

.playing-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playing-title-row h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.btn-icon-subtle:hover {
  opacity: 1;
}

.playing-submeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mono-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  color: #93c5fd;
}

.playing-controls-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.control-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.65rem;
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.control-pill-group select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.control-pill-group select option {
  background: #0f172a;
  color: #fff;
}

.btn-action-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: all 0.2s;
}

.btn-action-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #fff;
}

/* ==================== UP NEXT PLAYLIST SIDEBAR ==================== */
.playlist-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 610px;
  overflow: hidden;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.playlist-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
}

.playlist-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-icon-glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-glass:hover {
  border-color: var(--neon-cyan);
  background: rgba(6, 182, 212, 0.15);
}

.up-next-list {
  padding: 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.up-next-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0.75rem;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
}

.up-next-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.up-next-item.active {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.45);
}

.un-thumb-wrap {
  position: relative;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

.un-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.un-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 4px;
}

.un-info {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  overflow: hidden;
}

.un-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.un-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==================== 3. VOD CATALOG & MOVIE CARDS ==================== */
.catalog-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
}

.filter-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.48rem 0.95rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.09);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(99, 102, 241, 0.25));
  color: #fff;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.22);
}

.chip-count {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.05rem 0.45rem;
  border-radius: 99px;
  font-size: 0.72rem;
}

.catalog-sort-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Movie Cards Grid */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.vod-card {
  position: relative;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.vod-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8), 0 0 24px rgba(6, 182, 212, 0.2);
}

.vod-card.is-playing {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.32);
}

.card-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080d19;
  overflow: hidden;
  cursor: pointer;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(5, 7, 15, 0.86);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.card-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.card-format-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.card-format-pill.hls {
  background: rgba(6, 182, 212, 0.85);
  color: #04131a;
}

.card-format-pill.mp4 {
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
}

.card-res-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(7, 10, 20, 0.82);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(5, 7, 15, 0.25) 0%, rgba(5, 7, 15, 0.65) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.vod-card:hover .card-play-overlay {
  opacity: 1;
}

.card-play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.65);
  transform: scale(0.88);
  transition: transform 0.25s ease;
}

.vod-card:hover .card-play-circle {
  transform: scale(1);
}

.card-bottom-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(5, 7, 15, 0.84);
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-watch-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 4;
}

.card-watch-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-rose));
}

.card-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.card-title:hover {
  color: #38bdf8;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-subinfo {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.18s;
}

.card-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.card-icon-btn.fav-active {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
}

.card-icon-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==================== LIGHTS OFF OVERLAY ==================== */
.lights-off-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.92);
  z-index: 50;
  backdrop-filter: blur(6px);
  transition: opacity 0.35s ease;
}

/* ==================== SLIDE-OVER CRAWLER DRAWER ==================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(6px);
  z-index: 150;
}

.crawler-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  z-index: 160;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(26px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.drawer-icon {
  font-size: 1.75rem;
}

.drawer-title h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.drawer-title p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-close-drawer {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
}

.drawer-body {
  padding: 1.35rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.crawl-form {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  background: rgba(7, 10, 20, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.62rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--neon-cyan);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-neon-full {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: #fff;
  border: none;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.35);
  transition: all 0.2s;
}

.btn-neon-full:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

.drawer-sub-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-glass-sm {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-glass-sm:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger-outline {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.45);
}

.drawer-feedback {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
}

.drawer-jobs-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-jobs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-jobs-header h4 {
  font-size: 0.9rem;
}

.drawer-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.job-card-mini {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.job-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.job-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-indigo));
  transition: width 0.3s ease;
}

.job-card-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ==================== MODAL & TOASTS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  width: min(440px, 100%);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

#renameForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#renameTitleInput {
  background: rgba(7, 10, 20, 0.9);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
}

#renameTitleInput:focus {
  border-color: var(--neon-cyan);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast-item {
  background: rgba(11, 16, 30, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: slideInToast 0.25s ease;
}

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

.empty-box {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
}

/* ==================== FOOTER ==================== */
.cinema-footer {
  border-top: 1px solid var(--glass-border);
  padding: 2rem;
  background: rgba(5, 7, 15, 0.8);
}

.footer-inner {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-brand strong {
  color: var(--text-main);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

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

/* ==================== AUTHENTICATION & USER PROFILE UI ==================== */
.auth-guest-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-auth-register {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #ddd6fe;
  padding: 0.52rem 0.95rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth-register:hover {
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-indigo));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}

.auth-user-box {
  display: inline-flex;
  align-items: center;
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.28rem 0.75rem 0.28rem 0.32rem;
  border-radius: 99px;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-pill:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.25);
}

.user-avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.1rem 0.42rem;
  border-radius: 99px;
  text-transform: uppercase;
}

.auth-modal-card {
  position: relative;
  width: min(490px, 100%);
  padding: 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 36px rgba(6, 182, 212, 0.16);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.auth-modal-header {
  text-align: center;
}

.auth-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.auth-modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: rgba(5, 7, 15, 0.75);
  padding: 0.32rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.58rem;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(99, 102, 241, 0.3));
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.auth-alert {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 2.5rem;
}

.btn-toggle-pw {
  position: absolute;
  right: 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
}

.btn-toggle-pw:hover {
  opacity: 1;
}

.profile-summary-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.profile-avatar-large {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.35);
  flex-shrink: 0;
}

.profile-summary-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-summary-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.profile-summary-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-badges-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1180px) {
  .theater-grid {
    grid-template-columns: 1fr;
  }
  .hero-right-showcase {
    display: none;
  }
}

@media (max-width: 860px) {
  .cinema-navbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }
  .nav-center {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .cinema-main {
    padding: 1rem 1rem 3rem;
  }
  .hero-billboard {
    padding: 1.75rem 1.4rem;
    min-height: 360px;
  }
  .hide-mobile {
    display: none;
  }
}

/* Text-first layout. Existing light, glass, hover and preview effects are retained. */
body.drawer-open {
  overflow: hidden;
}

button, input, select, summary {
  font: inherit;
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

:where(button, a, input, select, summary):focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
}

.cinema-navbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 440px) minmax(240px, 1fr);
  grid-template-areas: 'brand search actions' 'links links management';
  column-gap: 1.5rem;
  row-gap: 0.65rem;
  padding: 1rem max(2rem, calc((100vw - 1440px) / 2));
}

.nav-left {
  display: contents;
}

.brand-logo {
  grid-area: brand;
  width: fit-content;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-center {
  grid-area: search;
  width: 100%;
  max-width: none;
}

.search-box input {
  min-height: 44px;
  padding: 0.65rem 3.6rem 0.65rem 1rem;
  border-radius: 10px;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.btn-clear-search {
  width: auto;
  min-height: 36px;
  padding: 0 0.5rem;
  font-size: 0.75rem;
}

.nav-right {
  grid-area: actions;
  justify-content: flex-end;
  gap: 0.6rem;
  min-width: 0;
}

.nav-links {
  grid-area: links;
  grid-column: 1 / -1;
  min-width: 0;
  gap: 0.25rem;
  padding-right: 85px;
}

.cinema-navbar:has(.header-management.hidden) .nav-links {
  padding-right: 0;
}

.nav-link {
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  border-radius: 9px;
}

.header-management {
  grid-area: management;
  justify-self: end;
  z-index: 5;
}

.text-menu {
  position: relative;
}

.text-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.text-menu > summary::-webkit-details-marker {
  display: none;
}

.text-menu > summary:hover, .text-menu[open] > summary {
  color: var(--text-main);
  border-color: var(--glass-border-hover);
  background: rgba(6, 182, 212, 0.12);
}

.text-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 195px;
  padding: 0.4rem;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.text-menu-panel :is(button, a) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.8rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.text-menu-panel :is(button, a):hover {
  background: rgba(255, 255, 255, 0.08);
}

.text-menu-panel .delete-btn {
  color: #fca5a5;
}

.cinema-main {
  width: 100%;
  max-width: 1440px;
  gap: 2rem;
  padding-top: 1.75rem;
}

.hero-billboard {
  align-items: center;
  min-height: 300px;
  gap: 2.5rem;
  padding: 2.5rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
  max-width: 760px;
  gap: 1rem;
}

.hero-title {
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  overflow-wrap: anywhere;
}

.hero-featured-tag {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  letter-spacing: 0.08em;
}

.hero-right-showcase {
  display: flex;
  flex: 0 1 36%;
  min-width: 0;
}

.hero-poster-frame {
  width: 100%;
  padding: 0;
}

.hero-stats-inline {
  gap: 1rem;
  font-size: 0.8rem;
}

.hero-actions {
  gap: 0.6rem;
}

.hero-actions button {
  min-height: 46px;
}

.btn-hero-glass {
  padding: 0.7rem 1rem;
}

.btn-hero-glass[aria-pressed='true'] {
  border-color: var(--neon-rose);
  background: rgba(244, 63, 94, 0.13);
}

#catalogSection, #theaterSection {
  scroll-margin-top: 160px;
}

.catalog-section {
  gap: 1rem;
  min-width: 0;
}

.catalog-result-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.catalog-toolbar {
  padding: 0.7rem 1rem;
  gap: 0.75rem;
}

.filter-chip, .btn-action-chip, .btn-neon-primary, .btn-glass-icon {
  min-height: 44px;
}

.vod-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.vod-card {
  min-width: 0;
  overflow: visible;
}

.vod-card:has(details[open]) {
  z-index: 10;
}

.card-thumb-box {
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-top-badges {
  justify-content: flex-end;
}

.card-play-circle {
  font-size: 0.85rem;
  font-weight: 700;
}

.card-body {
  gap: 0.5rem;
  padding: 0.85rem;
}

.card-title {
  min-height: 2.76em;
  overflow-wrap: anywhere;
}

.card-actions {
  width: 100%;
  justify-content: space-between;
  gap: 0.4rem;
}

.card-icon-btn {
  width: auto;
  min-height: 44px;
  height: auto;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-family: inherit;
}

.card-menu > summary {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.card-menu .text-menu-panel {
  top: auto;
  bottom: calc(100% + 0.5rem);
}

.theater-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.theater-grid.theater-expanded {
  grid-template-columns: minmax(0, 1fr);
}

.player-stage-column, .playing-meta-left, .playing-controls-right {
  min-width: 0;
}

.ambilight-canvas {
  inset: 0;
  width: 100%;
  height: 100%;
}

.btn-icon-subtle {
  color: var(--text-muted);
}

.player-info-bar {
  align-items: flex-start;
  gap: 1rem;
}

.playing-title-row {
  align-items: flex-start;
}

.playing-title-row h3 {
  overflow-wrap: anywhere;
}

.playing-controls-right {
  justify-content: flex-start;
}

.btn-tool, .btn-icon-glass, .btn-icon-subtle {
  min-height: 44px;
}

.btn-icon-subtle, .btn-close-drawer, .auth-modal-close, .nerd-close {
  width: auto;
  height: auto;
  min-height: 36px;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.75rem;
}

.playlist-sidebar {
  min-width: 0;
}

.up-next-item {
  font-family: inherit;
  color: inherit;
  text-align: left;
}

.crawler-drawer {
  width: min(520px, 100%);
  max-height: 100dvh;
}

.drawer-title, .form-group, .form-row-2col > * {
  min-width: 0;
}

.drawer-title h3 {
  font-size: 1.1rem;
}

.form-group :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}

.modal-backdrop {
  overflow-y: auto;
  padding: 1.25rem;
}

.auth-modal-card, .modal-card {
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
}

.auth-modal-header {
  padding-top: 1.5rem;
}

.password-input-wrap input {
  padding-right: 4.5rem;
}

.btn-toggle-pw {
  width: auto;
  min-height: 44px;
  padding: 0 0.6rem;
  font-size: 0.75rem;
}

.toast-container {
  max-width: calc(100vw - 2rem);
}

@media (max-width: 1200px) {
  .vod-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .theater-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .cinema-navbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand actions' 'search search' 'links management';
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
  }

  .nav-center {
    order: initial;
  }

  .nav-links {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex-shrink: 0;
  }

  .hero-billboard {
    padding: 1.75rem;
    gap: 1.5rem;
  }

  .hero-right-showcase {
    flex-basis: 38%;
  }

  .vod-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #catalogSection, #theaterSection {
    scroll-margin-top: 200px;
  }
}

@media (max-width: 600px) {
  .brand-title {
    font-size: 1.4rem;
  }

  .nav-right {
    gap: 0.4rem;
  }

  .nav-right :is(.btn-neon-primary, .btn-glass-icon) {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
  }

  .user-name-text {
    max-width: 75px;
  }

  .nav-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  .header-management > summary {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .search-shortcut {
    display: none;
  }

  .cinema-main {
    padding: 1rem 1rem 2rem;
    gap: 1.75rem;
  }

  .hero-billboard {
    flex-direction: column-reverse;
    align-items: stretch;
    min-height: 0;
    padding: 1rem;
    gap: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .hero-right-showcase {
    width: 100%;
    flex: auto;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .hero-actions button {
    justify-content: center;
    padding: 0.65rem 0.3rem;
    font-size: 0.75rem;
    border-radius: 9px;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 0.65rem;
  }

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .filter-chip {
    flex-shrink: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  .catalog-sort-actions {
    justify-content: space-between;
  }

  .catalog-sort-actions .control-pill-group {
    flex: 1;
    min-width: 0;
  }

  .control-pill-group select {
    min-width: 0;
    min-height: 44px;
  }

  .vod-grid {
    gap: 0.85rem;
  }

  .card-body {
    padding: 0.65rem;
  }

  .card-title {
    font-size: 0.82rem;
  }

  .card-icon-btn, .card-menu > summary {
    font-size: 0.69rem;
    padding: 0.3rem 0.35rem;
  }

  .card-menu .text-menu-panel {
    width: 155px;
  }

  .theater-mode-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.3rem;
  }

  .btn-tool {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .player-info-bar {
    padding: 1rem;
  }

  .playing-controls-right {
    width: 100%;
    gap: 0.5rem;
  }

  .up-next-list {
    display: flex;
    overflow-x: auto;
    max-height: none;
    padding-bottom: 0.5rem;
  }

  .up-next-item {
    flex: 0 0 min(280px, 85vw);
  }

  .drawer-header, .drawer-body {
    padding: 1rem;
  }

  .form-row-2col {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-modal-card, .modal-card {
    padding: 1.25rem;
  }

  .form-group input, .form-group select, .search-box input {
    font-size: 16px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 359px) {
  .vod-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-pill-count {
    padding: 0 0.25rem;
  }
}

.connections-panel { padding: 18px; margin-bottom: 18px; }
.connection-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #66532e; border-radius: 14px; background: #211d17; color: #ffe0a6; }
.connection-notice p { margin: 0; font-size: 13px; line-height: 1.5; }
.connection-notice button { flex-shrink: 0; }
@media (max-width: 480px) { .connection-notice { align-items: flex-start; flex-direction: column; } }
.connections-panel h4 { margin: 0 0 10px; }
.connections-panel > p { color: #aebbd0; font-size: 13px; line-height: 1.5; }
.connections-list { display: grid; gap: 10px; margin: 14px 0; }
.connection-item { border: 1px solid rgba(148,163,184,.2); border-radius: 12px; padding: 12px; }
.connection-item strong { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.connection-item p { margin: 7px 0 0; color: #aebbd0; font-size: 12px; line-height: 1.5; }
.connection-item a { display: inline-block; margin-top: 8px; color: #5bd4fa; font-size: 12px; }
.connection-ready { color: #50e6bb; }
.connection-attention, .connection-missing { color: #ffd18a; }
.connections-help { margin-bottom: 0; }

/* Only the last navigation row stays visible; search and branding scroll away. */
:root {
  --compact-nav-height: 64px;
  --catalog-scroll-offset: calc(var(--compact-nav-height) + 16px);
}
html { scroll-padding-top: var(--compact-nav-height); }
.cinema-navbar {
  position: sticky;
  top: calc(var(--compact-nav-height) - var(--navbar-height, 128px));
  background: rgba(7, 10, 20, 0.96);
}
.nav-links > [data-nav-filter='all'] {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #111b2c;
}
.nav-links > [data-nav-filter='all'].active { background: #123047; }
#catalogSection, #theaterSection { scroll-margin-top: 16px; }
#catalogHeading:focus { outline: none; }

.catalog-pagination {
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(11, 16, 30, 0.76);
  display: grid;
  gap: 0.75rem;
}
[data-pagination='top'] .pagination-meta { display: none; }
.pagination-main, .pagination-pages, .pagination-meta, .pagination-jump {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}
.pagination-main { gap: 0.75rem; }
.catalog-pagination button {
  min-height: 44px;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.catalog-pagination button:hover:not(:disabled) { border-color: var(--neon-cyan); background: #123047; }
.catalog-pagination button:disabled { opacity: 0.35; cursor: default; }
.pagination-number { min-width: 44px; font-variant-numeric: tabular-nums; }
.catalog-pagination [aria-current='page'] { background: #67e8f9; color: #082f49; font-weight: 800; border-color: #67e8f9; }
.catalog-pagination [aria-current='page']:hover:not(:disabled) { background: #a5f3fc; color: #082f49; }
.pagination-gap { color: var(--text-dim); padding: 0 0.2rem; }
.pagination-meta { justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; color: var(--text-muted); font-size: 0.78rem; }
.pagination-jump { gap: 0.5rem; white-space: nowrap; }
.pagination-jump input {
  width: 76px;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: #0b101e;
  color: var(--text-main);
  font: inherit;
  font-size: 16px;
  text-align: center;
}

@media (max-width: 900px) {
  :root { --compact-nav-height: calc(56px + env(safe-area-inset-top, 0px)); }
  .cinema-navbar { padding-bottom: 8px; }
  .nav-links { gap: 0.15rem; }
  .cinema-navbar:has(.header-management:not(.hidden)) .nav-links {
    max-width: calc(100% - 80px);
    padding-right: 0;
  }
  .nav-link { min-height: 44px; }
}
@media (max-width: 600px) {
  .catalog-pagination[data-pagination='top'] { padding: 0; border: 0; background: transparent; }
  [data-pagination='top'] .pagination-main { display: block; }
  [data-pagination='top'] .pagination-direction, [data-pagination='top'] .pagination-meta { display: none; }
  .catalog-pagination { padding: 0.75rem 0.5rem; gap: 0.65rem; }
  .pagination-main { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .pagination-pages { grid-column: 1 / -1; gap: 0.2rem; }
  .pagination-previous { grid-row: 2; }
  .pagination-next { grid-column: 2; grid-row: 2; }
  .pagination-number { min-width: 44px; padding: 0.4rem !important; }
  .pagination-gap { padding: 0; }
  .pagination-meta { flex-direction: column; font-size: 0.72rem; gap: 0.5rem; }
  .pagination-jump { justify-content: center; width: 100%; }
  .pagination-jump input { width: 70px; }
}
@media (max-width: 359px) {
  .vod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .card-body { padding: 0.5rem; }
  .card-title { font-size: 0.76rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
