/* ==========================================================================
   DIVOZFLIX — Bespoke Mobile-First Dark Cinema UI (60fps GPU-Composited)
   ========================================================================== */

:root {
  --bg: #08080a;
  --bg-elevated: #131317;
  --bg-card: #17171c;
  --bg-card-hover: #212128;
  --crimson: #e50914;
  --crimson-bright: #ff2532;
  --crimson-deep: #870208;
  --text: #f5f5f7;
  --text-muted: #a8a8b5;
  --text-dim: #737382;
  --border: rgba(255, 255, 255, 0.09);
  --match-green: #46d369;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background: #000000;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100dvh;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   REUSABLE BRAND LOCKUP (3D-Ribbon "D" + DIVOZFLIX)
   ========================================================================== */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}

.brand-emblem {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 23px;
  letter-spacing: 3px;
  color: #ffffff;
  line-height: 1;
  padding-top: 2px;
}

.brand-lockup-lg .brand-emblem {
  width: 34px;
  height: 34px;
}

.brand-lockup-lg .brand-wordmark {
  font-size: 29px;
  letter-spacing: 4px;
}

/* ==========================================================================
   1. SILKY 60FPS INTRO: LIT "DIVOZFLIX" -> MORPH TO "D" -> LIGHT STREAK ZOOM
   ========================================================================== */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(229, 9, 20, 0.14) 0%, rgba(0, 0, 0, 0) 58%);
}

/* Lightweight GPU-only vertical spectrum streaks */
.intro-streaks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.intro-screen.playing .intro-streaks {
  animation: streaksSweep 1.35s cubic-bezier(0.22, 1, 0.36, 1) 1.75s forwards;
}

.streak-bar {
  position: absolute;
  top: -8%;
  height: 116%;
  opacity: 0.78;
  transform: translateZ(0);
}

@keyframes streaksSweep {
  0% {
    opacity: 0;
    transform: scaleX(0.22) scaleY(0.94) translateZ(0);
  }
  30% {
    opacity: 0.92;
    transform: scaleX(1.04) scaleY(1.02) translateZ(0);
  }
  100% {
    opacity: 0;
    transform: scaleX(3.2) scaleY(1.12) translateZ(0);
  }
}

/* Phase 1: Immediately Lit "DIVOZFLIX" Wordmark */
.intro-wordmark-wrap {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1) translateZ(0);
  will-change: transform, opacity;
}

.intro-wordmark-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(46px, 12.5vw, 88px);
  letter-spacing: clamp(6px, 2vw, 14px);
  color: #ffffff;
  text-shadow: 0 0 28px rgba(229, 9, 20, 0.55);
  padding-left: clamp(6px, 2vw, 14px);
  user-select: none;
}

.intro-screen.playing .intro-wordmark-wrap {
  animation: wordmarkToD 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wordmarkToD {
  0% {
    opacity: 1;
    transform: scale(0.98) translateZ(0);
  }
  58% {
    opacity: 1;
    transform: scale(1.04) translateZ(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.45) translateZ(0);
  }
}

/* Phase 2: Sculpted "D" Ribbon Reveal & Zoom */
.intro-d-wrap {
  position: relative;
  z-index: 5;
  width: min(44vw, 188px);
  opacity: 0;
  transform: scale(0.72) translateZ(0);
  will-change: transform, opacity;
}

.intro-d-svg {
  width: 100%;
  height: auto;
  display: block;
}

.intro-screen.playing .intro-d-wrap {
  animation: dMorphZoom 1.95s cubic-bezier(0.22, 1, 0.36, 1) 1.02s forwards;
}

@keyframes dMorphZoom {
  0% {
    opacity: 0;
    transform: scale(0.72) translateZ(0);
  }
  26% {
    opacity: 1;
    transform: scale(1) translateZ(0);
  }
  56% {
    opacity: 1;
    transform: scale(1.08) translateZ(0);
  }
  100% {
    opacity: 0;
    transform: scale(12.5) translateZ(0);
  }
}

/* ==========================================================================
   2. NETFLIX-STYLE PROFILE SELECTION ("Kim İzliyor?")
   ========================================================================== */
.profile-screen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: radial-gradient(circle at 50% 24%, #18080b 0%, #09090c 54%, #050507 100%);
  display: flex;
  flex-direction: column;
  padding: calc(20px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
  animation: fadeInScreen 0.42s ease forwards;
}

@keyframes fadeInScreen {
  from { opacity: 0; }
  to { opacity: 1; }
}

.profile-header {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.profile-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 36px;
}

.profile-heading {
  margin: 0 0 32px;
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #ffffff;
  text-align: center;
}

.profile-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(22px, 6vw, 44px);
  flex-wrap: wrap;
}

.profile-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.profile-avatar-wrap {
  width: clamp(118px, 32vw, 152px);
  height: clamp(118px, 32vw, 152px);
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.14);
  background: #16161b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.profile-card:hover,
.profile-card:focus-visible {
  transform: translateY(-4px) scale(1.03);
  color: #ffffff;
  outline: none;
}

.profile-card:hover .profile-avatar-wrap,
.profile-card:focus-visible .profile-avatar-wrap {
  border-color: #ffffff;
  box-shadow: 0 22px 48px rgba(229, 9, 20, 0.25);
}

.profile-card:active {
  transform: scale(0.96);
}

/* ==========================================================================
   3. TOP NAVBAR
   ========================================================================== */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: fadeInScreen 0.35s ease;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0) 100%);
  transition: background 0.28s ease, backdrop-filter 0.28s ease, border-color 0.28s ease;
}

