﻿/* ============================================
   REELBOX â€” Professional Streaming CSS
   Netflix + TikTok/Reels Design System
   Mobile-first | Dark Theme
   ============================================ */

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ---- CSS Variables ---- */
:root {
  --primary:       #E50914;
  --primary-dark:  #b20710;
  --primary-glow:  rgba(229, 9, 20, 0.45);
  --bg:            #0a0a0a;
  --bg-surface:    #141414;
  --bg-card:       #1a1a1a;
  --bg-elevated:   #222222;
  --text:          #ffffff;
  --text-muted:    #b3b3b3;
  --text-dim:      #6b6b6b;
  --success:       #46d369;
  --warning:       #f5c518;
  --border:        rgba(255,255,255,0.08);
  --overlay:       rgba(0,0,0,0.75);
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --transition:    0.25s ease;
  --font:          'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h:      68px;
}

/* ---- Base ---- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: scale(1.04);
  box-shadow: 0 6px 28px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.btn-sm  { padding: 9px 20px; font-size: 0.875rem; }
.btn-lg  { padding: 18px 48px; font-size: 1.15rem; }
.btn-block { width: 100%; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1;
}

.badge-free     { background: var(--success); color: #000; }
.badge-exclusive{ background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.badge-dubbed   { background: #1565c0; color: #fff; }
.badge-subbed   { background: #6a1b9a; color: #fff; }
.badge-featured { background: var(--primary); color: #fff; }
.badge-new      { background: var(--primary); color: #fff; }
.badge-vip      { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }

/* ============================================
   HEADER â€” LANDING (public)
   ============================================ */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, transparent 100%);
  transition: background var(--transition);
}
.landing-header.scrolled {
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.landing-header .header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-header .header-actions { display: flex; gap: 12px; }

/* ============================================
   HEADER â€” APP (logged in)
   ============================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, transparent 100%);
  transition: background var(--transition);
}
.app-header.scrolled {
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.app-header .header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.app-header .header-nav {
  display: flex;
  gap: 28px;
  flex: 1;
}
.app-header .header-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.app-header .header-nav a:hover,
.app-header .header-nav a.active { color: #fff; }
.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* ---- Logo ---- */
.logo {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
  text-shadow: 0 0 20px var(--primary-glow);
  flex-shrink: 0;
}

/* ---- User Avatar ---- */
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  position: relative;
}
.user-avatar:hover {
  transform: scale(1.08);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.user-menu { position: relative; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 190px;
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 11px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.user-dropdown a:hover { background: rgba(229,9,20,0.12); color: #fff; }

/* ============================================
   HERO BANNER (85vh)
   ============================================ */
.hero-banner {
  position: relative;
  height: 85vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero-banner:hover .hero-banner-bg { transform: scale(1); }

.hero-banner-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.1) 100%
  );
}
.hero-banner-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(transparent, var(--bg));
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  padding: 0 5% 80px;
  max-width: 680px;
}

.hero-banner-content h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

.hero-description {
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-meta-tag {
  padding: 5px 14px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  backdrop-filter: blur(6px);
}
.hero-meta-tag.free {
  background: rgba(70, 211, 105, 0.2);
  border-color: var(--success);
  color: var(--success);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   CONTENT SECTIONS â€” Netflix-style rows
   ============================================ */
.content-section {
  padding: 0 5%;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title a {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--transition);
}
.content-section:hover .section-title a { opacity: 1; }

/* Horizontal scroll row */
.series-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.series-row::-webkit-scrollbar { display: none; }

/* ============================================
   SERIES CARD â€” Vertical poster (2:3 ratio)
   ============================================ */
.series-card {
  flex: 0 0 auto;
  width: 150px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--bg-card);
}

@media (min-width: 480px)  { .series-card { width: 160px; } }
@media (min-width: 768px)  { .series-card { width: 180px; } }
@media (min-width: 1024px) { .series-card { width: 200px; } }
@media (min-width: 1280px) { .series-card { width: 220px; } }

.series-card:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 2px var(--primary);
  z-index: 10;
}

/* Poster image â€” 2:3 ratio */
.series-card-poster {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 2:3 */
  overflow: hidden;
}
.series-card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.series-card:hover .series-card-poster img { transform: scale(1.06); }

/* Card badges */
.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}

/* Card hover overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}
.series-card:hover .card-overlay { opacity: 1; }

.card-overlay-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-overlay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  background: var(--primary);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  transition: background var(--transition);
}
.card-overlay-btn:hover { background: var(--primary-dark); }

/* Card title below poster */
.series-card-label {
  padding: 8px 8px 10px;
}
.series-card-label h3 {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

/* Progress bar (continue watching) */
.card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 4;
}
.card-progress-fill {
  height: 100%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* ============================================
   WATCH PAGE â€” Series hero + episodes
   ============================================ */
.watch-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.watch-header .header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.watch-header .header-actions { display: flex; gap: 12px; }

/* Series hero */
.series-hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: flex-end;
  margin-top: var(--header-h);
}
.series-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.5) 55%,
    rgba(0,0,0,0.1) 100%
  );
}
.series-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, var(--bg));
}

.series-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5% 60px;
  max-width: 700px;
}
.series-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.series-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.series-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Episodes section */
.episodes-section {
  padding: 40px 5%;
}
.episodes-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.episodes-free-note {
  font-size: 0.9rem;
  color: var(--success);
  margin-bottom: 24px;
}

/* Episode list */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.episode-item {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background var(--transition), transform var(--transition);
  border: 1px solid var(--border);
}
.episode-item:hover {
  background: var(--bg-elevated);
  transform: translateX(4px);
  border-color: rgba(255,255,255,0.15);
}
.episode-item.locked {
  opacity: 0.55;
  cursor: pointer;
}
.episode-item.locked:hover { opacity: 0.75; }

