/* ============================================================
   AniVerse — Dark Anime Streaming UI
   Design: Deep space dark + electric violet + cyan accents
   Font: Syne (display) + DM Sans (body)
   ============================================================ */

:root {
  --bg-base:       #080810;
  --bg-surface:    #0e0e1a;
  --bg-card:       #12121f;
  --bg-elevated:   #1a1a2e;
  --bg-hover:      #1f1f35;
  --accent:        #7c3aed;
  --accent-light:  #9f67ff;
  --accent-glow:   rgba(124, 58, 237, 0.35);
  --cyan:          #06b6d4;
  --cyan-glow:     rgba(6, 182, 212, 0.25);
  --text-primary:  #f0f0fa;
  --text-secondary:#9090b8;
  --text-muted:    #55556a;
  --border:        rgba(124, 58, 237, 0.15);
  --border-bright: rgba(124, 58, 237, 0.4);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --shadow-card:   0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 30px var(--accent-glow);
  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-h:      64px;
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 900;
  background: linear-gradient(to bottom, rgba(8,8,16,0.98) 0%, rgba(8,8,16,0.85) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-accent { color: var(--accent-light); }

.nav-search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  gap: 10px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-hover);
}

.search-icon {
  width: 16px; height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 0;
}

.search-input::placeholder { color: var(--text-muted); }

.search-clear {
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition);
  display: none;
}

.search-clear:hover { color: var(--text-primary); background: var(--bg-hover); }
.search-clear.visible { display: flex; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  display: none;
  z-index: 1000;
}

.search-dropdown.open { display: block; }

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

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

.search-result-img {
  width: 38px; height: 52px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-mobile-search {
  display: none;
  color: var(--text-secondary);
  padding: 8px;
}

.nav-mobile-search svg { width: 20px; height: 20px; }

.mobile-search-bar {
  display: none;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}

.mobile-search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.mobile-search-input:focus { border-color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 580px;
  margin-top: var(--navbar-h);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: background-image 0.8s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,8,16,0.97) 0%,
    rgba(8,8,16,0.7) 50%,
    rgba(8,8,16,0.1) 100%
  ),
  linear-gradient(
    to top,
    rgba(8,8,16,1) 0%,
    transparent 50%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 48px 52px;
  max-width: 600px;
  animation: heroFadeIn 0.6s ease;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

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

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

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-meta-item .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 24px var(--accent-glow);
  border: none;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

.hero-thumbnails {
  position: absolute;
  right: 48px;
  bottom: 40px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.hero-thumb {
  width: 70px; height: 100px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: var(--transition);
}

.hero-thumb.active, .hero-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-4px);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.main-content { max-width: 1440px; margin: 0 auto; padding: 48px 24px 80px; }

.section { margin-bottom: 60px; }

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

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.3px;
}

.accent-bar {
  width: 4px; height: 22px;
  background: linear-gradient(to bottom, var(--accent), var(--cyan));
  border-radius: 2px;
  display: inline-block;
}

.section-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ============================================================
   ANIME GRID
   ============================================================ */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.anime-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  group: true;
  border: 1px solid var(--border);
}

.anime-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-glow);
  z-index: 10;
}

.card-poster-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-elevated);
}

