/* ==========================================================================
   HINATAW TV - BRAND STYLESHEET
   Branding: hinataw.exe / Hinataw TV
   Color Identity: Cyberpunk Anime Neon (Hot Pink #ff2a85 & Lavender Violet #8b5cf6)
   ========================================================================== */

:root {
  --bg-primary: #090810;
  --bg-secondary: #110e1c;
  --bg-tertiary: #171326;
  --bg-glass: rgba(17, 14, 28, 0.75);
  --bg-card: rgba(23, 19, 38, 0.65);
  --bg-card-hover: rgba(32, 26, 54, 0.85);
  
  --brand-pink: #ff2a85;
  --brand-pink-glow: rgba(255, 42, 133, 0.45);
  --brand-pink-subtle: rgba(255, 42, 133, 0.12);
  
  --brand-purple: #8b5cf6;
  --brand-purple-glow: rgba(139, 92, 246, 0.45);
  --brand-purple-subtle: rgba(139, 92, 246, 0.15);

  --brand-lavender: #c084fc;
  --brand-cyan: #06b6d4;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-pink: rgba(255, 42, 133, 0.3);
  --border-purple: rgba(139, 92, 246, 0.3);
  
  --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-heading: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  /* Sideways motion is clipped (decorative orbs, no pinch-zoom panning), but the
     page itself has to scroll vertically. `overflow: hidden` here locked the
     whole document, so the wheel and touch drag did nothing. */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(255, 42, 133, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 42, 133, 0.05) 0%, transparent 50%);
  /* `fixed` made every scroll repaint the whole background — the main source of
     jank on phones. The gradients now scroll with the page. */
  background-attachment: scroll;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #26213d;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-pink);
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Glow Background Orbs.
   These used to be solid discs with `filter: blur(100px)`, which the browser has
   to re-rasterise whenever anything under them repaints. A radial gradient gives
   the same soft glow with zero filter cost. */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  /* Never let a decorative orb push the document wider than the viewport.
     They scale on small screens and shrink on large ones so scrollWidth
     stays at (or under) 100%, which is what "fits the screen completely"
     means on mobile. */
  max-width: clamp(220px, 60vw, 520px);
  max-height: clamp(220px, 60vw, 520px);
  width: clamp(220px, 55vw, 500px);
  height: clamp(220px, 55vw, 500px);
  contain: paint;
}
.orb-1 {
  top: clamp(60px, 14vw, 110px);
  left: min(-100px, -12%);
  width: clamp(220px, 58vw, 450px);
  height: clamp(220px, 58vw, 450px);
  background: radial-gradient(circle, rgba(255, 42, 133, 0.22) 0%, rgba(255, 42, 133, 0.1) 45%, transparent 72%);
}
.orb-2 {
  top: clamp(240px, 46vw, 360px);
  right: min(-100px, -12%);
  width: clamp(240px, 64vw, 500px);
  height: clamp(240px, 64vw, 500px);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24) 0%, rgba(139, 92, 246, 0.11) 45%, transparent 72%);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 8, 16, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(9, 8, 16, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 42, 133, 0.2);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 16px var(--brand-pink-glow);
  border: 2px solid var(--brand-pink);
  transition: transform var(--transition-fast);
}

.brand-link:hover .brand-logo-wrap {
  transform: rotate(4deg) scale(1.06);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--brand-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Hinataw.exe Branding (as in image) --- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-hamburger-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #181528;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-hamburger-btn:hover {
  background: #231f3b;
  border-color: rgba(255, 92, 138, 0.5);
  color: #ff5c8a;
}

.brand-title-exe {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.brand-dot-exe {
  color: #ff5c8a;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(255, 92, 138, 0.4);
}

/* --- Search Bar & Manga Button (as in image) --- */
.nav-search-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 580px;
  justify-content: flex-end;
}

