/* ============================================================
   ANIME STREAMING STYLESHEET - DARK NEBULA / NEON THEME
   ============================================================ */

:root {
  --bg-main: #060913;
  --bg-card: #0b1120;
  --bg-card-hover: #111a33;
  --header-bg: #090e1a;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-dark: #1e293b;
  --glow-green: 0 0 10px rgba(34, 197, 94, 0.4), 0 0 20px rgba(34, 197, 94, 0.15);
  --glow-red: 0 0 10px rgba(239, 68, 68, 0.4), 0 0 20px rgba(239, 68, 68, 0.15);
  --glow-blue: 0 0 10px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
  --font-main: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(30, 58, 138, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(88, 28, 135, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.6) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================= HEADER & NAVBAR ================= */
.navbar {
  background: rgba(9, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1.5rem;
}

.nav-container {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-logo span {
  font-size: 0.8rem;
  background: #3b82f6;
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 4px;
}

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

.nav-search input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.nav-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

.btn-admin {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.btn-admin:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
  border-color: #a855f7;
}

/* ================= MAIN CONTAINER ================= */
.main-content {
  max-width: 1380px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  flex: 1;
}

/* ================= HERO SECTION BANNER ================= */
/* Styled exactly like the top bar in the user image */
.section-banner {
  background: linear-gradient(90deg, #1e40af 0%, #2563eb 50%, #1e3a8a 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.35);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-more-btn {
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.section-more-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #60a5fa;
}

/* ================= FILTER PILLS ================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}

.filter-bar::-webkit-scrollbar {
  height: 4px;
}

.filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.filter-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* ================= ANIME GRID (EXACT MATCH TO IMAGE) ================= */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1100px) {
  .anime-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .anime-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .anime-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* ================= ANIME CARD ================= */
.anime-card {
  position: relative;
  background: #090e1a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.anime-card:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 10;
}

/* 1. 🟢 สีเขียวนีออน / หยกสวรรค์ (Cyber Green Glow) */
.anime-card.border-green {
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4), 0 0 20px rgba(34, 197, 94, 0.15);
}
.anime-card.border-green:hover {
  border-color: #4ade80;
  box-shadow: 0 0 20px #4ade80, 0 0 40px rgba(74, 222, 128, 0.7), inset 0 0 15px rgba(34, 197, 94, 0.3);
  animation: greenLaserPulse 1.5s infinite alternate;
}
@keyframes greenLaserPulse {
  0% { box-shadow: 0 0 14px #22c55e, 0 0 25px rgba(34, 197, 94, 0.5); }
  100% { box-shadow: 0 0 26px #4ade80, 0 0 48px rgba(74, 222, 128, 0.9), inset 0 0 20px rgba(34, 197, 94, 0.4); }
}

/* 2. 🔥 สีแดงเพลิง / เปลวอัคคี (Red Flame & Inferno Aura) */
.anime-card.border-red, .anime-card.border-fire {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4), 0 0 24px rgba(220, 38, 38, 0.2);
}
.anime-card.border-red:hover, .anime-card.border-fire:hover {
  border-color: #ff4500;
  box-shadow: 0 0 22px #ff4500, 0 0 45px rgba(255, 69, 0, 0.8), inset 0 0 18px rgba(255, 140, 0, 0.4);
  animation: flamePulse 1.2s infinite alternate;
}
@keyframes flamePulse {
  0% { box-shadow: 0 0 16px #ef4444, 0 0 30px rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 28px #ff5722, 0 0 50px rgba(255, 87, 34, 0.9), inset 0 0 22px rgba(255, 152, 0, 0.4); }
  100% { box-shadow: 0 0 18px #ff1744, 0 0 35px rgba(255, 23, 68, 0.7); }
}

/* 3. ⚡ สีฟ้าสว่าง / สายฟ้าฟาดนีออน (Electric Lightning & Thunder Glow) */
.anime-card.border-blue, .anime-card.border-lightning {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), 0 0 24px rgba(14, 165, 233, 0.2);
}
.anime-card.border-blue:hover, .anime-card.border-lightning:hover {
  border-color: #00f0ff;
  box-shadow: 0 0 20px #00f0ff, 0 0 45px rgba(0, 240, 255, 0.8), inset 0 0 18px rgba(0, 240, 255, 0.35);
  animation: lightningPulse 0.9s infinite alternate;
}
@keyframes lightningPulse {
  0% { box-shadow: 0 0 14px #00f0ff, 0 0 25px rgba(0, 240, 255, 0.5); }
  30% { box-shadow: 0 0 32px #38bdf8, 0 0 60px rgba(56, 189, 248, 1), 0 0 80px rgba(0, 240, 255, 0.6); }
  60% { box-shadow: 0 0 16px #00f0ff, 0 0 30px rgba(0, 240, 255, 0.6); }
  100% { box-shadow: 0 0 28px #7dd3fc, 0 0 52px rgba(125, 211, 252, 0.95), inset 0 0 22px rgba(0, 240, 255, 0.4); }
}

/* 4. 🔮 สีม่วงออโรร่า / วงเวทย์มนตราวิบวับ (Purple Magic Circle & Sparkling Aura) */
.anime-card.border-purple, .anime-card.border-magic {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.4), 0 0 24px rgba(168, 85, 247, 0.2);
}
.anime-card.border-purple:hover, .anime-card.border-magic:hover {
  border-color: #e879f9;
  box-shadow: 0 0 22px #e879f9, 0 0 45px rgba(217, 70, 239, 0.85), inset 0 0 18px rgba(192, 132, 252, 0.35);
  animation: magicPulse 1.6s infinite ease-in-out;
}
@keyframes magicPulse {
  0% { box-shadow: 0 0 16px #c084fc, 0 0 28px rgba(168, 85, 247, 0.5); }
  50% { box-shadow: 0 0 32px #f0abfc, 0 0 55px rgba(240, 171, 252, 0.95), inset 0 0 25px rgba(217, 70, 239, 0.45); }
  100% { box-shadow: 0 0 16px #c084fc, 0 0 28px rgba(168, 85, 247, 0.5); }
}

/* 5. ✨ ประกายทองเทวะ (Golden Divine Aura) */
.anime-card.border-gold {
  border-color: #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.4), 0 0 24px rgba(202, 138, 4, 0.2);
}
.anime-card.border-gold:hover {
  border-color: #fde047;
  box-shadow: 0 0 24px #fbbf24, 0 0 50px rgba(251, 191, 36, 0.9), inset 0 0 18px rgba(254, 240, 138, 0.35);
  animation: goldPulse 1.4s infinite alternate;
}
@keyframes goldPulse {
  0% { box-shadow: 0 0 15px #eab308, 0 0 28px rgba(234, 179, 8, 0.5); }
  100% { box-shadow: 0 0 30px #fde047, 0 0 60px rgba(253, 224, 71, 1), inset 0 0 24px rgba(254, 240, 138, 0.45); }
}

/* 6. 🌈 สีรุ้งโฮโลแกรม (Rainbow RGB Chroma) */
.anime-card.border-rgb {
  border-color: #ec4899;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}
.anime-card.border-rgb:hover {
  animation: rgbGlow 2.5s linear infinite;
}
@keyframes rgbGlow {
  0% { border-color: #ef4444; box-shadow: 0 0 25px #ef4444, 0 0 45px rgba(239, 68, 68, 0.7); }
  20% { border-color: #f97316; box-shadow: 0 0 25px #f97316, 0 0 45px rgba(249, 115, 22, 0.7); }
  40% { border-color: #eab308; box-shadow: 0 0 25px #eab308, 0 0 45px rgba(234, 179, 8, 0.7); }
  60% { border-color: #22c55e; box-shadow: 0 0 25px #22c55e, 0 0 45px rgba(34, 197, 94, 0.7); }
  80% { border-color: #06b6d4; box-shadow: 0 0 25px #06b6d4, 0 0 45px rgba(6, 182, 212, 0.7); }
  100% { border-color: #a855f7; box-shadow: 0 0 25px #a855f7, 0 0 45px rgba(168, 85, 247, 0.7); }
}

/* Magic Rune Circle Watermark (วงเวทย์หมุนวิบวับกลางการ์ด) */
.magic-rune-overlay {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 110px;
  height: 110px;
  margin-top: -55px;
  margin-left: -55px;
  border-radius: 50%;
  border: 2px dashed rgba(240, 171, 252, 0.85);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.9), inset 0 0 15px rgba(192, 132, 252, 0.7);
  opacity: 0;
  transform: scale(0.4) rotate(0deg);
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.magic-rune-overlay::before {
  content: '✦';
  font-size: 2rem;
  color: #fdf4ff;
  text-shadow: 0 0 15px #d946ef, 0 0 30px #a855f7;
  animation: runeSpin 3.5s linear infinite;
}
.anime-card:hover .magic-rune-overlay {
  opacity: 1;
  transform: scale(1) rotate(180deg);
}
@keyframes runeSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Lightning Spark Effect (สายฟ้าฟาดวิบวับ) */
.lightning-spark-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  color: #38bdf8;
  text-shadow: 0 0 10px #00f0ff, 0 0 20px #0284c7;
  opacity: 0;
  transform: scale(0.5) translateY(-5px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 4;
}
.anime-card:hover .lightning-spark-overlay {
  opacity: 1;
  transform: scale(1.2) translateY(0);
  animation: sparkFlicker 0.6s infinite alternate;
}
@keyframes sparkFlicker {
  0% { opacity: 0.7; transform: scale(1.1); }
  50% { opacity: 1; transform: scale(1.35) rotate(10deg); text-shadow: 0 0 20px #00f0ff, 0 0 40px #38bdf8; }
  100% { opacity: 0.85; transform: scale(1.2) rotate(-5deg); }
}

/* Card Sheen Reflection Streak (แสงสะท้อนวิ่งผ่านโปสเตอร์) */
.card-poster-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 15%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 85%
  );
  transform: rotate(30deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.anime-card:hover .card-poster-wrapper::after {
  opacity: 1;
  animation: lightSheen 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes lightSheen {
  0% { transform: rotate(30deg) translateX(-180%); }
  100% { transform: rotate(30deg) translateX(450%); }
}

.card-top-bar {
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-poster-wrapper {
  position: relative;
  width: 100%;
  padding-top: 140%; /* 1:1.4 aspect ratio portrait */
  background: #020617;
  overflow: hidden;
}

.card-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Episode Badge (Red Pill at Top Right) */
.badge-ep {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.2px;
  z-index: 2;
}

/* Sound Badge (ซับไทย / พากย์ไทย) */
.badge-sound {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #67e8f9;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(103, 232, 249, 0.3);
  z-index: 2;
}

/* Card Bottom Info Overlay */
.card-bottom-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 65%, transparent 100%);
  padding: 1.5rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  z-index: 2;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ================= WATCH PAGE STYLING ================= */
.watch-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.player-wrapper {
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  overflow: hidden; /* ซ่อนแถบหัว Google Drive และปุ่ม Pop-out ด้านบน */
}

.video-frame {
  position: absolute;
  top: -56px; /* ซ่อนแถบหัวข้อและปุ่ม Pop-out ด้านบน */
  left: 0;
  width: 100%;
  height: calc(100% + 56px);
  border: none;
  pointer-events: auto; /* ให้คลิกเล่นได้ทันทีในคลิกเดียว */
}

.player-controls-bar {
  background: #090e1a;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.server-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.server-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-btn.active,
.server-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}

.nav-ep-btns {
  display: flex;
  gap: 0.5rem;
}

/* Episode Selector Box */
.episode-box {
  background: #0b1120;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
}

.episode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.6rem;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.ep-btn {
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0.4rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ep-btn:hover {
  background: rgba(37, 99, 235, 0.3);
  border-color: #3b82f6;
  color: #fff;
}

.ep-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* Anime Detail Section */
.anime-detail-section {
  background: #0b1120;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .anime-detail-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.anime-detail-poster {
  width: 140px;
  height: 200px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.anime-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ================= ADMIN DASHBOARD ================= */
.admin-card {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
}

.tab-btn.active,
.tab-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #60a5fa;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ================= FOOTER ================= */
.footer {
  background: #040711;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* ================= ANNOUNCEMENT MARQUEE BAR PRO ================= */
.announcement-bar {
  position: relative;
  background: linear-gradient(90deg, #0d1222 0%, #151d38 50%, #0d1222 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
  color: #e0e7ff;
  transition: all 0.3s ease;
  z-index: 40;
  min-height: 42px;
}

/* Bar Style Themes */
.announcement-bar.bar-style-rainbow-border {
  border-bottom: 2px solid transparent !important;
  border-image: linear-gradient(90deg, #ff0055, #ff9900, #ffee00, #00ff66, #00ffff, #0066ff, #9900ff, #ff0055) 1 !important;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25) !important;
}

.announcement-bar.bar-style-neon-cyan {
  border-bottom: 2px solid #38bdf8 !important;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35) !important;
}

.announcement-bar.bar-style-neon-gold {
  border-bottom: 2px solid #f59e0b !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
}

.announcement-bar.bar-style-glass {
  background: rgba(13, 21, 39, 0.88) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.announcement-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
  animation: pulseBadge 2s infinite alternate;
  flex-shrink: 0;
  z-index: 2;
}

@keyframes pulseBadge {
  0% { transform: scale(0.96); box-shadow: 0 0 8px rgba(99, 102, 241, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 15px rgba(139, 92, 246, 0.8); }
}

.announcement-marquee-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 1.5%, #000 98.5%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.5%, #000 98.5%, transparent);
}

.announcement-track {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap !important;
  flex-shrink: 0;
  width: max-content;
}

.announcement-track.motion-scroll {
  animation: marqueeScroll 16s linear infinite;
}

.announcement-track.motion-scroll:hover {
  animation-play-state: paused;
}

.announcement-track.motion-bounce {
  animation: marqueeBounce 3s ease-in-out infinite alternate;
}

.announcement-track.motion-static {
  animation: none !important;
}

/* Speed options */
.announcement-track.speed-slowest { animation-duration: 35s; }
.announcement-track.speed-slow { animation-duration: 24s; }
.announcement-track.speed-normal { animation-duration: 16s; }
.announcement-track.speed-fast { animation-duration: 9s; }

@keyframes marqueeScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marqueeBounce {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(40px, 0, 0); }
}

.announcement-text {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 0.92rem;
  display: inline-block !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  padding-right: 3.5rem;
}

/* ================= TEXT COLOR PRESETS ================= */
.ann-color-rainbow {
  background: linear-gradient(90deg, #ff0055, #ff7700, #ffdd00, #00ff77, #00e5ff, #0066ff, #aa00ff, #ff0055) !important;
  background-size: 400% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: rainbowShift 5s linear infinite !important;
  text-shadow: none !important;
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.ann-color-gold {
  color: #fde047 !important;
  -webkit-text-fill-color: #fde047 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(253, 224, 71, 0.9), 0 0 20px rgba(245, 158, 11, 0.6) !important;
}

.ann-color-cyan {
  color: #38bdf8 !important;
  -webkit-text-fill-color: #38bdf8 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.9), 0 0 20px rgba(14, 165, 233, 0.6) !important;
}

.ann-color-pink {
  color: #f472b6 !important;
  -webkit-text-fill-color: #f472b6 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(244, 114, 182, 0.9), 0 0 20px rgba(236, 72, 153, 0.6) !important;
}

.ann-color-green {
  color: #4ade80 !important;
  -webkit-text-fill-color: #4ade80 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.9), 0 0 20px rgba(34, 197, 94, 0.6) !important;
}

.ann-color-purple {
  color: #c084fc !important;
  -webkit-text-fill-color: #c084fc !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.9), 0 0 20px rgba(168, 85, 247, 0.6) !important;
}

.ann-color-red {
  color: #f87171 !important;
  -webkit-text-fill-color: #f87171 !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.9), 0 0 20px rgba(239, 68, 68, 0.6) !important;
}

.ann-color-white {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 20px rgba(255, 255, 255, 0.6) !important;
}

/* ================= GLOW LIGHT EFFECTS ================= */
.ann-glow-neon {
  animation: neonGlowPulse 2s infinite alternate !important;
}

@keyframes neonGlowPulse {
  0% { filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 8px currentColor); }
  100% { filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 24px currentColor); }
}

.ann-glow-sparkle {
  animation: sparklePulse 1.2s infinite ease-in-out alternate !important;
}

@keyframes sparklePulse {
  0% { opacity: 0.85; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3) drop-shadow(0 0 10px #fff); }
  100% { opacity: 0.85; filter: brightness(1); }
}

.ann-glow-fire {
  animation: flameFlicker 1.8s infinite alternate !important;
}

@keyframes flameFlicker {
  0% { filter: drop-shadow(0 -2px 6px rgba(255, 100, 0, 0.8)) drop-shadow(0 -4px 12px rgba(255, 200, 0, 0.5)); }
  100% { filter: drop-shadow(0 -4px 12px rgba(255, 50, 0, 0.9)) drop-shadow(0 -8px 20px rgba(255, 220, 50, 0.7)); }
}

.ann-glow-fire {
  animation: flameFlicker 1.8s infinite alternate;
}

@keyframes flameFlicker {
  0% { filter: drop-shadow(0 -2px 6px rgba(255, 100, 0, 0.8)) drop-shadow(0 -4px 12px rgba(255, 200, 0, 0.5)); }
  100% { filter: drop-shadow(0 -4px 12px rgba(255, 50, 0, 0.9)) drop-shadow(0 -8px 20px rgba(255, 220, 50, 0.7)); }
}

/* ================= AD BANNER CONTAINERS (2 SLOTS PER ROW) ================= */
.ad-slot-wrapper {
  margin: 1rem 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .ad-slot-wrapper {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.ad-banner-link {
  display: block;
  width: 100%;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #060b18;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.ad-banner-link:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.25);
  z-index: 2;
}

.ad-banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 7px;
  transition: transform 0.3s ease;
}

.ad-banner-link:hover .ad-banner-img {
  transform: scale(1.02);
}

.ad-size-728x200 {
  aspect-ratio: 728 / 200;
  min-height: 90px;
}

.ad-size-728x400 {
  aspect-ratio: 728 / 400;
  min-height: 160px;
}

/* Sleek Placeholder Banner */
.ad-placeholder {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1.5px dashed rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #cbd5e1;
  text-align: center;
  transition: all 0.25s ease;
}

.ad-placeholder:hover {
  border-color: #fde047;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 41, 59, 0.95));
}

.ad-tag-badge {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ================= STATS CARDS ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ================= TOGGLE SWITCH ================= */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #22c55e;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ================= REPORT MODAL & BUTTON ================= */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.report-modal {
  background: #0b1120;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* ================= SOCIAL BUTTONS ================= */
.social-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.social-icon-btn:hover {
  background: #3b82f6;
  color: #fff;
  transform: translateY(-2px);
}

/* ================= TOAST NOTIFICATION ================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left-color: #22c55e;
}

.toast.error {
  border-left-color: #ef4444;
}

/* ================= MAINTENANCE MODE OVERLAY ================= */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, #151d38 0%, #050813 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.maintenance-card {
  background: rgba(11, 18, 36, 0.92);
  border: 2px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 45px rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  padding: 3rem 2.5rem;
  text-align: center;
  animation: fadeInDown 0.4s ease;
  position: relative;
}

.maintenance-icon-badge {
  font-size: 3.8rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.7));
  animation: pulseBadge 2s infinite alternate;
}

.maintenance-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.5rem 0 1.25rem 0;
  filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.3));
}

.maintenance-msg-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  font-size: 1.12rem;
  line-height: 1.8;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
  text-align: center;
  white-space: pre-line;
  word-break: break-word;
}

.maintenance-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.maintenance-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s;
  margin-bottom: 1.5rem;
}

.maintenance-contact-btn:hover {
  transform: translateY(-2px);
}

.maintenance-admin-link {
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.maintenance-admin-link:hover {
  color: #94a3b8;
}

@media (max-width: 600px) {
  .maintenance-card { padding: 2rem 1.5rem; }
  .maintenance-title { font-size: 1.65rem; }
  .maintenance-msg-box { font-size: 0.98rem; }
}

