/* ==========================================================
   ANIME.CSS — Dedicated Anime page styles (purple/violet theme)
   Supplements styles.css
   ========================================================== */

/* Anime page body accent override */
.anime-page {
  --anime-accent: #7c3aed;
  --anime-accent-bright: #a78bfa;
  --anime-accent-2: #ec4899;
  --anime-glow: rgba(124, 58, 237, 0.35);
}

/* ── Nav Anime Link ──────────────────────────────────────── */
.nav-anime-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--anime-accent-bright, #a78bfa) !important;
  font-weight: 700 !important;
  position: relative;
}
.nav-anime-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0; height: 2px;
  background: var(--anime-accent-bright, #a78bfa);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s;
}
.nav-anime-link:hover::after,
.nav-anime-link.active::after { opacity: 1; }
.nav-anime-link.active { color: #fff !important; }

/* ── Anime Spotlight Section (on main homepage) ──────────── */
.anime-spotlight {
  position: relative;
  margin: 10px 0 42px;
  min-height: 280px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0;
}
.anime-spotlight-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f0a1f 0%, #1a0a3a 35%, #0d1117 70%, #0a0a0d 100%);
  z-index: 0;
}
.anime-spotlight-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(124,58,237,.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 20%, rgba(236,72,153,.15) 0%, transparent 50%);
  animation: animePulse 6s ease-in-out infinite alternate;
}
@keyframes animePulse {
  0% { opacity: .6; }
  100% { opacity: 1; }
}
.anime-spotlight-content {
  position: relative;
  z-index: 2;
  padding: 48px 4vw;
  flex: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.anime-spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,.25);
  border: 1px solid rgba(167,139,250,.3);
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  width: fit-content;
}
.anime-spotlight-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.anime-spotlight-desc {
  color: rgba(196,181,253,.75);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 380px;
}
.btn-anime-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  border: none;
  cursor: pointer;
  width: fit-content;
  box-shadow: 0 8px 30px rgba(124,58,237,.4);
  transition: transform .2s var(--ease), box-shadow .2s;
  text-decoration: none;
}
.btn-anime-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,.6);
}

.anime-spotlight-cards {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 4vw 24px 0;
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}
.anime-preview-card {
  flex: 0 0 auto;
  width: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  transition: transform .3s var(--ease);
  text-decoration: none;
  color: inherit;
}
.anime-preview-card:hover { transform: translateY(-6px) scale(1.05); }
.anime-preview-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.anime-preview-info {
  padding: 6px 8px;
  background: rgba(15,10,31,.9);
}
.anime-preview-title {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-0);
  margin-bottom: 2px;
}
.anime-preview-score {
  font-size: 10px;
  color: #facc15;
  font-weight: 700;
}