.pill-search-bar {
  display: flex;
  align-items: center;
  background: #131122;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 4px 6px 4px 18px;
  width: 100%;
  max-width: 440px;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

.pill-search-bar:focus-within {
  border-color: #ff5c8a;
  background: #17152a;
  box-shadow: 0 0 20px rgba(255, 92, 138, 0.25), inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

.pill-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  padding: 6px 4px;
}

.pill-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-filter-btn {
  background: #201c36;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-filter-btn:hover {
  background: #2a2547;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.search-submit-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #26223e;
  border: none;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-submit-btn:hover {
  background: #ff5c8a;
  color: #ffffff;
  transform: scale(1.08);
}

.pill-manga-btn {
  border: 1.5px solid #ff5c8a;
  background: rgba(255, 92, 138, 0.08);
  color: #ff70a6;
  border-radius: 9999px;
  padding: 7px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-manga-btn:hover {
  background: #ff5c8a;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 92, 138, 0.4);
}

/* --- Sidebar Drawer Menu --- */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: #110f1e;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2000;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 5px 0 35px rgba(0, 0, 0, 0.7);
}

.sidebar-drawer.open {
  left: 0;
}

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

.sidebar-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: #ff5c8a;
}

.sidebar-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.sidebar-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 11px 16px;
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item:hover {
  background: rgba(255, 92, 138, 0.15);
  border-color: rgba(255, 92, 138, 0.4);
  color: #ffffff;
  transform: translateX(4px);
}

/* --- Dedicated Search Results Page Styling --- */
.search-page-header {
  margin-bottom: 28px;
}

.search-page-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-results-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.search-count-pill {
  display: inline-block;
  background: rgba(255, 92, 138, 0.12);
  color: #ff70a6;
  border: 1px solid rgba(255, 92, 138, 0.25);
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 4px;
}

.brand-title .badge-ext {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  -webkit-text-fill-color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-pink);
  box-shadow: 0 0 8px var(--brand-pink);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Download / CTA Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ff2a85 0%, #a855f7 100%);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 42, 133, 0.55);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  padding: 160px 0 80px;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-pink-subtle);
  border: 1px solid var(--border-pink);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-pink);
  margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.15);
}

.hero-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-pink);
  box-shadow: 0 0 8px var(--brand-pink);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ff2a85 10%, #c084fc 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-preview-col {
  position: relative;
}

.mockup-container {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-pink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px var(--brand-pink-glow);
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.mockup-container:hover {
  transform: translateY(-6px) scale(1.01);
}

.mockup-header {
  height: 38px;
  background: #141122;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mockup-dots {
  display: flex;
  gap: 8px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mockup-body {
  position: relative;
  background: #000;
  line-height: 0;
}

.mockup-body img {
  width: 100%;
  height: auto;
  display: block;
}

.mockup-badge-floating {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(17, 14, 28, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-pink);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.floating-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.floating-text-primary {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
}

.floating-text-sub {
  font-size: 0.75rem;
  color: var(--brand-pink);
  font-weight: 600;
}

/* ==========================================================================
   STATS BAR
   ========================================================================== */
.stats-bar {
  margin: 40px auto 0;
  padding: 24px 32px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  display: block;
  letter-spacing: -0.5px;
}

.stat-value span {
  color: var(--brand-pink);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ==========================================================================
   SECTION COMMON
   ========================================================================== */
.section {
  padding: 0 0 60px;
  position: relative;
  z-index: 1;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand-pink);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   INTERACTIVE LIVE STREAMING & CATALOG SECTION
   ========================================================================== */
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.catalog-tabs {
  display: flex;
  gap: 10px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  box-shadow: 0 4px 14px var(--brand-pink-glow);
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px 12px 42px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--brand-pink);
  box-shadow: 0 0 12px var(--brand-pink-subtle);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Media Cards Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* --- Trending carousels --- */
.trend-row {
  margin-bottom: 26px;
}

.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trend-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.trend-nav {
  display: flex;
  gap: 6px;
}

.trend-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.trend-arrow:hover {
  border-color: var(--border-pink);
  background: rgba(255, 92, 138, 0.16);
}

/* The track itself scrolls horizontally with snap points, which gives the
   carousel a smooth "switching" motion on both wheel/touch and the arrows. */
.trend-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.trend-track::-webkit-scrollbar {
  display: none;
}

.trend-track .media-card {
  flex: 0 0 148px;
  width: 148px;
  scroll-snap-align: start;
  animation: trend-card-in 0.4s ease both;
}

@keyframes trend-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .trend-track .media-card { flex: 0 0 128px; width: 128px; }
}

.media-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  /* Explicit properties instead of `all`: with 100+ cards on screen this keeps
     the compositor off the style-recalc path during scroll. */
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.media-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-pink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--brand-pink-glow);
}

.media-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #141122;
}