.card-poster {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

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

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

.card-play-btn {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: scale(0.8);
  transition: var(--transition);
}

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

.card-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-rating {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-info {
  padding: 12px 10px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   SKELETONS
   ============================================================ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  width: 100%;
}

.skel {
  background: linear-gradient(90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skel-card { aspect-ratio: 3/4; border-radius: var(--radius-md); }
.skel-card-info {
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.skel-title { height: 14px; width: 80%; }
.skel-line  { height: 11px; width: 60%; }
.skel-line.short { width: 40%; }
.skel-ep { margin-bottom: 8px; }

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

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

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  position: relative;
  overflow: hidden;
  animation: modalIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { color: var(--text-primary); border-color: var(--accent); }

.modal-banner {
  width: 100%; height: 220px;
  background: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  position: relative;
}

.modal-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg-surface) 100%);
}

.modal-body {
  display: flex;
  gap: 24px;
  padding: 0 28px 28px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.modal-left { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }

.modal-poster {
  width: 140px; height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.modal-score {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  text-align: center;
}

.modal-score .score-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
}

.modal-score .score-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-right { flex: 1; min-width: 0; padding-top: 68px; }

.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.modal-title-jp {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-style: italic;
}

.modal-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.genre-tag {
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.3px;
}

.modal-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.info-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }

.modal-watch-btn { text-align: center; }

.modal-related {
  padding: 0 28px 28px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.modal-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 800;
  display: none;
  overflow-y: auto;
  padding-top: var(--navbar-h);
}

.search-page.open { display: block; }

.search-page-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.search-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.back-btn {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  background: var(--bg-elevated);
}

.back-btn:hover { color: var(--text-primary); border-color: var(--accent); }

.search-page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.search-page-title span { color: var(--accent-light); }

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

.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results p { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.no-results span { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   WATCH PAGE
   ============================================================ */
.watch-body { background: var(--bg-base); }

.watch-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--navbar-h) + 24px) 24px 40px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.watch-main { min-width: 0; }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a { color: var(--accent-light); transition: var(--transition); }
.breadcrumb a:hover { text-decoration: underline; }

.player-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, var(--bg-elevated) 0%, var(--bg-base) 100%);
}

.player-placeholder-inner { text-align: center; color: var(--text-muted); }

.play-icon-big {
  font-size: 56px;
  width: 88px; height: 88px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  transition: var(--transition);
}

.player-iframe {
  width: 100%; height: 100%;
  border: none;
}

.server-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.server-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.server-tabs, .sub-dub-tabs {
  display: flex;
  gap: 6px;
}

.server-tab, .sub-dub-tab {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.server-tab.active, .sub-dub-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.sub-dub-tab { border-color: var(--border-bright); }

.sub-dub-tab.dub { color: var(--cyan); border-color: var(--cyan-glow); }
.sub-dub-tab.dub.active { background: var(--cyan); color: #000; border-color: var(--cyan); box-shadow: 0 2px 12px var(--cyan-glow); }

.now-playing {
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.now-playing-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  flex-shrink: 0;
}

.now-playing-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.watch-info-card {
  margin-top: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.watch-info-skeleton { display: flex; flex-direction: column; gap: 10px; }

.watch-info-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.watch-poster-sm {
  width: 90px; height: 130px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.watch-info-text { flex: 1; min-width: 0; }

.watch-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.watch-title-jp {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.watch-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.watch-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.watch-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.watch-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* SIDEBAR */
.watch-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: sticky;
  top: calc(var(--navbar-h) + 16px);
  max-height: calc(100vh - var(--navbar-h) - 32px);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ep-filter { }

.ep-search {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.ep-search:focus { border-color: var(--accent); }
.ep-search::placeholder { color: var(--text-muted); }

.episode-list {
  overflow-y: auto;
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.ep-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.ep-item.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--border-bright);
}

.ep-num {
  width: 32px; height: 32px;
  background: var(--bg-elevated);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-family: var(--font-display);
  border: 1px solid var(--border);
}

.ep-item.active .ep-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.ep-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-duration {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ep-play-icon {
  width: 24px; height: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.ep-item.active .ep-play-icon { color: var(--accent-light); }

/* Watch Related */
.watch-related-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 24px;
}

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

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

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

/* ============================================================
   ERROR / EMPTY
   ============================================================ */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.error-state h3 { font-size: 18px; margin-bottom: 8px; }
.error-state p { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .watch-layout { grid-template-columns: 1fr 300px; }
}

@media (max-width: 900px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    position: static;
    max-height: 450px;
  }

  .hero { height: 460px; }
  .hero-thumbnails { display: none; }
  .hero-content { padding: 0 24px 40px; }
  .modal-body { flex-direction: column; }
  .modal-left { flex-direction: row; align-items: flex-end; }
  .modal-right { padding-top: 0; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-mobile-search { display: flex; }

  .hero { height: 380px; }
  .hero-title { font-size: 24px; }

  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .modal { border-radius: var(--radius-md); }
  .modal-banner { height: 160px; }
  .modal-poster { width: 100px; height: 145px; }
  .modal-info-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 20px; }

  .watch-info-top { flex-direction: column; }
  .watch-poster-sm { width: 80px; height: 115px; }

  .main-content { padding: 24px 14px 60px; }
  .section { margin-bottom: 40px; }
}