/* ── Anime Page Hero ──────────────────────────────────────── */
.anime-hero {
  position: relative;
  height: 90vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.anime-hero-slides { position: absolute; inset: 0; }
.anime-hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  background-size: cover;
  background-position: center;
}
.anime-hero-slide.active { opacity: 1; }
.anime-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,2,15,.1) 0%, rgba(5,2,15,.3) 50%, #05020f 95%),
    linear-gradient(90deg, rgba(5,2,15,.9) 0%, rgba(5,2,15,.2) 50%, rgba(5,2,15,.6) 100%);
  pointer-events: none;
}
.anime-hero-content {
  position: relative; z-index: 2;
  padding: 0 4vw 7vw;
  max-width: 660px;
}
.anime-hero-headline {
  font-size: clamp(38px, 6vw, 76px) !important;
  line-height: 1.02 !important;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.anime-hero-loading {
  color: rgba(196,181,253,.6);
  font-size: 16px;
  padding: 0 4vw 7vw;
}
.anime-hero-dots {
  position: absolute; bottom: 24px; right: 4vw; z-index: 3;
  display: flex; gap: 8px;
}
.anime-hero-dots button {
  width: 26px; height: 3px; border-radius: 3px;
  background: rgba(167,139,250,.25);
  border: none; cursor: pointer;
  transition: background .3s;
}
.anime-hero-dots button.active { background: #a78bfa; }

.airing-live-badge {
  color: #4ade80;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  animation: liveFlicker 2s ease infinite;
}
@keyframes liveFlicker { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── Anime Play Button ────────────────────────────────────── */
.btn-anime-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(124,58,237,.4);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-anime-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,.6);
}

/* ── Category Filter Bar ──────────────────────────────────── */
.anime-filter-bar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(5,2,15,.85);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(124,58,237,.2);
  padding: 12px 0;
}
.anime-filter-inner {
  display: flex;
  gap: 8px;
  padding: 0 4vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.anime-filter-inner::-webkit-scrollbar { display: none; }
.anime-filter-chip {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,.25);
  color: rgba(196,181,253,.7);
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
  background: transparent;
}
.anime-filter-chip:hover {
  color: #c4b5fd;
  border-color: rgba(124,58,237,.6);
}
.anime-filter-chip.active {
  background: linear-gradient(135deg, #7c3aed, #a21caf);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
}

/* ── Anime Rows ───────────────────────────────────────────── */
.anime-rows { padding: 0 0 80px; }
.anime-row .row-title {
  background: linear-gradient(90deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.anime-row .row-link { color: rgba(167,139,250,.7); }
.anime-row .row-link:hover { color: #a78bfa; }

/* Anime card color glow on hover */
.anime-card:hover {
  box-shadow: 0 8px 40px var(--card-color, rgba(124,58,237,.4));
}

/* Airing badge on card */
.anime-card-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 7px; border-radius: 5px;
}
.airing-badge {
  background: linear-gradient(90deg, #059669, #10b981);
  color: #fff;
  animation: liveFlicker 2.5s ease infinite;
}

/* ── Anime Modal ──────────────────────────────────────────── */
.anime-modal-overlay .modal { background: #09060f; }
.anime-modal .modal-backdrop::after {
  background: linear-gradient(180deg, rgba(9,6,15,.15) 40%, #09060f 100%);
}
.anime-modal-actions {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.anime-modal-eps { margin-top: 8px; }
.anime-modal-ep-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}
.anime-ep-btn {
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  color: rgba(196,181,253,.8);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
}
.anime-ep-btn:hover, .anime-ep-btn.active {
  background: linear-gradient(135deg, #7c3aed, #a21caf);
  color: #fff;
  border-color: transparent;
}
.anime-ep-num { display: block; }

.anime-recs-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.anime-recs-grid::-webkit-scrollbar { display: none; }
.anime-rec-card {
  flex: 0 0 auto;
  width: 110px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  transition: transform .2s;
}
.anime-rec-card:hover { transform: translateY(-4px); }
.anime-rec-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.anime-rec-title {
  font-size: 11px; font-weight: 700;
  padding: 5px 6px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.anime-rec-score { font-size: 10px; color: #facc15; padding: 0 6px 5px; font-weight: 700; }

/* ── Anime Watch Overlay ──────────────────────────────────── */
.anime-watch-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: #000;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.anime-watch-overlay.open { opacity: 1; visibility: visible; }
.anime-watch-inner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.anime-watch-header {
  padding: 14px 4vw;
  background: rgba(0,0,0,.9);
  border-bottom: 1px solid rgba(124,58,237,.2);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anime-watch-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.anime-watch-title-row h2 {
  font-size: 22px;
  background: linear-gradient(90deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.anime-watch-close {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.anime-watch-close:hover { background: rgba(255,255,255,.15); }

.anime-watch-controls {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.anime-watch-lang {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  overflow: hidden;
}
.lang-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-1);
  transition: all .18s;
}
.lang-btn.active {
  background: linear-gradient(135deg, #7c3aed, #a21caf);
  color: #fff;
}

.anime-ep-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ep-nav-btn {
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  color: #c4b5fd;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.ep-nav-btn:hover { background: rgba(124,58,237,.3); }
.ep-select {
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.3);
  color: #c4b5fd;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.anime-player-wrap {
  flex: 1;
  background: #000;
  display: flex;
}
.anime-player-wrap iframe {
  width: 100%; flex: 1;
  min-height: calc(100vw * 9/16);
  max-height: 82vh;
  border: 0;
}

.anime-ep-info {
  padding: 12px 4vw;
  background: rgba(0,0,0,.8);
  border-top: 1px solid rgba(124,58,237,.15);
}

/* ── Anime Search Overlay ─────────────────────────────────── */
.anime-search-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(5,2,15,.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: min(14vh, 140px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease);
}
.anime-search-overlay.open { opacity: 1; visibility: visible; }
.anime-search-box {
  width: min(640px, 90vw);
  background: rgba(9,6,15,.9);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(167,139,250,.05) inset;
  backdrop-filter: blur(24px) saturate(160%);
  overflow: hidden;
  transform: translateY(-14px) scale(.97);
  transition: transform .28s var(--ease);
}
.anime-search-overlay.open .anime-search-box { transform: translateY(0) scale(1); }
.anime-search-row {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.anime-search-row svg { flex: 0 0 auto; color: rgba(167,139,250,.6); }
.anime-search-row input {
  flex: 1; background: none; border: none; outline: none;
  color: #e9d5ff; font-size: 18px; font-weight: 500;
}
.anime-search-row input::placeholder { color: rgba(196,181,253,.3); }
.anime-search-close {
  font-size: 11px; color: rgba(196,181,253,.5);
  border: 1px solid rgba(124,58,237,.2); padding: 3px 7px; border-radius: 5px;
  cursor: pointer;
}
.anime-search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.anime-search-empty {
  padding: 40px 20px; text-align: center;
  color: rgba(196,181,253,.3); font-size: 14px;
}
.anime-search-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px; border-radius: 10px;
  transition: background .15s;
  cursor: pointer;
}
.anime-search-item:hover { background: rgba(124,58,237,.12); }
.anime-search-item img {
  width: 42px; height: 62px; object-fit: cover; border-radius: 5px;
  background: var(--bg-2); flex: 0 0 auto;
}
.anime-search-meta { flex: 1; min-width: 0; }
.anime-search-title {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #e9d5ff;
}
.anime-search-sub {
  font-size: 12px; color: rgba(196,181,253,.6);
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 3px;
}

/* ── Anime Search Trigger in Nav ──────────────────────────── */
.anime-search-trigger {
  border-color: rgba(124,58,237,.3) !important;
}
.anime-search-trigger:hover { border-color: rgba(167,139,250,.5) !important; color: #c4b5fd !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .anime-spotlight { flex-direction: column; min-height: auto; }
  .anime-spotlight-cards { display: none; }
  .anime-spotlight-content { padding: 36px 4vw; }
  .anime-watch-title-row h2 { font-size: 16px; }
}

@media (max-width: 480px) {
  .anime-filter-chip { font-size: 12px; padding: 6px 12px; }
}