.media-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.media-badge-type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-anime {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
}
.badge-ongoing {
  border-color: #10b981 !important;
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-ongoing::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 1.5s infinite;
}
.badge-movie {
  border-color: var(--brand-purple);
  color: var(--brand-lavender);
}
.badge-series {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}
.badge-cartoon {
  border-color: #f59e0b;
  color: #fbbf24;
}
.badge-hindi {
  border-color: #f97316;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.15);
}

.media-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 14, 28, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.media-card:hover .media-play-overlay {
  opacity: 1;
}

.play-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px var(--brand-pink);
  transform: scale(0.8);
  transition: transform var(--transition-fast);
}

.media-card:hover .play-circle {
  transform: scale(1);
}

.media-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.media-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Audio track a title actually plays, so the grid is browsable by language. */
.media-lang {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-pink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 42, 133, 0.2);
}

.feature-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-pink-subtle), var(--brand-purple-subtle));
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--brand-pink);
  margin-bottom: 24px;
}

.feature-card:hover .feature-icon-wrap {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  box-shadow: 0 0 20px var(--brand-pink-glow);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   SCREENSHOTS SHOWCASE CAROUSEL
   ========================================================================== */
.screenshot-showcase {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.screenshot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}

.ss-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ss-tab.active, .ss-tab:hover {
  background: var(--brand-pink);
  color: white;
  border-color: var(--brand-pink);
  box-shadow: 0 0 16px var(--brand-pink-glow);
}

.screenshot-display {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.screenshot-display img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 600px;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.screenshot-caption {
  margin-top: 18px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   DOWNLOAD CENTER (hinataw.exe)
   ========================================================================== */
.downloads-container {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: start;
}

.download-main-card {
  background: linear-gradient(135deg, rgba(23, 19, 38, 0.95), rgba(30, 20, 50, 0.85));
  border: 2px solid var(--brand-pink);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px var(--brand-pink-glow);
  position: relative;
  overflow: hidden;
}

.download-badge-popular {
  position: absolute;
  top: 20px;
  right: -35px;
  background: linear-gradient(135deg, var(--brand-pink), #a855f7);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 45px;
  transform: rotate(45deg);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.download-main-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.download-logo-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--brand-pink);
  box-shadow: 0 0 20px var(--brand-pink-glow);
}

.download-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-app-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.download-app-info p {
  color: var(--brand-pink);
  font-weight: 700;
  font-size: 0.95rem;
}

.download-features-list {
  list-style: none;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.download-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.download-feature-item svg {
  color: #10b981;
  flex-shrink: 0;
}

.download-actions-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-download-hero {
  padding: 18px 36px;
  font-size: 1.15rem;
  font-weight: 800;
}

.btn-download-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-download-sub a {
  color: var(--brand-pink);
  text-decoration: underline;
}

.downloads-alt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.alt-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.alt-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: white;
  transition: all var(--transition-fast);
}

.alt-item:hover {
  border-color: var(--border-pink);
  background: rgba(255, 42, 133, 0.08);
}

.alt-os-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alt-os-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.alt-os-format {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alt-btn-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-pink);
  background: var(--brand-pink-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   SETUP & HOW IT WORKS
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
}

.step-number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-pink-subtle);
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--brand-pink);
  margin-bottom: 20px;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: white;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--border-pink);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-chevron {
  transition: transform var(--transition-fast);
  color: var(--brand-pink);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 24px 20px;
}

