/* ==========================================================================
   Anichin Player - Pure Obsidian Dark Mode & Donghua Streaming Design System
   Neon Cyan / Azure Gradient Accents (#06b6d4, #3b82f6)
   ========================================================================== */

:root {
  /* Color Palette - Deep Obsidian Dark */
  --bg-main: #07090e;
  --bg-surface: #0e121a;
  --bg-card: #131823;
  --bg-card-hover: #1b2232;
  --bg-elevated: #222b3f;
  --bg-glass: rgba(10, 14, 22, 0.9);
  --bg-glass-card: rgba(19, 24, 35, 0.78);

  /* Borders & Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(6, 182, 212, 0.5);

  /* Primary Accent: Vibrant Cyan & Anime Azure */
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.35);
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gold-gradient: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Layout & Dimensions */
  --max-w: 1240px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --bottom-nav-h: 64px;
  --header-h: 64px;

  /* Transitions */
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-h) + 14px);
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* Page Width Container Constraint (Strict Memory Rule) */
.main-wrapper {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 20px 40px;
  flex: 1;
}

@media (max-width: 768px) {
  .main-wrapper { padding: 12px 14px 28px; }
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.brand-badge svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.brand-name span {
  color: var(--accent);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.desktop-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 6px 0;
  position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #fff;
}

.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

@media (min-width: 860px) {
  .desktop-nav { display: flex; }
}

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

.header-search-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.header-search-btn:hover,
.header-search-btn.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Dropdown Search Panel (Smooth Slide-Down) */
.header-search-panel {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10, 14, 22, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  z-index: 99;
}

.header-search-panel.active {
  display: block;
  animation: searchPanelSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchPanelSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-search-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 20px 20px;
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.header-search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-input-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.header-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  padding: 8px 4px;
}

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

.header-search-submit-btn {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.header-search-submit-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.header-search-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

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

.header-search-popular {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-left: 8px;
}

.popular-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.popular-chip {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.popular-chip:hover {
  color: #fff;
  background: var(--bg-elevated);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   Category & Genre Pill Carousel with Arrows
   ========================================================================== */
.category-carousel-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.category-scroll-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
}

.category-scroll-bar::-webkit-scrollbar { display: none; }

.category-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 18, 26, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-nav-arrow.prev { left: 0; }
.category-nav-arrow.next { right: 0; }

.category-nav-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.category-pill {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  flex-shrink: 0;
}

.category-pill:hover,
.category-pill.active {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   Cinematic Hero Showcase Slider
   ========================================================================== */
.hero-slider {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  margin-bottom: 28px;
}

.banner-item {
  display: none;
  position: relative;
  width: 100%;
  min-height: 380px;
}

@media (min-width: 768px) {
  .banner-item { min-height: 420px; }
}

.banner-item.active {
  display: flex;
  align-items: center;
}

.banner-backdrop-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 70%;
  overflow: hidden;
  pointer-events: none;
}

.banner-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: brightness(0.65) saturate(1.2);
  transform: scale(1.02);
  transition: transform 6s ease;
}

.banner-item.active .banner-backdrop-img {
  transform: scale(1.08);
}

.banner-backdrop-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0b0f17 0%, rgba(11, 15, 23, 0.92) 35%, rgba(11, 15, 23, 0.25) 75%, rgba(11, 15, 23, 0.7) 100%),
              linear-gradient(0deg, #0b0f17 0%, transparent 60%);
  z-index: 1;
}

@media (max-width: 768px) {
  .banner-backdrop-layer { width: 100%; }
  .banner-backdrop-layer::before {
    background: linear-gradient(0deg, #0b0f17 15%, rgba(11, 15, 23, 0.88) 60%, rgba(11, 15, 23, 0.4) 100%);
  }
}

.hero-content-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 36px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

@media (max-width: 768px) {
  .hero-content-grid {
    padding: 24px 20px 30px;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }
}

.hero-text-col {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-pill-exclusive {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.hero-pill-rating {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.5rem; }
}

.hero-meta-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hero-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.hero-chip.highlight {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.hero-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 520px;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-cta-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: var(--transition);
}

.hero-cta-play:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1);
}

.hero-cta-play svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero-visual-col {
  flex-shrink: 0;
  display: none;
}

@media (min-width: 768px) {
  .hero-visual-col { display: block; }
}

.hero-floating-card {
  position: relative;
  width: 180px;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 24px var(--accent-glow);
  transform: perspective(800px) rotateY(-8deg);
  transition: var(--transition);
}

.banner-item:hover .hero-floating-card {
  transform: perspective(800px) rotateY(0deg) scale(1.03);
}

.hero-floating-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-floating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(6, 182, 212, 0.6);
  color: var(--accent-hover);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
}

.hero-nav-arrow.prev { left: 16px; }
.hero-nav-arrow.next { right: 16px; }

.hero-nav-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 16px var(--accent-glow);
}

