/* 
  KiraStream Ultra-Premium Production Stylesheet v3 
  Redesigned for a modern, sleek, cinematic streaming experience.
*/
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Outlined');

:root {
  /* ── Ultra-Premium Obsidian Navy Colors ── */
  --bg-base: #030307;
  --bg-surface: rgba(13, 13, 23, 0.7);
  --bg-surface-hover: rgba(20, 20, 35, 0.85);
  --bg-panel: rgba(10, 10, 18, 0.85);

  /* ── Accent Colors ── */
  --primary: #a855f7; /* Amethyst Violet */
  --primary-hover: #c084fc;
  --primary-glow: rgba(168, 85, 247, 0.3);
  --secondary: #f43f5e; /* Rose Red */
  --secondary-glow: rgba(244, 63, 94, 0.3);

  --accent-pink: #f43f5e;

  /* ── Text ── */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;

  /* ── Status ── */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;

  /* ── Borders & Shadows ── */
  --border-subtle: rgba(255,255,255,0.06);
  --border-highlight: rgba(255,255,255,0.12);

  --shadow-sm: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.8);
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.2);

  /* ── Utils ── */
  --blur-md: blur(12px);
  --blur-lg: blur(24px);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* ── Typography (Anime Style) ── */
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .logo-text, .hero-title, .pricing-price {
  font-family: var(--font-display);
  color: var(--text-bright);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.mt-4 { margin-top: 16px; }
.w-100 { width: 100%; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-direct {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  backdrop-filter: var(--blur-md);
}
.btn-direct:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-highlight);
}

.btn-premium {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}
.btn-premium:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  backdrop-filter: var(--blur-md);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-bright);
  border-color: var(--primary-glow);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  backdrop-filter: var(--blur-md);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

.btn-icon-glass {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon-glass:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-bright);
  transform: rotate(90deg);
}

/* Site Background Effects */
.site-background {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(168,85,247,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(244,63,94,0.06) 0%, transparent 50%);
  z-index: -2;
  pointer-events: none;
}
.site-background::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

/* Navbar */
.premium-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 4, 7, 0.6);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px var(--primary-glow);
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* User Widget / Auth Modal */
.user-widget-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  backdrop-filter: var(--blur-md);
  transition: var(--transition);
}
.user-badge:hover {
  background: rgba(255,255,255,0.08);
}
.user-badge.premium {
  border-color: var(--primary);
  background: linear-gradient(90deg, rgba(139,92,246,0.1), rgba(59,130,246,0.1));
  box-shadow: 0 0 15px var(--primary-glow);
}
.user-badge .material-icons-outlined {
  font-size: 18px;
}

/* Cinematic Hero */
.cinematic-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 70% 50%, rgba(139,92,246,0.15) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-text-area {
  flex: 1;
  max-width: 650px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--primary-hover);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Search Boxes */
.premium-search-box, .premium-direct-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  backdrop-filter: var(--blur-md);
  transition: var(--transition);
}

.premium-search-box:focus-within, .premium-direct-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.15);
  background: rgba(255,255,255,0.05);
}

.search-icon-left {
  color: var(--text-muted);
  padding: 0 12px;
}

.premium-search-box input, .premium-direct-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-size: 1rem;
  font-family: inherit;
  padding: 12px 0;
}
.premium-search-box input::placeholder, .premium-direct-box input::placeholder {
  color: var(--text-muted);
}

/* Mascot Hologram */
.hero-mascot-area {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mascot-hologram {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.mascot-img-modern {
  width: 80%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  border: 4px solid var(--primary);
}

.cyber-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--primary-glow);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.ring-1 {
  width: 100%; height: 100%;
  animation: spin 30s linear infinite;
}
.ring-2 {
  width: 80%; height: 80%;
  border: 1px solid rgba(59,130,246,0.2);
  animation: spin-reverse 20s linear infinite;
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

.mascot-greeting {
  position: absolute;
  top: 10%; right: -5%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-bright);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: var(--blur-md);
  z-index: 4;
  box-shadow: var(--shadow-lg);
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 10px rgba(139,92,246,0.2); }
  to { box-shadow: 0 0 25px rgba(139,92,246,0.6); }
}

/* Shelves Container */
.shelves-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding-bottom: 80px;
}