.top-nav.scrolled {
  background: rgba(10, 10, 13, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand-btn {
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
}

.nav-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-profile-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.nav-profile-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================================================
   4. HOME SCREEN (HERO BILLBOARD + SELECTABLE SERIES CARD)
   ========================================================================== */
.view-screen {
  flex: 1;
}

.hero {
  position: relative;
  min-height: 76dvh;
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  padding: calc(76px + var(--safe-top)) 18px 28px;
  overflow: hidden;
}

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

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.02);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.65) 0%, rgba(8, 8, 10, 0.12) 34%, rgba(8, 8, 10, 0.78) 72%, var(--bg) 100%),
    linear-gradient(90deg, rgba(8, 8, 10, 0.84) 0%, rgba(8, 8, 10, 0.22) 56%, rgba(8, 8, 10, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero {
    padding: 110px 32px 44px;
  }
  .hero-content {
    max-width: 1120px;
  }
  .hero-desc {
    max-width: 600px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-d {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--crimson);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
}

.badge-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: #e4e4ec;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(38px, 9.5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.03;
  color: #ffffff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #d6d6e0;
  margin-bottom: 14px;
}

.meta-match {
  color: var(--match-green);
  font-weight: 700;
}

.meta-dot {
  color: var(--text-dim);
}

.meta-hd {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.hero-desc {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #dedee8;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: #ffffff;
  color: #09090b;
}

.btn-primary:hover {
  filter: brightness(0.92);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #f0f0f5;
}

.btn-compact {
  padding: 9px 14px;
  font-size: 13px;
}

.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active {
  transform: scale(0.96);
}

/* Home Row: Selectable Series Card */
.home-row {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 18px 44px;
}

@media (min-width: 768px) {
  .home-row {
    padding: 12px 32px 56px;
  }
}

.row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.row-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
}

.row-sub {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson-bright);
}

.series-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

@media (min-width: 640px) {
  .series-card {
    grid-template-columns: 300px 1fr;
    max-width: 780px;
  }
}

.series-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(229, 9, 20, 0.45);
}

.series-card:active {
  transform: scale(0.99);
}

.series-poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #101014;
  overflow: hidden;
}

.series-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.series-poster-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 45%, rgba(0, 0, 0, 0.65) 100%);
}

.series-d-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--crimson);
  color: #ffffff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
}

.series-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(8, 8, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.series-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.series-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.series-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.series-card-year {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.series-card-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.series-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.series-progress-pill {
  font-size: 12px;
  font-weight: 600;
  color: #d8d8e2;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 10px;
  border-radius: 999px;
}

.series-enter-hint {
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson-bright);
}

/* ==========================================================================
   5. SERIES DETAIL VIEW & EPISODES GRID
   ========================================================================== */
.series-detail-hero {
  position: relative;
  min-height: 54dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(74px + var(--safe-top)) 18px 28px;
  overflow: hidden;
}

.series-detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  z-index: 0;
}

.series-detail-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.72) 0%, rgba(8, 8, 10, 0.4) 36%, rgba(8, 8, 10, 0.9) 76%, var(--bg) 100%);
}

.series-detail-topbar {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto auto;
  padding-bottom: 24px;
}