.hero-bars-indicators {
  position: absolute;
  bottom: 14px;
  right: 36px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-bar {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.hero-bar.active {
  width: 44px;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ==========================================================================
   Anime Cards & Grid System
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 24px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .indicator {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}

.section-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.section-link:hover {
  color: var(--accent);
}

.horizontal-shelf {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 12px 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
  align-items: stretch;
}

.horizontal-shelf::-webkit-scrollbar { display: none; }

.shelf-card-item {
  flex: 0 0 172px;
  width: 172px;
  min-width: 172px;
  max-width: 172px;
  display: flex;
}

@media (max-width: 640px) {
  .shelf-card-item {
    flex: 0 0 148px;
    width: 148px;
    min-width: 148px;
    max-width: 148px;
  }
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

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

@media (min-width: 768px) {
  .anime-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
  .anime-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
}

.anime-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  transition: var(--transition);
  border: 1px solid var(--border-subtle);
  width: 100%;
  height: 100%;
  min-width: 0;
}

.anime-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-glow);
}

.card-cover-wrap {
  position: relative;
  width: 100%;
  padding-top: 144%; /* Guaranteed 2:3 vertical poster proportions across all devices */
  height: 0;
  overflow: hidden;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.card-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

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

.card-badge-ep {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(8px);
  color: var(--accent-hover);
  border: 1px solid rgba(6, 182, 212, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 2;
}

.card-badge-type {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 2;
}

.card-badge-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #22c55e;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
}

.card-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  min-width: 0;
}

.card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Schedule Grid Page
   ========================================================================== */
.schedule-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.schedule-day-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.schedule-day-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-day-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ==========================================================================
   Video Player Stage & Streaming Engine (Anichin Dual Video & Iframe Embed)
   ========================================================================== */
.watch-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1024px) {
  .watch-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
  }
}

.player-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-stage {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-subtle);
}

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

.video-wrapper video,
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Autoplay Next Episode Centered Frosted Overlay */
.autoplay-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 25;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.autoplay-overlay.show {
  display: flex;
  animation: fadeInAutoplayOverlay 0.22s ease forwards;
}

@keyframes fadeInAutoplayOverlay {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.autoplay-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  max-width: 320px;
  width: 100%;
}

.autoplay-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.autoplay-countdown {
  display: inline-block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px var(--accent-glow);
}

.autoplay-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.autoplay-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.autoplay-btn.primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.autoplay-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Server Switcher Bar */
.server-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}

.server-bar::-webkit-scrollbar { display: none; }

.server-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
  flex-shrink: 0;
}

.server-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.server-tab-btn:hover,
.server-tab-btn.active {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Player Dock */
.player-dock {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.dock-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-light);
}

.dock-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dock-btn.nav-btn.primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.dock-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px;
}

.autoplay-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.autoplay-switch-wrap input { display: none; }

.switch-slider {
  width: 32px;
  height: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition);
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: var(--transition);
}

.autoplay-switch-wrap input:checked + .switch-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.autoplay-switch-wrap input:checked + .switch-slider::before {
  transform: translateX(14px);
  background: #fff;
}

.dock-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dock-action-btn:hover {
  color: #fff;
  background: var(--bg-surface);
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Subtitles styling */
video::cue {
  background: rgba(0, 0, 0, 0.78);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  border-radius: 4px;
  padding: 2px 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* Episodes Column */
.episodes-column {
  width: 100%;
}

.episodes-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.episodes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.episodes-count-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.episode-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.episode-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: #fff;
}

.episode-btn.active {
  background: var(--accent-gradient);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* Pagination */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent-gradient);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* ==========================================================================
   Static / Legal / Content Pages Styling
   ========================================================================== */
.static-page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 0 60px;
}

.static-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .static-page-card { padding: 24px 18px; }
}

.static-page-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.static-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.static-page-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.static-page-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.static-page-body {
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.75;
}

.static-page-body h2 {
  font-size: 1.28rem;
  font-weight: 700;
  color: #fff;
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.static-page-body h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}

.static-page-body p { margin-bottom: 16px; }

.static-alert-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  color: #f1f5f9;
  font-size: 0.9rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
}

.contact-card-box h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-card-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-form-group { margin-bottom: 16px; }
.contact-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.contact-input, .contact-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
}

.contact-input:focus, .contact-textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.contact-submit-btn {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 26px;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.contact-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer & Mobile Navigation
   ========================================================================== */
.modern-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
  padding: 50px 0 30px 0;
}

.footer-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 380px;
}

.footer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--accent-hover);
  width: fit-content;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list li a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links-list li a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.footer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 36px 0 24px 0;
}

.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(10, 14, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 6px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  height: 100%;
  transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: #fff;
}

.bottom-nav-item.active svg {
  stroke: var(--accent);
}

.bottom-nav-item.active span {
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   Home Featured Search Section (Post-Slider Discovery)
   ========================================================================== */
.home-search-section {
  margin-bottom: 28px;
}

.home-search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.home-search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.home-search-heading {
  margin-bottom: 14px;
}

.home-search-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-search-title svg {
  color: var(--accent);
}

.home-search-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.home-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 640px) {
  .home-search-form {
    flex-direction: column;
    align-items: stretch;
  }
}

.home-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 16px;
  transition: var(--transition);
}

.home-search-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.home-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.92rem;
  padding: 10px 4px;
}

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

.home-search-submit {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--accent-glow);
  white-space: nowrap;
}

.home-search-submit:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.home-search-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

/* ==============================================================================
   Top Network Bar (All Platforms Link Strip)
   ============================================================================== */
.top-network-bar {
  background: #060911;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
  font-size: 0.76rem;
  line-height: 1.6;
  position: relative;
  z-index: 101;
  width: 100%;
}

.top-network-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 7px;
  text-align: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

.top-network-link {
  color: #8b9cb3;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
  padding: 1px 3px;
  white-space: nowrap;
}

.top-network-link:hover {
  color: #ffffff;
}

.top-network-link.active {
  color: #3b82f6;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-network-sep {
  color: rgba(255, 255, 255, 0.16);
  user-select: none;
  font-size: 0.72rem;
  margin: 0 1px;
}

@media (max-width: 820px) {
  .top-network-bar {
    padding: 6px 4px;
  }
  .top-network-links {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 6px;
    gap: 2px 5px;
    line-height: 1.55;
  }
  .top-network-link {
    font-size: 0.70rem;
    padding: 1px 2px;
  }
  .top-network-sep {
    font-size: 0.65rem;
    opacity: 0.35;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .site-header {
    height: 56px;
  }
  .brand-logo {
    font-size: 1.25rem;
  }
}

