/* ============================================================
   CINEMANESIA — Main Stylesheet
   Dark cinematic theme inspired by premium streaming platforms
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --red-glow: rgba(229,9,20,0.35);
  --gold: #f5a623;
  --gold-dim: rgba(245,166,35,0.15);
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --bg4: #22222e;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0f5;
  --text2: #a0a0b0;
  --text3: #60607a;
  --white: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-red: 0 0 30px rgba(229,9,20,0.4);
  --font-head: 'Bebas Neue', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 64px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 24px;
  background: linear-gradient(to bottom, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0.85) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  gap: 24px;
  transition: background var(--transition);
}

#navbar.scrolled {
  background: rgba(10,10,15,0.99);
  box-shadow: var(--shadow);
}

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

.nav-logo .logo-text {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--red);
  text-shadow: 0 0 20px var(--red-glow);
}

.nav-logo .logo-badge {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  align-self: flex-start;
  margin-top: 6px;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface2);
}

.nav-link.active { color: var(--red); }

.nav-right {
  display: flex; align-items: center; gap: 12px;
  margin-left: auto;
}

.nav-search-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: all var(--transition);
}

.nav-search-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

.nav-genre-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}

.nav-genre-btn:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }

.hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav drawer */
#mobile-nav {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  z-index: 850;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

#mobile-nav.open { transform: translateX(0); display: flex; }

.mobile-nav-link {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  color: var(--text2);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.mobile-nav-link:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

/* ── Search Overlay ── */
#search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 950;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

#search-overlay.open { display: flex; }

.search-box {
  width: 100%; max-width: 680px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.search-input-wrap {
  display: flex; align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap svg { color: var(--text3); flex-shrink: 0; }

#main-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 18px;
  padding: 20px 16px;
}

#main-search::placeholder { color: var(--text3); }

.search-close {
  color: var(--text3);
  padding: 8px;
  border-radius: 6px;
  transition: color var(--transition);
}

.search-close:hover { color: var(--text); }

#search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
}

.search-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.search-item:hover { background: var(--surface2); }

.search-item-poster {
  width: 48px; height: 68px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg4);
  flex-shrink: 0;
}

.search-item-info h4 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.search-item-info p {
  font-size: 12px;
  color: var(--text3);
}

.search-empty {
  text-align: center;
  padding: 40px;
  color: var(--text3);
  font-family: var(--font-ui);
}

/* ══════════════════════════════════════
   HERO / FEATURED
══════════════════════════════════════ */
#hero {
  position: relative;
  height: 85vh; min-height: 500px; max-height: 780px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.05);
  transition: transform 8s ease;
}

#hero.loaded .hero-backdrop { transform: scale(1); }

.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,15,0.1) 0%,
    rgba(10,10,15,0.2) 30%,
    rgba(10,10,15,0.7) 60%,
    rgba(10,10,15,0.98) 100%
  );
}

.hero-gradient-side {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,10,15,0.85) 0%, transparent 60%);
}

.hero-content {
  position: relative; z-index: 2;
  padding: 0 48px 64px;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.hero-meta {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-meta span {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}

.hero-meta .rating {
  color: var(--gold);
  display: flex; align-items: center; gap: 4px;
}

.hero-synopsis {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--red);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--red-glow);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-secondary:hover { background: var(--surface); border-color: var(--text3); }

.btn-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--surface); border-color: var(--border2); color: var(--gold); }
.btn-icon.active { color: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
#main-content { padding-top: 0; }

.section { padding: 48px 0; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

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

.section-title {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 1.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px; height: 24px;
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--red-glow);
}

.section-link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 4px;
  transition: opacity var(--transition);
}

.section-link:hover { opacity: 0.75; }

/* ── Movie Grid ── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 16px;
}

.movie-grid.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  group: true;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px var(--border2);
  z-index: 10;
}

.movie-card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg4);
  display: block;
}

.movie-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,0.95) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex; align-items: center; justify-content: center;
}

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

.movie-card-play {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px var(--red-glow);
  transform: scale(0.8);
  transition: transform var(--transition);
}

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

.movie-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 12px 12px;
}

.movie-card-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-ui);
}

.movie-card-badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
}

.movie-card-badge.ongoing { background: var(--gold); color: #111; }
.movie-card-badge.new { background: #2ecc71; }

/* ── Horizontal Scroll ── */
.movie-scroll-wrap {
  position: relative;
}

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

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

.movie-scroll .movie-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
}

.scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.scroll-btn:hover { background: var(--red); border-color: var(--red); }
.scroll-btn.left { left: -16px; }
.scroll-btn.right { right: -16px; }

/* ══════════════════════════════════════
   GENRE FILTER BAR
══════════════════════════════════════ */
.genre-filter {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 28px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.genre-filter::-webkit-scrollbar { display: none; }

.genre-chip {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}

.genre-chip:hover { color: var(--text); border-color: var(--text3); }
.genre-chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ══════════════════════════════════════
   WATCH PAGE
══════════════════════════════════════ */
#watch-page { padding-top: var(--nav-h); }

.watch-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Video Player ── */
.player-container {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

#video-player {
  width: 100%; height: 100%;
  display: block;
}

.player-wrapper iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}