.content-shelf {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hidden { display: none !important; }

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shelf-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.shelf-title .material-icons-outlined {
  color: var(--primary);
  font-size: 1.8rem;
}

/* Premium Grid & Cards */
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.glass-card {
  background: linear-gradient(180deg, rgba(10, 10, 18, 0.96), rgba(22, 18, 44, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  color: var(--text-main);
}

.glass-card .card-details,
.glass-card .card-actions,
.latest-card .card-details,
.recent-card .card-details,
.anime-card .card-details {
  background: transparent;
}

/* Force dark theme for cards and avoid old cached green styles */
.latest-card, .recent-card, .anime-card, .glass-card {
  background: linear-gradient(180deg, rgba(10,10,18,0.96), rgba(18,18,34,0.96)) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: var(--text-main) !important;
}
.latest-card .card-details,
.recent-card .card-details,
.anime-card .card-details,
.glass-card .card-details {
  background: transparent !important;
}

.latest-card, .anime-card, .recent-card {
  background: linear-gradient(180deg, rgba(10,10,18,0.96), rgba(18,18,34,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}
.anime-card { height: 260px; padding: 0; }

.latest-card:hover, .anime-card:hover, .recent-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(168,85,247,0.35);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 32px rgba(168,85,247,0.12);
}


.card-details {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.latest-card-title, .card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title { padding: 16px 16px 0; }

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
}

.genre-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.latest-card-episode, .card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.health-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
  border: 1px solid rgba(255,255,255,0.25);
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.card-actions .btn {
  padding: 10px 12px;
  flex: 1;
  font-size: 0.82rem;
  min-width: 0;
}

/* Continue Watching Grid */
.continue-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
}
.continue-card {
  flex: 0 0 300px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.continue-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
}
.continue-card .torrent-title,
.continue-card .anime-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-bright);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.continue-card .torrent-episode,
.continue-card .anime-episode {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.continue-progress-wrapper {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.continue-progress-fill {
  height: 100%;
  background: var(--primary);
}

/* Loading States */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--text-muted);
  gap: 16px;
}

.cyber-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin-loader 1s infinite linear;
}
@keyframes spin-loader { to { transform: rotate(360deg); } }

/* Player Panel Overlay */
.cinematic-player {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  animation: fade-in 0.3s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.player-container {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.player-title-container {
  display: flex;
  align-items: center;
  gap: 16px;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.pulse-dot-red {
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--danger);
  animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.player-video-title {
  font-size: 1.8rem;
  margin: 0;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto auto;
  gap: 20px;
  height: calc(100% - 70px);
}
@media(max-width: 1024px) {
  .player-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* ── Global Page Loader ── */
#global-page-loader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-base);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#global-page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-kun {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}
.loader-text {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 2px;
  color: var(--primary);
  animation: pulse 1.5s infinite;
}

/* ── Anime Text Animations ── */
@keyframes animeSlideUp {
  0% { transform: translateY(30px) scale(0.95); opacity: 0; filter: blur(5px); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.anime-text-anim {
  animation: animeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0; /* starts hidden until animation fills forwards */
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }


.video-wrapper {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}
.video-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  position: relative;
}
.video-stage video,
.video-stage .plyr {
  width: 100%;
  height: 100%;
}
.player-track-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(12,12,20,0.97), rgba(8,8,14,1));
  border-top: 1px solid var(--border-subtle);
  z-index: 20;
  flex-shrink: 0;
}
.track-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  margin: 0;
}
.track-control.track-loading .subtitle-select {
  opacity: 0.75;
  font-style: italic;
}
.track-icon {
  font-size: 1.25rem !important;
  color: var(--primary);
  flex-shrink: 0;
}
.track-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.player-track-bar .subtitle-select {
  flex: 1;
  min-width: 0;
}

.kira-tracks-debug {
  position: fixed;
  bottom: 72px;
  right: 12px;
  z-index: 9999;
  width: min(420px, calc(100vw - 24px));
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 8px 10px;
  font: 11px/1.35 ui-monospace, Consolas, monospace;
  color: #c4b5fd;
  background: rgba(8, 8, 16, 0.94);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.kira-tracks-debug.hidden {
  display: none;
}

.track-debug-panel {
  display: block;
  max-height: 100px;
  overflow: auto;
  margin: 0;
  padding: 6px 10px;
  font: 10px/1.3 ui-monospace, Consolas, monospace;
  color: #a5f3fc;
  background: rgba(0, 20, 30, 0.92);
  border-top: 1px solid rgba(34, 211, 238, 0.35);
}
.track-debug-panel.hidden {
  display: none;
}
.track-debug-line {
  margin: 0 0 2px;
  word-break: break-all;
}
.kira-tracks-debug-line {
  margin-bottom: 2px;
  word-break: break-all;
}

.glass-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: var(--blur-md);
}

.episode-sidebar {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 400px;
}
.sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.episode-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.episode-item {
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}
.episode-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-subtle);
}
.episode-item.active {
  background: rgba(139,92,246,0.15);
  border-color: var(--primary);
  color: var(--text-bright);
}

.telemetry-hud {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
.hud-title {
  font-size: 1.1rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.hud-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.hud-stat-box {
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; }
.highlight-green { color: var(--success); }
.highlight-blue { color: var(--info); }

.hud-progress-wrapper {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}
.hud-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width 0.3s ease;
}

.hud-info-list {
  display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem;
}
.info-row {
  display: flex; justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 4px;
}
.info-row span:last-child { color: var(--text-bright); }
.hash-code { font-family: monospace; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Plyr Customization */
:root { --plyr-color-main: var(--primary); --plyr-video-control-background-hover: rgba(139,92,246,0.3); }
.plyr { height: 100%; border-radius: var(--radius-md); }

/* Pricing Section */
.pricing-banner {
  position: relative;
  background: linear-gradient(180deg, rgba(14,16,23,0), rgba(14,16,23,0.8));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  overflow: hidden;
  text-align: center;
  margin-top: 40px;
}
.pricing-bg-img {
  position: absolute;
  bottom: 0; left: 5%;
  height: 80%; opacity: 0.1;
  pointer-events: none;
}
.pricing-content { position: relative; z-index: 2; margin-bottom: 40px; }
.pricing-title { font-size: 2.5rem; margin-bottom: 16px; }
.pricing-desc { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

.pricing-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
  position: relative; z-index: 2;
}
.p-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  display: flex; flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden; /* Ensure ribbons are clipped neatly inside card corners */
}
.p-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.p-card-premium {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(139,92,246,0.05), rgba(0,0,0,0.5));
  box-shadow: 0 10px 40px rgba(139,92,246,0.15);
}
.p-badge-popular {
  position: absolute;
  top: 16px;
  right: -48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 6px 0;
  width: 160px;
  text-align: center;
  transform: rotate(45deg);
  z-index: 20; /* Ensure badge stays above background images */
  pointer-events: none; /* Prevent accidental clicks */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.p-tier { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--text-muted); }
.p-price { font-size: 3rem; margin: 16px 0; font-family: 'Space Grotesk', sans-serif; color: var(--text-bright); }
.p-price span { font-size: 1rem; color: var(--text-muted); }
.p-features { list-style: none; margin: 24px 0; text-align: left; flex: 1; }
.p-features li { margin-bottom: 16px; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.p-features li .material-icons-outlined { font-size: 1.2rem; color: var(--text-muted); }
.p-features li .material-icons-outlined:contains('check_circle') { color: var(--success); }
.p-features li .material-icons-outlined:contains('cancel') { color: var(--danger); }
.p-features li .material-icons-outlined:contains('bolt') { color: var(--primary); }
.p-action { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.p-status { display: block; color: var(--text-muted); font-size: 0.9rem; }
.p-hint { display: block; margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); }

/* Footer */
.modern-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  background: rgba(0,0,0,0.4);
  margin-top: auto;
}
.footer-logo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700;
  color: var(--text-bright); margin-bottom: 16px;
}
.logo-icon-wrapper-small {
  display: inline-flex; width: 24px; height: 24px; background: rgba(255,255,255,0.05);
  align-items: center; justify-content: center; border-radius: 4px;
}