.episode-item a,
.episode-item .episode-inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px;
  align-items: center;
  color: inherit;
}

.episode-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.episode-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.episode-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity var(--transition);
}
.episode-play-btn span {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.episode-item:hover .episode-play-btn { opacity: 1; }

.episode-lock-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.episode-info { display: flex; flex-direction: column; gap: 4px; }
.episode-number {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.episode-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.episode-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.episode-badge-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* VIP Banner */
.vip-banner {
  margin: 40px 5%;
  padding: 36px 32px;
  background: linear-gradient(135deg, #1a0a0a, #2a0a0a);
  border: 1px solid rgba(229,9,20,0.35);
  border-radius: var(--radius-lg);
  text-align: center;
}
.vip-banner h3 { font-size: 1.6rem; margin-bottom: 10px; }
.vip-banner p { color: var(--text-muted); margin-bottom: 24px; }

/* Subscribe Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid rgba(229,9,20,0.4);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
}
.modal-box h2 { font-size: 2rem; margin-bottom: 14px; }
.modal-box p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.modal-close {
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-muted); }

@media (max-width: 600px) {
  .episode-item a,
  .episode-item .episode-inner { grid-template-columns: 130px 1fr; gap: 12px; }
  .modal-box { padding: 32px 24px; }
  .modal-box h2 { font-size: 1.5rem; }
}

/* ============================================
   AUTH PAGES â€” Login / Register
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.85)),
    radial-gradient(ellipse at 30% 50%, rgba(229,9,20,0.12) 0%, transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(20,20,20,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo { font-size: 2.4rem; display: inline-block; }

.auth-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 28px;
  text-align: center;
}

/* Form */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: rgba(229,9,20,0.6);
  background: rgba(255,255,255,0.09);
}
.form-control::placeholder { color: var(--text-dim); }

.auth-footer {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  transition: color var(--transition);
}
.auth-footer a:hover { color: #fff; }
.auth-footer p { font-size: 0.9rem; color: var(--text-muted); }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
  font-weight: 500;
}
.alert-error   { background: rgba(229,9,20,0.15); border: 1px solid rgba(229,9,20,0.4); color: #ff6b6b; }
.alert-success { background: rgba(70,211,105,0.12); border: 1px solid rgba(70,211,105,0.4); color: var(--success); }

@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; }
}

/* ============================================
   LANDING PAGE â€” index.php
   ============================================ */
.landing-page { background: var(--bg); }

/* Hero simple (no featured series) */
.hero-simple {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 5% 60px;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(229,9,20,0.1) 0%, transparent 65%),
    var(--bg);
}
.hero-simple h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 18px;
  line-height: 1.1;
}
.hero-simple p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 36px;
}
.hero-simple .cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Catalog grid (landing) */
.catalog-section {
  padding: 60px 5%;
}
.catalog-section-header {
  margin-bottom: 32px;
}
.catalog-section-header h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 6px;
}
.catalog-section-header p { color: var(--text-muted); font-size: 0.95rem; }

/* Landing series grid â€” vertical poster cards */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (min-width: 480px)  { .series-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
@media (min-width: 768px)  { .series-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; } }
@media (min-width: 1024px) { .series-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; } }
@media (min-width: 1280px) { .series-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

/* Landing card (same poster style) */
.series-card-landing {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.series-card-landing:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 36px rgba(0,0,0,0.7), 0 0 0 2px var(--primary);
  z-index: 5;
}
.series-card-landing .poster {
  position: relative;
  width: 100%;
  padding-top: 150%;
  overflow: hidden;
}
.series-card-landing .poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.series-card-landing:hover .poster img { transform: scale(1.06); }
.series-card-landing .poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity var(--transition);
}
.series-card-landing:hover .poster-overlay { opacity: 1; }
.poster-overlay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--primary);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.series-card-landing .card-label {
  padding: 8px 8px 10px;
}
.series-card-landing .card-label h3 {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

/* Features section */
.features-section {
  padding: 80px 5%;
  background: var(--bg-surface);
}
.features-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  padding: 32px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229,9,20,0.3);
  background: rgba(229,9,20,0.04);
}
.feature-icon { font-size: 2.8rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* CTA section */
.cta-section {
  padding: 80px 5%;
  background: linear-gradient(135deg, #1a0000, #2a0000);
  text-align: center;
  border-top: 1px solid rgba(229,9,20,0.2);
}
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 900; margin-bottom: 12px; }
.cta-section p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px; }

/* Footer */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 5% 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-col h3 { color: var(--primary); font-size: 1.2rem; margin-bottom: 14px; }
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }
.footer-col p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state h3 { font-size: 1.4rem; margin-bottom: 10px; }

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   UTILITY
   ============================================ */
.container { padding: 0 5%; }
.mt-hero { margin-top: var(--header-h); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================
   RESPONSIVE â€” Mobile overrides
   ============================================ */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .hero-banner { height: 72vh; }
  .hero-banner-content { padding: 0 5% 60px; }

  .series-hero { height: 55vh; }
  .series-hero-content { padding: 0 5% 40px; }

  .app-header .header-nav { display: none; }

  .features-grid { grid-template-columns: 1fr 1fr; }

  .episode-item a,
  .episode-item .episode-inner { grid-template-columns: 120px 1fr; gap: 10px; padding: 10px; }

  .vip-banner { margin: 24px 5%; padding: 28px 20px; }
  .vip-banner h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
}