.back-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 14, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  padding: 7px 14px 7px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.series-detail-info {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.series-detail-title {
  margin: 0 0 8px;
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
}

.series-detail-synopsis {
  margin: 0 0 12px;
  max-width: 680px;
  font-size: 14.5px;
  line-height: 1.62;
  color: #e2e2eb;
}

.series-detail-credits {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.series-detail-credits strong {
  color: #e4e4ec;
}

.episodes-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 18px 56px;
}

@media (min-width: 768px) {
  .series-detail-hero {
    padding: 96px 32px 34px;
  }
  .episodes-section {
    padding: 12px 32px 72px;
  }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
}

.section-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.season-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.episode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 680px) {
  .episode-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .episode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ep-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ep-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.ep-card:active {
  transform: scale(0.985);
}

.ep-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f0f13;
  overflow: hidden;
}

.ep-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.56) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ep-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 2px;
}

.ep-num-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #ffffff;
}

.ep-dur-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(10, 10, 12, 0.82);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #e6e6ef;
}

.ep-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.2);
}

.ep-progress-bar {
  height: 100%;
  background: var(--crimson);
}

.ep-body {
  padding: 13px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ep-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ep-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
}

.ep-date {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ep-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  flex: 1;
}

.ep-song {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #d6d6e4;
}

.ep-song-icon {
  color: var(--crimson-bright);
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 18px calc(28px + var(--safe-bottom));
  text-align: center;
}

.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--crimson);
}

.footer-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   7. BESPOKE DIVOZFLIX CINEMA VIDEO PLAYER
   ========================================================================== */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: #000000;
  display: flex;
  flex-direction: column;
}

.player-surface {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.video-el {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000000;
  display: block;
}

/* Gesture layer */
.gesture-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 30% 40% 30%;
}

.tap-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seek-feedback {
  background: rgba(12, 12, 16, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: seekPop 0.55s ease forwards;
}

@keyframes seekPop {
  0% { opacity: 0; transform: scale(0.85); }
  25% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1); }
}

/* Buffering Spinner */
.player-spinner {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--crimson);
  animation: spinRing 0.75s linear infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* HUD Visibility Transitions */
.hud-top,
.hud-center,
.hud-bottom {
  position: absolute;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.player-surface.controls-visible .hud-top,
.player-surface.controls-visible .hud-center,
.player-surface.controls-visible .hud-bottom {
  opacity: 1;
  pointer-events: auto;
}

.hud-top {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 16px 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
}

.hud-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(16, 16, 20, 0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hud-title-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.hud-ep-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--crimson-bright);
  text-transform: uppercase;
}

.hud-ep-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-brand-mark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.65);
}

/* Center Transport Controls */
.hud-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: clamp(22px, 7vw, 44px);
}

.hud-transport-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(16, 16, 20, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease;
}

.transport-num {
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -44%);
}

.hud-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  background: rgba(229, 9, 20, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(229, 9, 20, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}

.hud-play-btn:active,
.hud-transport-btn:active {
  transform: scale(0.92);
}

/* Bottom HUD */
.hud-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scrubber-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-text {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e4e4ee;
  min-width: 40px;
  text-align: center;
}

.scrubber-track {
  position: relative;
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  touch-action: none;
}

/* Larger invisible hit target for easy mobile scrubbing */
.scrubber-track::before {
  content: '';
  position: absolute;
  inset: -12px 0;
}

.scrubber-buffer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.scrubber-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crimson) 0%, var(--crimson-bright) 100%);
  pointer-events: none;
}

.scrubber-thumb {
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--crimson);
  transform: translateY(-50%) scale(1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.scrubber-tooltip {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  pointer-events: none;
}

.hud-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-actions-left,
.hud-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.hud-pill-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hud-song-tag {
  display: none;
  font-size: 12px;
  color: #d6d6e2;
  margin-left: 4px;
}

@media (min-width: 640px) {
  .hud-song-tag {
    display: inline-block;
  }
}

/* Next Episode Binge Card */
.next-ep-card {
  position: absolute;
  right: 16px;
  bottom: 84px;
  z-index: 15;
  width: min(86vw, 310px);
  background: rgba(18, 18, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.78);
}

.next-ep-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--crimson-bright);
  margin-bottom: 4px;
}

.next-ep-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.next-ep-actions {
  display: flex;
  gap: 8px;
}

/* Episode Info Drawer below video */
.player-info-drawer {
  background: #0b0b0e;
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(14px + var(--safe-bottom));
}

.player-song {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crimson-bright);
  margin-bottom: 4px;
}

.player-synopsis {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (min-width: 900px) and (min-height: 620px) {
  .player-info-drawer {
    padding: 14px 28px;
  }
}
