@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #22223a;
  --accent: #e94560;
  --accent2: #ff6b35;
  --text: #ffffff;
  --text2: #aaaaaa;
  --nav-bg: #12121f;
  --nav-active: #e94560;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }

/* ── TOP BAR ── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 900;
  border-bottom: 1px solid var(--border);
}

#topbar .tb-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
  color: var(--text);
  font-size: 20px;
}
#topbar .tb-btn:active { background: var(--surface2); }

.logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 45%, #e94560 55%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}

/* ── BOTTOM NAV ── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--nav-bg);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 900;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav-tab svg { width: 22px; height: 22px; transition: transform var(--transition); }
.nav-tab.active { color: var(--nav-active); }
.nav-tab.active svg { transform: scale(1.1); }

/* ── MAIN CONTENT ── */
#main-content {
  padding-top: 56px;
  padding-bottom: 70px;
  min-height: 100vh;
}

/* ── HERO SLIDER ── */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(15,15,26,1) 0%, rgba(15,15,26,0.7) 50%, transparent 100%);
  padding: 20px 16px 16px;
}

.hero-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.hero-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }

.hero-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #ffd700; font-weight: 600;
}

.hero-duration { font-size: 12px; color: var(--text2); }

.hero-actions { display: flex; gap: 10px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  transition: opacity var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { opacity: 0.85; transform: scale(0.97); }

.btn-secondary {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background var(--transition);
}
.btn-secondary:active { background: rgba(255,255,255,0.2); }

.hero-dots {
  position: absolute;
  bottom: 10px; right: 16px;
  display: flex; gap: 5px;
  z-index: 2;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}
.hero-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

/* ── SECTION ── */
.section { padding: 20px 0 4px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; margin-bottom: 12px;
}
.section-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  letter-spacing: 1px;
}
.section-more {
  font-size: 12px; color: var(--accent);
  font-weight: 600; letter-spacing: 0.5px;
}

/* ── HORIZONTAL SCROLL ── */
.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── CARD ── */
.card {
  flex-shrink: 0;
  width: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.95); }

.card-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--surface2);
}

.card-info { padding: 8px; }
.card-title {
  font-size: 12px; font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-meta { font-size: 10px; color: var(--text2); margin-top: 3px; }

.card-rating {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; color: #ffd700; font-weight: 600; margin-top: 2px;
}

/* ── GRID ── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 16px;
}

.grid-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.grid-card:active { transform: scale(0.95); }
.grid-card .card-thumb { aspect-ratio: 2/3; width: 100%; object-fit: cover; background: var(--surface2); }
.grid-card .card-info { padding: 6px; }
.grid-card .card-title { font-size: 11px; }

/* ── GENRE FILTER ── */
.genre-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.genre-filter::-webkit-scrollbar { display: none; }

.genre-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.genre-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── SEARCH BAR ── */
.search-bar {
  margin: 0 16px 12px;
  position: relative;
}
.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px 10px 42px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text2); }
.search-bar .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text2);
  font-size: 16px;
}

/* ── SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
  animation: toastIn 0.3s ease forwards;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-10px); } }

/* ── DRAWER (hamburger) ── */
#drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#drawer-overlay.open { opacity: 1; pointer-events: all; }

#drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--surface);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding-bottom: 24px;
}
#drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 56px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 32px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 45%, #e94560 55%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.drawer-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text2);
  text-transform: uppercase;
  padding: 16px 20px 8px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.drawer-item:active { background: var(--surface2); }
.drawer-item svg { width: 20px; height: 20px; color: var(--text2); flex-shrink: 0; }

.lang-toggle {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
}
.lang-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1.5px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
}
.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── MORE BOTTOM SHEET ── */
#more-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#more-sheet-overlay.open { opacity: 1; pointer-events: all; }

#more-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  border-radius: 20px 20px 0 0;
  padding: 0 0 24px;
}
#more-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  margin: 12px auto;
}

/* ── SEARCH OVERLAY ── */
#search-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 950;
  padding-top: 56px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
#search-overlay.open { transform: translateY(0); }

.search-overlay-bar {
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.search-overlay-bar input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  outline: none;
}
.search-overlay-bar input:focus { border-color: var(--accent); }
.search-cancel { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }

#search-results { padding: 12px 0; }


/* ── DETAIL PAGE ── */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 0;
}
.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,15,26,0.3) 0%, rgba(15,15,26,1) 100%);
  z-index: 1;
}
.detail-hero-back {
  position: absolute;
  top: 16px; left: 16px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  z-index: 3;
  border: none;
  cursor: pointer;
}

.detail-body { padding: 16px; }

.detail-poster-row {
  display: flex; gap: 14px;
  margin-bottom: 16px;
}
.detail-poster {
  width: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

.detail-info { flex: 1; }
.detail-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 24px;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.detail-chip {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text2);
}
.detail-chip.accent { background: rgba(233,69,96,0.15); color: var(--accent); }

.detail-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.detail-stat strong { color: var(--text); }

.detail-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text2);
  margin: 12px 0;
}

.detail-section-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 18px;
  letter-spacing: 1px;
  margin: 20px 0 10px;
}

/* ── DOWNLOAD BUTTON ── */
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: opacity var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
  margin: 8px 0;
}
.download-btn:active { opacity: 0.85; transform: scale(0.98); }

.download-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--surface2);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
  margin: 6px 0;
}
.download-btn-secondary:active { background: var(--surface); }

/* ── ACCORDION (seasons) ── */
.accordion-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
.accordion-head .chevron {
  transition: transform 0.3s ease;
  color: var(--text2);
  font-size: 16px;
}
.accordion-item.open .accordion-head .chevron { transform: rotate(180deg); }
.accordion-body { display: none; }
.accordion-item.open .accordion-body { display: block; }

.episode-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition);
}
.episode-row:active { background: var(--surface2); }

.ep-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text2);
  flex-shrink: 0;
}

.ep-info { flex: 1; }
.ep-title { font-size: 13px; font-weight: 600; }
.ep-meta { font-size: 11px; color: var(--text2); margin-top: 2px; }

.ep-dl-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.ep-dl-btn:active { opacity: 0.8; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── STATIC PAGES ── */
.static-page { padding: 20px 16px; }
.static-page h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--accent);
}
.static-page h2 { font-size: 16px; margin: 20px 0 8px; color: var(--text); }
.static-page p { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 10px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 14px; }

/* ── RELATED SCROLL ── */
.related-section { margin-top: 8px; }

/* ── PARTS LIST ── */
.parts-list { display: flex; flex-direction: column; gap: 8px; }
.part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.part-label { font-size: 14px; font-weight: 600; }
.part-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ── NO RESULTS ── */
.no-results {
  text-align: center;
  padding: 32px 16px;
  color: var(--text2);
  font-size: 14px;
}


/* ── DESKTOP FIX ── */
@media (min-width: 480px) {
  #main-content { max-width: 480px; margin: 0 auto; }
  #topbar, #bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
}
