/* ══════════════════════════════════════════════════════════════════════════════
   MoviezStream — Premium OLED Dark Cinema CSS
   Inspired by: Dark Mode (OLED) + Motion-Driven + Glassmorphism
   Typography: Inter (Modern Dark Cinema pairing)
   ══════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-hover: #1a1a28;
  --bg-elevated: #161622;
  --surface: #0e0e18;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.06);
  --text: #eaeaf0;
  --text-dim: #9898a8;
  --text-muted: #555566;
  --red: #e50914;
  --red-dark: #b20710;
  --red-glow: rgba(229, 9, 20, 0.35);
  --red-subtle: rgba(229, 9, 20, 0.08);
  --accent: #6366f1;
  --accent-glow: rgba(99,102,241,0.2);
  --gold: #f5c518;
  --green: #22c55e;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  transition: all 0.4s;
  gap: 12px;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-left { display: flex; align-items: center; gap: 36px; flex: 1; min-width: 0; overflow: hidden; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--red) 0%, #ff2d3b 100%);
  border-radius: 10px;
  color: white;
  box-shadow: 0 0 24px var(--red-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.logo-icon svg { width: 16px; height: 16px; }

.logo-text { color: white; }
.logo-accent { color: var(--red); }

.nav-links {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
  mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-xl);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-link:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-link.active {
  color: white;
  background: var(--red-subtle);
  box-shadow: 0 0 12px var(--red-glow);
}

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

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

.search-box input {
  width: 220px;
  padding: 9px 40px 9px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  color: white;
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
  width: 300px;
  background: rgba(255,255,255,0.08);
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}

.search-icon {
  position: absolute;
  right: 14px;
  opacity: 0.5;
  pointer-events: none;
  display: flex;
}

.search-icon svg { width: 16px; height: 16px; stroke: var(--text-dim); }

/* ── Hero Slideshow ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 480px;
  max-height: 720px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  background-color: var(--bg);
  opacity: 0;
  transition: opacity 1s ease;
  will-change: opacity;
}

.hero-slide-bg.has-backdrop {
  background-size: cover;
  background-position: center top;
}

.hero-slide-bg.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(10,10,15,0.3) 40%, rgba(0,0,0,0.5) 100%),
    linear-gradient(90deg, rgba(10,10,15,0.7) 0%, transparent 50%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 48px 80px;
  max-width: 680px;
  transition: opacity 0.4s ease;
}

.hero-content.fade-out { opacity: 0; }
.hero-content.fade-in  { opacity: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: linear-gradient(135deg, var(--red) 0%, #ff2d3b 100%);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px var(--red-glow);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.7);
}

.hero-meta {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-overview {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  opacity: 0.8;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--red) 0%, #ff2d3b 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 6px 24px var(--red-glow);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-play svg { width: 18px; height: 18px; fill: white; }

.btn-play:hover {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 36px var(--red-glow);
}

/* Navigation: dots + arrows */
.hero-nav {
  position: absolute;
  bottom: 28px;
  right: 48px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: all 0.4s;
  padding: 0;
}

.hero-dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.08);
}

/* ── Main / Category Rows ────────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 2;
  margin-top: -48px;
  padding: 0 0 80px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 100px 0;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.category-row {
  margin-bottom: 44px;
  animation: fadeUp 0.6s ease;
}

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

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 48px;
  margin-bottom: 16px;
}

.category-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  padding: 2px 10px;
  background: var(--glass);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
}

.category-viewall {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 5px 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  transition: all var(--transition);
  white-space: nowrap;
}

.category-viewall:hover {
  color: white;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

/* Scroll row wrapper for arrow positioning */
.scroll-row-wrap {
  position: relative;
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

.scroll-row-wrap:hover .scroll-arrow { opacity: 1; pointer-events: auto; }
.scroll-arrow.hidden { opacity: 0 !important; pointer-events: none !important; }
.scroll-arrow-left { left: 8px; }
.scroll-arrow-right { right: 8px; }

.scroll-arrow:hover {
  background: rgba(229,9,20,0.8);
  border-color: var(--red);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 16px var(--red-glow);
}

.movie-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 48px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.movie-scroll::-webkit-scrollbar { display: none; }

/* ── Movie Cards ─────────────────────────────────────────────────────────── */
.movie-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid transparent;
}

.movie-card:hover {
  transform: scale(1.08) translateY(-4px);
  z-index: 10;
  box-shadow: var(--shadow-hover);
  border-color: var(--glass-border);
}

.movie-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #121225 0%, #1a1035 50%, #0f0f1f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.movie-poster-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  padding: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.3;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

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