.player-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  color: var(--text3);
}

.player-placeholder svg { opacity: 0.3; }

.player-placeholder p {
  font-family: var(--font-ui);
  font-size: 14px;
}

/* Custom video controls */
.player-controls {
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 20px 16px 14px;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.player-wrapper:hover .player-controls { opacity: 1; }

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 12px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.1s linear;
  pointer-events: none;
}

.progress-thumb {
  position: absolute;
  top: 50%; transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition);
}

.progress-bar:hover .progress-thumb { opacity: 1; }

.controls-row {
  display: flex; align-items: center; gap: 12px;
}

.ctrl-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}

.ctrl-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

.ctrl-time {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-left: 4px;
}

.ctrl-spacer { flex: 1; }

.volume-wrap { display: flex; align-items: center; gap: 8px; }

.volume-slider {
  width: 70px;
  -webkit-appearance: none;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
}

/* Player Info */
.player-info {
  padding: 20px 0;
}

.player-title {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.player-meta {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.player-meta span {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

.player-meta .dot { color: var(--text3); }

.player-actions {
  display: flex; gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Episode selector */
.episode-selector {
  margin-top: 16px;
}

.episode-selector-title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.episode-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.ep-btn {
  min-width: 44px;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  transition: all var(--transition);
  text-align: center;
}

.ep-btn:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.ep-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* Subtitle info */
.subtitle-info-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.subtitle-info-box strong { color: var(--text); }

/* Sidebar */
.watch-sidebar {}

.sidebar-section {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.sidebar-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-movie-item {
  display: flex; gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.sidebar-movie-item:last-child { border-bottom: none; }
.sidebar-movie-item:hover { background: var(--surface); }

.sidebar-movie-poster {
  width: 56px; height: 80px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg4);
  flex-shrink: 0;
}

.sidebar-movie-info { flex: 1; min-width: 0; }

.sidebar-movie-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-movie-meta {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-ui);
}

/* ══════════════════════════════════════
   ANNOUNCEMENT POPUP
══════════════════════════════════════ */
#announcement-popup {
  position: fixed;
  z-index: 1000;
  display: none;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}

#announcement-popup.open { display: flex; }

.announcement-box {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 48px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}

@keyframes popIn {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.announcement-type-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.announcement-type-bar.info { background: #3b82f6; }
.announcement-type-bar.warning { background: var(--gold); }
.announcement-type-bar.error { background: var(--red); }
.announcement-type-bar.success { background: #2ecc71; }

.announcement-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.announcement-icon.info { background: rgba(59,130,246,0.15); }
.announcement-icon.warning { background: rgba(245,166,35,0.15); }
.announcement-icon.error { background: rgba(229,9,20,0.15); }
.announcement-icon.success { background: rgba(46,204,113,0.15); }

.announcement-title {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.announcement-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 24px;
}

.announcement-close {
  display: block; width: 100%;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition);
}

.announcement-close:hover { background: var(--red-dark); }

/* ══════════════════════════════════════
   PAGES
══════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

/* ── Genres Page ── */
.genre-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 32px 0;
}

.genre-card {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg3);
  transition: all var(--transition);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--text2);
}

.genre-card:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--red-glow);
}

.genre-card .icon { font-size: 28px; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo-text {
  font-family: var(--font-head);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--red);
}

.footer-brand p {
  font-size: 13px;
  color: var(--text3);
  margin-top: 8px;
  line-height: 1.6;
  max-width: 240px;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text3);
}

/* ══════════════════════════════════════
   LOADING / SKELETON
══════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 0%, var(--bg4) 50%, var(--bg3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.skeleton-card {
  aspect-ratio: 2/3;
  border-radius: var(--radius);
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 3px solid #2ecc71; }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid #3b82f6; }
.toast.warning { border-left: 3px solid var(--gold); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1100px) {
  .watch-layout { grid-template-columns: 1fr; }
  .watch-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .nav-links, .nav-genre-btn { display: none; }
  .hamburger { display: flex; }

  .hero-content { padding: 0 20px 48px; }
  .hero-title { font-size: 36px; }

  .watch-layout { padding: 12px; }
  .watch-sidebar { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  
  #toast-container { bottom: 12px; right: 12px; left: 12px; }
  .toast { min-width: unset; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 22px; }
  .player-title { font-size: 22px; }
}

/* ══════════════════════════════════════
   MISC UI
══════════════════════════════════════ */
.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
}

.rating-star { color: var(--gold); font-size: 14px; }

.no-result {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}

.no-result h3 {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--text2);
}

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 800;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: popIn 0.25s ease;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: 1px;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: all var(--transition);
}

.modal-close:hover { background: var(--red); color: #fff; }

/* Synopsis expand */
.synopsis-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-top: 6px;
  cursor: pointer;
}

/* Genres badge row */
.genre-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.genre-tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  color: var(--text2);
  transition: all var(--transition);
  cursor: pointer;
}
.genre-tag:hover { background: var(--red); border-color: var(--red); color: #fff; }