/* Auth Modal Override */
.modal-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: var(--blur-md);
  z-index: 3000; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-backdrop.hidden { opacity: 0; pointer-events: none; }
.auth-modal {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.auth-input, .glass-input, .glass-input-sm {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  color: var(--text-bright); outline: none; transition: var(--transition);
}
.auth-input:focus, .glass-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(139,92,246,0.2); }
.auth-form-group { margin-bottom: 20px; text-align: left; }
.auth-form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.auth-switch { display: block; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; text-align: center; cursor: pointer; }
.auth-switch span { color: var(--primary); font-weight: 600; }

/* Community Chat */
.chat-fab {
  position: fixed; bottom: 30px; right: 30px; z-index: 1000;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: white; border: none; box-shadow: 0 10px 25px rgba(139,92,246,0.4);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.chat-fab:hover { transform: scale(1.1) translateY(-4px); }
.chat-fab .material-icons-outlined { font-size: 28px; }

.chat-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px;
  background: rgba(10,12,16,0.95); backdrop-filter: blur(40px);
  border-left: 1px solid var(--border-subtle); z-index: 1001;
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -10px 0 50px rgba(0,0,0,0.5);
}
.chat-drawer.open { transform: translateX(0); }
.chat-header {
  padding: 20px; border-bottom: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center;
}
.chat-header h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin: 0; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.chat-bubble {
  max-width: 85%; display: flex; flex-direction: column; gap: 6px;
  animation: slide-up-sm 0.3s ease;
}
@keyframes slide-up-sm { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.chat-bubble.self { align-self: flex-end; }
.chat-bubble-content {
  background: rgba(255,255,255,0.05); padding: 12px 16px;
  border-radius: 16px; border-top-left-radius: 4px;
  font-size: 0.95rem; line-height: 1.5;
}
.chat-bubble.self .chat-bubble-content {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.1));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 16px; border-top-right-radius: 4px;
}
.chat-meta { display: flex; gap: 8px; font-size: 0.75rem; color: var(--text-muted); align-items: center; }
.chat-bubble.self .chat-meta { justify-content: flex-end; }
.chat-badge { padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }
.chat-badge.admin { background: rgba(239,68,68,0.2); color: var(--danger); }
.chat-badge.premium { background: rgba(59,130,246,0.2); color: var(--info); }

