/* ============================================================
   WATCHLANE — anime-theme.css
   Override tema untuk halaman Anime Hub
   Aktif ketika <body class="theme-anime">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');

/* ── Override CSS Variables ──────────────────────────────── */
body.theme-anime {
  --red:          #C084FC;
  --red-glow:     rgba(192, 132, 252, 0.20);
  --red-dim:      rgba(192, 132, 252, 0.08);
  --red-border:   rgba(192, 132, 252, 0.25);
  --red-shadow:   0 0 12px rgba(192, 132, 252, 0.40);
  --red-shadow-lg: 0 0 32px rgba(192, 132, 252, 0.28);
  --bg:           #070711;
  --surface-1:    #0D0D1A;
  --surface-2:    #12122A;
  --surface-3:    #1A1A35;
  --border:       rgba(192, 132, 252, 0.08);
  --border-hi:    rgba(192, 132, 252, 0.14);
}

/* ── Heading Font Override ───────────────────────────────── */
body.theme-anime h1,
body.theme-anime h2,
body.theme-anime h3,
body.theme-anime .anime-title,
body.theme-anime .row-header h2,
body.theme-anime .hero-title,
body.theme-anime .season-hero__title {
  font-family: 'Rajdhani', 'Barlow Condensed', sans-serif;
}

/* ── Navbar Purple Accent ────────────────────────────────── */
body.theme-anime .navbar {
  background: rgba(7, 7, 17, 0.96);
  border-bottom: 1px solid rgba(192, 132, 252, 0.12);
}

body.theme-anime .navbar .logo-dot {
  color: #C084FC;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
}

body.theme-anime .btn-primary {
  background: linear-gradient(135deg, #C084FC, #A855F7);
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.35);
}

body.theme-anime .btn-primary:hover {
  background: linear-gradient(135deg, #D4A0FF, #C084FC);
  box-shadow: 0 6px 20px rgba(192, 132, 252, 0.50);
}

body.theme-anime .badge {
  border-color: rgba(192, 132, 252, 0.25);
}

/* ── Scrollbar ───────────────────────────────────────────── */
body.theme-anime ::-webkit-scrollbar-thumb {
  background: rgba(192, 132, 252, 0.25);
}
body.theme-anime ::-webkit-scrollbar-thumb:hover {
  background: #C084FC;
}

/* ── Anime Hero Section ──────────────────────────────────── */
.anime-hero {
  position: relative;
  min-height: 340px;
  background: linear-gradient(135deg, #070711 0%, #0F0B2A 50%, #07071A 100%);
  overflow: hidden;
  padding: calc(var(--nav-h) + 32px) 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Partikel bintang SVG background */
.anime-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(192, 132, 252, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(130, 50, 200, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Bintang-bintang latar */
.anime-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(192,132,252,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(192,132,252,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 60%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, rgba(192,132,252,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 85%, rgba(192,132,252,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 70%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 50%, rgba(192,132,252,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 90%, rgba(255,255,255,0.2) 0%, transparent 100%);
  pointer-events: none;
}

.anime-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
  color: #C084FC;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.anime-hero__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--text-1);
  text-shadow: 0 0 40px rgba(192, 132, 252, 0.35);
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.anime-hero__sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 500px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

/* ── Seasonal Tabs ───────────────────────────────────────── */
.season-tabs {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.season-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.season-tab:hover {
  background: rgba(192, 132, 252, 0.10);
  border-color: rgba(192, 132, 252, 0.25);
  color: var(--text-1);
}

.season-tab.active {
  background: rgba(192, 132, 252, 0.18);
  border-color: rgba(192, 132, 252, 0.50);
  color: #C084FC;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.20);
}

.season-tab__emoji {
  font-size: 16px;
}

/* ── Genre Pills (Anime) ─────────────────────────────────── */
.anime-genre-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.anime-genre-pills::-webkit-scrollbar { display: none; }

.anime-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.anime-pill:hover {
  background: rgba(192, 132, 252, 0.10);
  border-color: var(--red-border);
  color: var(--text-1);
}

.anime-pill.active {
  background: var(--red-dim);
  border-color: var(--red-border);
  color: #C084FC;
}

/* ── Anime Card Badges ───────────────────────────────────── */
.anime-badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
}

.anime-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.anime-badge--sub {
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
}

.anime-badge--dub {
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
}

.anime-badge--raw {
  background: rgba(107, 114, 128, 0.85);
  color: #fff;
}

.anime-badge--tv {
  background: rgba(192, 132, 252, 0.85);
  color: #fff;
}

.anime-badge--movie {
  background: rgba(245, 158, 11, 0.85);
  color: #000;
}

.anime-badge--ova {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.anime-badge--ona {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
}

.anime-badge--eps {
  background: rgba(0, 0, 0, 0.65);
  color: var(--text-2);
  border: 1px solid rgba(255,255,255,0.12);
}

.anime-badge--airing {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.30);
}

/* ── Card Anime Info ─────────────────────────────────────── */
.card-anime-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: #C084FC;
}

/* ── Anime Season Hero (detailed) ───────────────────────── */
.season-hero {
  position: relative;
  padding: 32px 40px 28px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.season-hero__grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  max-width: 900px;
}

.season-hero__poster {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--red-border);
  box-shadow: var(--red-shadow);
}

.season-hero__title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-1);
}

.season-hero__title-jp {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.season-hero__meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.season-hero__score {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #C084FC;
  font-weight: 600;
  font-size: 14px;
}

.season-hero__overview {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Row Section ─────────────────────────────────────────── */
.anime-section {
  padding: 32px 40px;
  border-bottom: 1px solid var(--border);
}

.anime-section:last-child {
  border-bottom: none;
}

/* ── Glow Card Hover ─────────────────────────────────────── */
body.theme-anime .card-poster:hover .card-poster__img-wrap {
  box-shadow: 0 0 28px rgba(192, 132, 252, 0.35);
  border-color: rgba(192, 132, 252, 0.35);
}

body.theme-anime .card-poster__play {
  background: #C084FC;
}

/* ── Loading / Error ─────────────────────────────────────── */
.anime-rate-limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--text-2);
  text-align: center;
}

.anime-rate-limit__icon {
  font-size: 32px;
  opacity: 0.6;
}

.anime-rate-limit__text {
  font-size: 14px;
}

.anime-rate-limit__btn {
  margin-top: 8px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .anime-hero {
    padding: calc(var(--nav-h) + 20px) 20px 28px;
    min-height: 260px;
  }

  .anime-hero__title {
    font-size: 36px;
  }

  .season-tabs {
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .season-tabs::-webkit-scrollbar { display: none; }

  .season-tab {
    padding: 7px 14px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .anime-genre-pills {
    padding: 16px 16px;
    flex-wrap: nowrap;
  }

  .anime-section {
    padding: 24px 16px;
  }

  .season-hero {
    padding: 20px 16px;
  }

  .season-hero__grid {
    grid-template-columns: 120px 1fr;
    gap: 14px;
  }

  .season-hero__poster {
    width: 120px;
    height: 180px;
  }

  .season-hero__title {
    font-size: 22px;
  }
}

/* ── Navbar Links (desktop nav list in anime page) ─────── */
body.theme-anime .navbar__links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
}

@media (max-width: 768px) {
  body.theme-anime .navbar__links {
    display: none;
  }
  body.theme-anime .navbar__burger {
    display: flex;
  }
}