.movie-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
}

.movie-card:hover .movie-poster-overlay { opacity: 1; }

.play-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--red) 0%, #ff2d3b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px var(--red-glow);
  transform: translateY(12px);
  transition: transform var(--transition);
}

.movie-card:hover .play-icon { transform: translateY(0); }

.movie-info {
  padding: 12px 14px 16px;
}

.movie-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

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

.movie-year { color: var(--text-dim); }

.movie-quality {
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.movie-lang {
  padding: 2px 8px;
  background: var(--red-subtle);
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.02em;
}

.movie-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  z-index: 5;
  letter-spacing: 0.02em;
  border: 1px solid rgba(245,197,24,0.15);
}

/* Series badge on cards */
.series-badge-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 3;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ── Movie Grid (paginated category view) ────────────────────────────────── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
  padding: 8px 48px 20px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 48px;
  flex-wrap: wrap;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  letter-spacing: 0.01em;
  text-decoration: none;
  user-select: none;
}

.page-btn:hover:not(.active):not(.disabled) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: white;
  transform: translateY(-1px);
}

.page-btn.active {
  background: linear-gradient(135deg, var(--red) 0%, #ff2d3b 100%);
  border-color: var(--red);
  color: white;
  box-shadow: 0 4px 16px var(--red-glow);
  cursor: default;
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.page-btn.nav-arrow {
  font-size: 1rem;
  font-weight: 700;
}

.page-dots {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 4px;
  user-select: none;
}

.page-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  width: 100%;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dim);
  letter-spacing: -0.02em;
}

.empty-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}

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

.footer a:hover { text-decoration: underline; }

/* ── Mobile nav toggle ───────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: white;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle svg { width: 24px; height: 24px; stroke: currentColor; }

/* ── Touch optimisations ─────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .movie-card:hover { transform: none; box-shadow: none; border-color: transparent; }
  .movie-card:hover .movie-poster-overlay { opacity: 0; }
  .movie-card:hover .play-icon { transform: translateY(12px); }
  .episode-card:hover { transform: none; }

  /* Touch-friendly tap targets (minimum 44px) */
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .hero-arrow { min-width: 44px; min-height: 44px; }
  .hero-dot { min-width: 30px; min-height: 30px; padding: 12px 0; }
  .load-more-btn { min-height: 48px; }
  .search-box input { min-height: 44px; }

  /* Suppress webkit tap highlights */
  a, button, .nav-link, .movie-card, .episode-card, .season-tab {
    -webkit-tap-highlight-color: transparent;
  }

  /* Active states for touch feedback */
  .movie-card:active { transform: scale(0.97); opacity: 0.9; }
  .episode-card:active { background: rgba(229,9,20,0.08); }
  .season-tab:active { background: rgba(229,9,20,0.1); }
  .nav-link:active { background: rgba(255,255,255,0.1); }
}