.chat-footer { padding: 20px; border-top: 1px solid var(--border-subtle); background: rgba(0,0,0,0.2); }
.chat-input-row { display: flex; gap: 12px; }
.btn-send {
  background: var(--primary); color: white; border: none;
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: var(--transition);
}
.btn-send:hover { background: var(--primary-hover); transform: scale(1.05); }

/* Anti Adblock */
.adblock-shield {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(20px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.adblock-card {
  background: var(--bg-surface); padding: 50px; border-radius: var(--radius-lg);
  border: 1px solid var(--danger); text-align: center; max-width: 500px;
  box-shadow: 0 0 50px rgba(239,68,68,0.2);
}
.adblock-icon { font-size: 4rem; margin-bottom: 20px; }
.adblock-card p { color: var(--text-muted); margin: 20px 0 30px; line-height: 1.6; }

@media (max-width: 768px) {
  .hero-content { flex-direction: column; text-align: center; }
  .hero-mascot-area { margin-top: 40px; }
  .hero-text-area { margin: 0 auto; }
  .chat-drawer { width: 100%; }
}

/* Genre tags below title */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
  min-height: 0;
}

.genre-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: var(--primary-hover);
  letter-spacing: 0.02em;
  text-transform: capitalize;
  white-space: nowrap;
}

/* Skeleton loading cards */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/5;
  position: relative;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Improved Card Hover Effects ── */
.latest-card, .recent-card, .anime-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
}
.latest-card:hover, .recent-card:hover, .anime-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 35px rgba(168,85,247,0.15);
}


/* ── Improved Navbar ── */
.premium-navbar {
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

/* ── Improved Section Titles ── */
.shelf-title {
  position: relative;
}
.shelf-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* ── Improved Player Panel ── */
.cinematic-player {
  overflow-y: auto;
}

/* ── Improved HUD stat boxes ── */
.hud-stat-box {
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hud-stat-box:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.2);
}