/* ==========================================================================
   STREAMING / TRAILER MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-pink);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 50px var(--brand-pink-glow);
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--brand-pink);
}

.modal-player-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.modal-player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-details {
  padding: 28px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.modal-badges {
  display: flex;
  gap: 10px;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-stream-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.modal-stream-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-stream-sources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.source-pill {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-pill.active, .source-pill:hover {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  border-color: var(--brand-pink);
  box-shadow: 0 0 14px var(--brand-pink-glow);
}

/* Episode & Season Selector in Modal */
.episode-selector-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(10, 8, 18, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 16px;
}

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

.season-select {
  background: var(--bg-secondary);
  color: white;
  border: 1px solid var(--border-pink);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.episodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 90px;
  overflow-y: auto;
  padding-right: 4px;
}

.episodes-list::-webkit-scrollbar {
  width: 6px;
}
.episodes-list::-webkit-scrollbar-thumb {
  background: #3b325c;
  border-radius: 3px;
}

.episode-chip {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.episode-chip:hover {
  background: rgba(255, 42, 133, 0.2);
  border-color: var(--brand-pink);
  color: white;
}

.episode-chip.active {
  background: var(--brand-pink);
  border-color: var(--brand-pink);
  color: white;
  box-shadow: 0 0 10px var(--brand-pink-glow);
}

.modal-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-stream-popout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-stream-popout:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: white;
}

/* API Status Indicator */
.api-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.api-status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.5s infinite;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-pink);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--brand-pink-glow);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: #06050b;
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 340px;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

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

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--brand-pink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 36px;
  }
  .hero-buttons {
    justify-content: center;
  }
  .download-meta {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .downloads-container {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .download-features-list {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* ==========================================================================
   FULL PAGE SERIES WATCH VIEW (After clicking a series)
   ========================================================================== */
#watchView {
  display: none;
  min-height: 100vh;
  padding: 100px 0 60px;
  position: relative;
  z-index: 10;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.watch-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-pink);
  color: white;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-back:hover {
  background: var(--brand-pink);
  box-shadow: 0 0 16px var(--brand-pink-glow);
  transform: translateX(-4px);
}

.watch-breadcrumbs {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.watch-breadcrumbs span {
  color: var(--brand-pink);
  font-weight: 700;
}

/* Full Cinematic Player Frame */
.watch-cinema-box {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-pink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--brand-pink-glow);
  margin-bottom: 28px;
}

.player-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #141124;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.player-mode-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-mode-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-mode-btn.active, .player-mode-btn:hover {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  border-color: var(--brand-pink);
  box-shadow: 0 0 12px var(--brand-pink-glow);
}

.stream-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.stream-status-pill .status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 1.5s infinite;
}

.watch-player-viewport {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

/* Clean "not available" state shown instead of a dead third-party embed. */
.player-unavailable {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 42, 133, 0.12), transparent 62%),
    #09080f;
}

.player-unavailable-badge {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-pink);
  border: 1px solid rgba(255, 42, 133, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
}

.player-unavailable-title {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  color: #fff;
}

.player-unavailable-text {
  margin: 0;
  max-width: 46ch;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.player-unavailable-btn {
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-pink), #7b5bff);
}

.watch-native-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  background: #000;
}