/* ── Responsive: Tablet (601-1024px) ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .navbar { padding: 0 28px; }
  .hero-content { padding: 0 28px 64px; max-width: 600px; }
  .hero-nav { right: 28px; }
  .category-header { padding: 0 28px; }
  .movie-scroll { padding: 8px 28px 16px; }
  .movie-grid { padding: 8px 28px 16px; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .pagination-wrap { padding: 24px 28px; gap: 5px; }
  .empty-state { padding: 60px 20px; }
  .empty-title { font-size: 1.3rem; }
}

/* ── Responsive: Mobile (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0); }

  /* Navbar */
  .navbar {
    padding: 0 16px;
    height: 56px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .nav-left { gap: 0; flex: 1; min-width: 0; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .logo-icon { width: 32px; height: 32px; border-radius: 8px; }
  .logo-icon svg { width: 14px; height: 14px; }
  .nav-logo { font-size: 1.15rem; gap: 8px; flex-shrink: 0; }

  /* Mobile nav drawer */
  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px 12px;
    z-index: 999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    max-height: 60vh;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 0.78rem; padding: 8px 14px; border-radius: 20px; }

  /* Search */
  .nav-right { flex-shrink: 0; }
  .search-box input {
    width: 0;
    padding: 8px 0;
    border: none;
    background: transparent;
    opacity: 0;
    transition: all 0.3s;
  }
  .search-box input:focus,
  .search-box input.active {
    width: 180px;
    padding: 8px 36px 8px 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    opacity: 1;
  }
  .search-box .search-icon {
    pointer-events: auto;
    cursor: pointer;
    padding: 10px;
    margin-right: -10px;
  }

  /* Hero */
  .hero { height: 55vh; min-height: 360px; }
  .hero-content { padding: 0 16px 44px; max-width: 100%; }
  .hero-title { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  .hero-badge { font-size: 0.65rem; padding: 4px 10px; }
  .hero-meta { font-size: 0.82rem; }
  .hero-overview { font-size: 0.78rem; max-width: 80%; }
  .btn-play {
    padding: 12px 28px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  .btn-play svg { width: 16px; height: 16px; }
  .hero-nav { right: 16px; bottom: 12px; gap: 6px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 1rem; }
  .hero-dot { width: 6px; height: 6px; }
  .hero-dot.active { width: 18px; }

  /* Category rows */
  .category-header { padding: 0 16px; margin-bottom: 10px; }
  .category-title { font-size: 1.1rem; }
  .category-count { font-size: 0.68rem; padding: 2px 8px; }
  .scroll-arrow { display: none; }
  .category-viewall { font-size: 0.68rem; padding: 4px 10px; }
  .movie-scroll { padding: 6px 16px 14px; gap: 10px; }
  .movie-card { flex: 0 0 135px; }
  .movie-info { padding: 8px 10px 12px; }
  .movie-title { font-size: 0.76rem; }
  .movie-meta { font-size: 0.66rem; gap: 5px; }
  .movie-quality { font-size: 0.6rem; padding: 2px 6px; }
  .movie-lang { font-size: 0.6rem; padding: 2px 6px; }
  .movie-rating { font-size: 0.65rem; padding: 3px 8px; top: 6px; right: 6px; }
  .play-icon { width: 40px; height: 40px; }

  /* Grid view */
  .movie-grid {
    padding: 8px 16px 14px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }
  .pagination-wrap { padding: 20px 16px; gap: 4px; }
  .page-btn { min-width: 36px; height: 36px; font-size: 0.78rem; padding: 0 8px; }
  .page-btn.nav-arrow { padding: 0 10px; }
  .page-info { font-size: 0.7rem; }

  /* Empty state */
  .empty-state { padding: 60px 16px; }
  .empty-icon { font-size: 3rem; }
  .empty-title { font-size: 1.2rem; }
  .empty-sub { font-size: 0.82rem; }

  /* Footer */
  .footer { padding: 24px 16px; font-size: 0.7rem; }

  /* Series badge */
  .series-badge-overlay { font-size: 0.55rem; padding: 2px 8px; bottom: 6px; left: 6px; }
}

/* ── Responsive: Small phones (≤480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  .navbar { padding: 0 12px; height: 52px; }
  .nav-logo { font-size: 1rem; gap: 6px; }
  .logo-icon { width: 28px; height: 28px; border-radius: 6px; }
  .logo-icon svg { width: 12px; height: 12px; }
  .nav-links { top: 52px; }

  .hero { height: 50vh; min-height: 300px; }
  .hero-content { padding: 0 12px 36px; }
  .hero-title { font-size: 1.4rem; }
  .hero-meta { font-size: 0.78rem; }
  .hero-overview { display: none; }
  .hero-arrow { display: none; }
  .btn-play { padding: 10px 22px; font-size: 0.82rem; gap: 6px; }
  .btn-play svg { width: 14px; height: 14px; }

  .category-header { padding: 0 12px; }
  .category-title { font-size: 1rem; }
  .movie-scroll { padding: 4px 12px 12px; gap: 8px; }
  .movie-card { flex: 0 0 110px; }
  .movie-info { padding: 6px 8px 10px; }
  .movie-title { font-size: 0.7rem; }
  .movie-meta { font-size: 0.58rem; gap: 4px; }
  .movie-quality { font-size: 0.54rem; padding: 1px 5px; }
  .movie-lang { font-size: 0.54rem; padding: 1px 5px; }
  .movie-rating { font-size: 0.58rem; padding: 2px 6px; top: 4px; right: 4px; }

  .movie-grid { padding: 4px 12px 12px; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pagination-wrap { padding: 16px 12px; gap: 3px; }
  .page-btn { min-width: 32px; height: 32px; font-size: 0.72rem; padding: 0 6px; border-radius: 6px; }

  .search-box input:focus,
  .search-box input.active { width: 150px; }

  .footer { padding: 20px 12px; font-size: 0.65rem; }
}

/* ── Responsive: Very small phones (≤360px) ──────────────────────────────── */
@media (max-width: 360px) {
  .movie-card { flex: 0 0 100px; }
  .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hero-title { font-size: 1.2rem; }
  .btn-play { padding: 9px 18px; font-size: 0.78rem; }
  .nav-logo .logo-text { font-size: 0.9rem; }
  .search-box input:focus,
  .search-box input.active { width: 130px; }
}