/* ── Improved Episode Items ── */
.episode-item {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.episode-item:hover {
  transform: translateX(4px);
}
.episode-item.active {
  background: linear-gradient(90deg, rgba(168,85,247,0.2), rgba(168,85,247,0.05));
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}

/* ── Improved Pricing Cards ── */
.p-badge-popular {
  position: absolute;
  top: 16px;
  right: -48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 6px 0;
  width: 160px;
  text-align: center;
  transform: rotate(45deg);
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ── Improved Continue Watching Cards ── */
.continue-card {
  position: relative;
  overflow: hidden;
}
.continue-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.03), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.continue-card:hover::before {
  opacity: 1;
}

/* ── Improved Search Results Count ── */
.count-value {
  font-size: 1.4rem;
  font-weight: 800;
}

/* ── Improved Quality Filter Tabs ── */
.quality-tabs .btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* ── Improved Footer ── */
.modern-footer {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
}

/* ── Responsive Tweaks ── */
@media (max-width: 640px) {
  .premium-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .pricing-cards {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE ADDITIONS — All 7 features
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Torrent Health Indicator ─────────────────────────────────────────── */
.health-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 3;
  border: 2px solid rgba(0,0,0,0.5);
  box-shadow: 0 0 6px currentColor;
}
.health-good  { background: #10b981; color: #10b981; }
.health-ok    { background: #f59e0b; color: #f59e0b; }
.health-dead  { background: #ef4444; color: #ef4444; }

.latest-card.health-good,
.recent-card.health-good {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12);
}
.latest-card.health-ok,
.recent-card.health-ok {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}
.latest-card.health-dead,
.recent-card.health-dead {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08);
}

/* ── 2. AniList Info Modal ───────────────────────────────────────────────── */
.anilist-modal-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.9);
  animation: modal-pop 0.3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.anilist-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}
.anilist-modal-close:hover { background: rgba(255,255,255,0.15); color: var(--text-bright); }

.modal-banner {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center top;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}
.modal-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-panel));
  border-radius: inherit;
}

.modal-content-inner {
  display: flex;
  gap: 28px;
  padding: 28px;
}
@media (max-width: 640px) {
  .modal-content-inner { flex-direction: column; }
}

.modal-poster-col {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
}
.modal-poster-img {
  width: 160px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: block;
}

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

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--text-bright);
}

.modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
  align-items: center;
}
.modal-score {
  font-size: 1rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  padding: 3px 10px;
  border-radius: 20px;
}
.modal-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-transform: capitalize;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 4px;
}

.related-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 80px;
  cursor: pointer;
}
.related-card img {
  width: 80px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.related-card:hover img { border-color: var(--primary); transform: translateY(-3px); }
.related-card span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card small {
  font-size: 0.62rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── 3. Keyboard Shortcut Hints ──────────────────────────────────────────── */
.kbd-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.kbd-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--text-bright);
  min-width: 20px;
}

/* ── 4. Seek Toast ───────────────────────────────────────────────────────── */
.seek-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.seek-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── 5. Subtitle Selector ────────────────────────────────────────────────── */
.subtitle-section { margin-top: 4px; }
.subtitle-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.subtitle-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(168,85,247,0.2); }
.subtitle-select option { background: #0d0d17; color: var(--text-bright); }

/* ── 6. Continue Watching — poster layout ────────────────────────────────── */
.continue-card-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.continue-poster-wrap {
  flex-shrink: 0;
}

/* ── 7. Watch Party button glow ──────────────────────────────────────────── */
#btn-watch-party:hover {
  background: rgba(168,85,247,0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: none;
}

/* ── PWA Install button ──────────────────────────────────────────────────── */
.pwa-install-btn {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 8px;
  animation: fade-in 0.4s ease;
}

/* ── Subtitle overlay (rendered by KiraSubtitles custom overlay) ───────── */
#kira-subtitle-overlay {
  position: absolute;
  bottom: 64px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 100;
  padding: 0 6%;
  font-size: 2.4rem;
  font-family: Arial, sans-serif;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  text-shadow:
    0 0 6px rgba(0,0,0,0.9),
    0 2px 4px rgba(0,0,0,0.8),
    2px 0 4px rgba(0,0,0,0.8),
    -2px 0 4px rgba(0,0,0,0.8),
    0 0 12px rgba(0,0,0,0.6);
  white-space: pre-wrap;
  word-break: break-word;
}
/* When inside fullscreen the controls sit lower — push subtitles up */
.plyr:fullscreen #kira-subtitle-overlay,
.plyr:-webkit-full-screen #kira-subtitle-overlay,
.video-stage:fullscreen #kira-subtitle-overlay,
.video-stage:-webkit-full-screen #kira-subtitle-overlay {
  bottom: 96px;
  font-size: 3rem;
}

/* ── Improved modal backdrop click area ──────────────────────────────────── */
#anilist-modal, #watch-party-modal {
  cursor: default;
}
#anilist-modal .anilist-modal-card,
#watch-party-modal .auth-modal {
  cursor: default;
}