.watch-native-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.watch-controls-strip {
  padding: 18px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Full Episode & Season Grid */
.watch-episodes-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.watch-episodes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.watch-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.watch-ep-btn {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.watch-ep-btn:hover {
  background: rgba(255, 42, 133, 0.2);
  border-color: var(--brand-pink);
}

.watch-ep-btn.active {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  border-color: var(--brand-pink);
  box-shadow: 0 0 16px var(--brand-pink-glow);
}

/* Series Meta Deep Dive */
.watch-meta-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.watch-poster-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
}

.watch-meta-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.watch-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.watch-tag {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.watch-synopsis {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Movie Notice Modal */
.movie-notice-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.movie-notice-modal.active {
  opacity: 1;
  visibility: visible;
}

.movie-notice-box {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 193, 7, 0.4);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.movie-notice-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.movie-notice-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.movie-notice-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .watch-meta-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .watch-poster-img {
    max-width: 220px;
    margin: 0 auto;
  }
}


/* ==========================================================================
   PLAYER LOADING OVERLAY & ERROR STATES
   ========================================================================== */
.player-loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 8, 16, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  gap: 16px;
  pointer-events: none;
}

.player-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 42, 133, 0.2);
  border-top: 4px solid var(--brand-pink);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.player-loading-overlay p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.watch-player-viewport {
  position: relative;
}

.player-error-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 50, 50, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  animation: toastSlideIn 0.3s ease;
  backdrop-filter: blur(12px);
}

@keyframes toastSlideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.player-auto-switch-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(139, 92, 246, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  animation: toastSlideIn 0.3s ease;
  backdrop-filter: blur(12px);
}

/* ==========================================================================
   DUAL-ENGINE PLAYER: STANDARD & ALTERNATIVE (AD-FREE SANDBOXED)
   ========================================================================== */
.player-engine-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.engine-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.engine-toggle-btn.active {
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  color: white;
  box-shadow: 0 0 12px var(--brand-pink-glow);
}

.engine-toggle-btn:hover:not(.active) {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Responsive Navbar & Search Pill --- */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    padding: 12px 0;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-search-wrapper {
    max-width: 100%;
    order: 3;
    width: 100%;
    margin-top: 4px;
  }
  .pill-search-bar {
    max-width: 100%;
  }
  .brand-title-exe {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   PREVIOUS-SITE HOMEPAGE APPEARANCE
   Spotlight hero, genre pills and left-aligned "Latest Episode" heading.
   ========================================================================== */
:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Syne', 'Plus Jakarta Sans', sans-serif;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-main);
}

.brand-title-exe,
.hero-title,
.catalog-heading {
  font-family: var(--font-heading);
}

.home-hero-wrap {
  position: relative;
  z-index: 1;
  padding-top: 96px;
}

/* --- Spotlight banner --- */
.hero-banner {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #111118;
  margin-bottom: 4px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: brightness(0.82) saturate(1.05);
  transition: opacity 0.5s ease-in-out;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8, 8, 13, 0.72) 0%, rgba(8, 8, 13, 0.25) 48%, transparent 100%),
    linear-gradient(90deg, rgba(8, 8, 13, 0.9) 0%, rgba(8, 8, 13, 0.52) 48%, transparent 88%);
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 700px;
  padding: 30px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Slide change animation: the copy slides in while the artwork cross-fades, so
   switching features reads as a transition instead of a hard cut. */
@keyframes hero-slide-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.985); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.hero-content.hero-enter {
  animation: hero-slide-in 0.55s cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

.hero-backdrop.is-switching {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content.hero-enter { animation: none; }
  .hero-backdrop { transition: none; }
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffbade;
}

.hero-score {
  color: #fbbf24;
}

.hero-sep {
  color: rgba(255, 255, 255, 0.38);
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-desc {
  max-width: 590px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #c7c7d8;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  background: #ffffff;
  color: #08080d;
  border: 0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.hero-watch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.22);
}

.hero-watch-btn svg {
  flex-shrink: 0;
}

/* --- Hero thumbnail switcher --- */
.hero-thumbs {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 8;
  display: flex;
  gap: 10px;
}

.hero-thumb-btn {
  width: 52px;
  height: 74px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.6;
  background: #111118;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-thumb-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.hero-thumb-btn.active {
  border-color: #ff5c8a;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(255, 92, 138, 0.45);
}

.hero-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Hero slider controls --- */
.hero-slider-controls {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-nav-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(10, 10, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s, transform 0.15s;
}

.hero-nav-btn:hover {
  background: rgba(255, 92, 138, 0.85);
  transform: translateY(-1px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 20px;
  border-radius: 4px;
  background: #ff5c8a;
}

/* --- Genre filter pills --- */
.genre-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
}

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

.genre-btn {
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.genre-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.genre-btn.active {
  background: #ff5c8a;
  border-color: #ff5c8a;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 92, 138, 0.4);
}

/* --- Catalog heading + pill category tabs --- */
.catalog-heading-row {
  margin: 4px 0 16px;
}

.catalog-heading {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.catalog-subtitle {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.catalog-tabs {
  gap: 8px;
  padding: 0 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab-btn {
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.tab-btn.active {
  background: #ff5c8a;
  border-color: #ff5c8a;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 92, 138, 0.4);
}

@media (max-width: 1024px) {
  .hero-banner {
    min-height: 330px;
  }
  .hero-content {
    padding: 26px;
    max-width: 640px;
  }
  .hero-thumbs {
    right: 18px;
    bottom: 18px;
  }
  .hero-thumb-btn {
    width: 46px;
    height: 66px;
  }
}

@media (max-width: 860px) {
  .hero-thumbs {
    display: none;
  }
  .hero-banner {
    min-height: 310px;
  }
  .hero-content {
    max-width: 100%;
    padding: 24px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-desc {
    -webkit-line-clamp: 2;
  }
  .hero-slider-controls {
    left: auto;
    right: 18px;
    bottom: 16px;
    transform: none;
  }
}

@media (max-width: 600px) {
  .home-hero-wrap {
    padding-top: 124px;
  }
  .hero-banner {
    min-height: 300px;
    border-radius: 14px;
  }
  .hero-content {
    padding: 20px 18px 54px;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-kicker {
    gap: 6px 8px;
    font-size: 0.7rem;
  }
  .hero-subtitle {
    font-size: 0.78rem;
    margin-bottom: 8px;
  }
  .hero-desc {
    font-size: 0.8rem;
    margin-bottom: 14px;
  }
  .hero-watch-btn {
    padding: 10px 18px;
    font-size: 0.8rem;
  }
  .catalog-heading {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   MOBILE FIT + PERFORMANCE
   ========================================================================== */
@media (max-width: 768px) {
  /* backdrop-filter on a fixed bar is the single most expensive thing on a
     phone; the opaque background below is enough while scrolling. */
  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(9, 8, 16, 0.97);
  }

  .container {
    padding: 0 14px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .media-card:hover {
    transform: none;
    box-shadow: none;
  }

  .nav-container {
    gap: 8px;
  }

  .watch-cinema-box {
    border-radius: 10px;
  }

  .watch-episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
  }
}

/* Nothing may push the layout wider than the viewport. */
img,
video,
iframe {
  max-width: 100%;
}

#mainView,
#searchView,
#watchView,
.footer {
  overflow-x: hidden;
}

/* Episode jump row: was inline-styled, which let it overflow the phone width. */
.ep-jump-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .watch-episodes-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .watch-episodes-head > div:first-child {
    justify-content: space-between;
  }

  .ep-jump-control {
    width: 100%;
  }

  .ep-jump-control input {
    flex: 1 1 72px;
    min-width: 64px;
    max-width: 120px;
  }

  .watch-breadcrumbs {
    display: none;
  }

  .watch-controls-strip {
    flex-wrap: wrap;
    gap: 10px;
  }

  .modal-actions-group {
    width: 100%;
  }

  .btn-stream-popout {
    width: 100%;
    justify-content: center;
  }
}
