/* ============================================
   GoldCine – CSS Premium Gold & Black Theme
   ============================================ */

:root {
  --gold: #FFD700;
  --gold-dark: #B8860B;
  --gold-light: #FFE55C;
  --gold-dim: rgba(255,215,0,0.15);
  --gold-border: rgba(255,215,0,0.3);
  --black: #0A0A0A;
  --dark: #111111;
  --dark2: #181818;
  --dark3: #242424;
  --dark4: #2E2E2E;
  --text: #FFFFFF;
  --text-dim: #AAAAAA;
  --text-dimmer: #666666;
  --danger: #FF4444;
  --success: #44DD88;
  --radius: 10px;
  --radius-lg: 16px;
  --header-h: 60px;
  --nav-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  background: var(--black);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Rajdhani', 'Montserrat', sans-serif;
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; background: none; }
input, select, textarea { font-family: inherit; color: var(--text); }
img { display: block; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 99px; }

/* ============= SPLASH ============= */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash.fade-out { opacity: 0; visibility: hidden; }

.splash-logo {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: splashPulse 1.5s ease-in-out infinite alternate;
}
.splash-icon { width: 80px; height: 80px; filter: drop-shadow(0 0 20px rgba(255,215,0,0.6)); }
.splash-title {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem; font-weight: 700;
  background: linear-gradient(135deg, #FFE55C, #FFD700, #B8860B);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
}
.splash-sub {
  font-size: 0.75rem; letter-spacing: 6px; text-transform: uppercase;
  color: var(--text-dim);
}
.splash-loader {
  width: 160px; height: 2px;
  background: var(--dark3); border-radius: 99px; overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  animation: loaderAnim 1.8s ease-in-out forwards;
}
@keyframes loaderAnim { 0%{width:0%} 60%{width:70%} 90%{width:92%} 100%{width:100%} }
@keyframes splashPulse { from{opacity:0.85;transform:scale(0.98)} to{opacity:1;transform:scale(1)} }

/* ============= MODAL OVERLAY ============= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-box {
  background: var(--dark2);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 14px;
  animation: slideUp 0.35s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }

.modal-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--gold);
}
.modal-logo svg path { fill: var(--gold); }

.modal-box h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem; text-align: center; color: var(--gold);
}
.modal-box p { font-size: 0.9rem; color: var(--text-dim); text-align: center; line-height: 1.5; }

.setup-steps { display: flex; flex-direction: column; gap: 8px; }
.step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.85rem; color: var(--text-dim);
}
.step span:first-child {
  min-width: 24px; height: 24px;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--gold); font-weight: 600;
}
.step a { color: var(--gold); }

.setup-input {
  width: 100%; padding: 12px 14px;
  background: var(--dark3); border: 1px solid var(--gold-border);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.setup-input:focus { border-color: var(--gold); outline: none; }

.setup-note { font-size: 0.75rem !important; color: var(--text-dimmer) !important; }

/* ============= BUTTONS ============= */
.btn-gold {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #FFD700, #B8860B);
  color: #000; font-weight: 700; font-size: 0.95rem;
  border-radius: var(--radius); letter-spacing: 0.5px;
  transition: all 0.2s; text-transform: uppercase;
  font-family: 'Rajdhani', sans-serif;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,215,0,0.35); }
.btn-gold:active { transform: translateY(0); }
.btn-gold.full { width: 100%; }

.btn-outline {
  width: 100%; padding: 11px;
  background: transparent; border: 1px solid var(--gold-border);
  color: var(--gold); font-weight: 600; font-size: 0.9rem;
  border-radius: var(--radius); transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif; text-transform: uppercase;
}
.btn-outline:hover { background: var(--gold-dim); }
.btn-outline.danger { border-color: rgba(255,68,68,0.4); color: var(--danger); }
.btn-outline.danger:hover { background: rgba(255,68,68,0.1); }

/* ============= HEADER ============= */
.main-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(10,10,10,0.98) 0%, rgba(10,10,10,0.7) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,215,0,0.08);
  transition: background 0.3s;
}
.main-header.scrolled { background: rgba(10,10,10,0.98); }

.header-logo-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.header-logo-btn span {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem; font-weight: 700;
  background: linear-gradient(135deg, #FFE55C, #FFD700, #B8860B);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.header-right { display: flex; align-items: center; gap: 4px; }
.header-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.header-icon-btn:hover { color: var(--gold); background: var(--gold-dim); }

/* ============= BOTTOM NAV ============= */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,215,0,0.12);
  display: flex; align-items: flex-start; justify-content: space-around;
  padding-top: 6px;
  padding-bottom: var(--safe-bottom);
}
.bottom-nav.hidden { display: none; }

.nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 6px 4px;
  color: var(--text-dimmer); font-size: 0.65rem;
  font-weight: 500; letter-spacing: 0.3px;
  transition: color 0.2s; border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  text-transform: uppercase;
}
.nav-btn svg { transition: transform 0.2s; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active svg { filter: drop-shadow(0 0 4px rgba(255,215,0,0.5)); transform: scale(1.1); }
.nav-btn:active { transform: scale(0.94); }

/* ============= APP MAIN ============= */
.app-main {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
  min-height: 100vh;
}
.app-main.hidden { display: none; }

/* ============= PAGES ============= */
.page { display: none; min-height: calc(100vh - var(--header-h)); }
.page.active { display: block; }

/* ============= FEATURED BANNER ============= */
.featured-section {
  position: relative; height: 58vw; max-height: 400px; min-height: 260px;
  overflow: hidden; background: var(--dark2);
}
.featured-slider { display: flex; height: 100%; width: 100%; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

.featured-item {
  min-width: 100%; height: 100%; position: relative;
  display: flex; align-items: flex-end;
}
.featured-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
}
.featured-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,10,10,1) 0%, rgba(10,10,10,0.5) 40%, rgba(10,10,10,0.1) 80%, transparent 100%);
}
.featured-info {
  position: relative; z-index: 2;
  padding: 20px 20px 24px;
  width: 100%;
}
.featured-badge {
  display: inline-block; padding: 3px 8px;
  background: var(--gold); color: #000;
  font-size: 0.65rem; font-weight: 700; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.featured-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 700; line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 6px;
}
.featured-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-dim); margin-bottom: 14px;
}
.featured-rating { color: var(--gold); font-weight: 600; }
.featured-actions { display: flex; gap: 10px; }

.btn-play {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #FFD700, #B8860B);
  color: #000; font-weight: 700; font-size: 0.85rem;
  border-radius: var(--radius); transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-play:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(255,215,0,0.4); }
.btn-more {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.12);
  color: var(--text); font-weight: 600; font-size: 0.85rem;
  border-radius: var(--radius); transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
  font-family: 'Rajdhani', sans-serif; text-transform: uppercase;
}
.btn-more:hover { background: rgba(255,255,255,0.2); }

.featured-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 3;
}
.featured-dot {
  width: 6px; height: 6px; border-radius: 99px;
  background: rgba(255,255,255,0.3); transition: all 0.3s;
}
.featured-dot.active { width: 18px; background: var(--gold); }

/* ============= HOME ROWS ============= */
.rows-container { padding: 4px 0 12px; }
.content-row { margin-bottom: 6px; }
.row-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.row-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.row-title::before {
  content: ''; display: block; width: 3px; height: 16px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  border-radius: 2px;
}
.row-see-all {
  font-size: 0.75rem; color: var(--gold); font-weight: 500;
  letter-spacing: 0.5px;
}
.row-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 0 16px 8px;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.row-scroll::-webkit-scrollbar { display: none; }

/* ============= CARD ============= */
.card {
  flex-shrink: 0;
  width: 110px;
  scroll-snap-align: start;
  cursor: pointer; position: relative;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.95); }
.card-poster {
  width: 110px; height: 165px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--dark3);
  border: 1px solid rgba(255,215,0,0.08);
  transition: border-color 0.2s;
}
.card:hover .card-poster { border-color: rgba(255,215,0,0.35); }
.card-poster-placeholder {
  width: 110px; height: 165px;
  border-radius: var(--radius);
  background: var(--dark3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--text-dimmer); font-size: 0.65rem; text-align: center;
  border: 1px solid rgba(255,215,0,0.08);
}
.card-poster-placeholder span:first-child { font-size: 1.5rem; }
.card-title {
  margin-top: 6px; font-size: 0.72rem; font-weight: 500;
  color: var(--text-dim); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-rating {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.75); border-radius: 4px;
  padding: 2px 5px; font-size: 0.65rem;
  font-weight: 700; color: var(--gold);
  display: flex; align-items: center; gap: 2px;
}
.card-type-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,0.7); border-radius: 4px;
  padding: 2px 5px; font-size: 0.6rem; color: var(--text-dim);
  font-weight: 600; text-transform: uppercase;
}
.card-heart {
  position: absolute; bottom: 28px; right: 6px;
  width: 26px; height: 26px;
  background: rgba(0,0,0,0.6); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; opacity: 0; transition: opacity 0.2s;
  z-index: 2;
}
.card:hover .card-heart { opacity: 1; }
.card-heart.in-list { opacity: 1; color: var(--gold); }

/* Continue watching card */
.card-progress {
  height: 3px; background: var(--dark4); border-radius: 2px;
  margin-top: 4px; overflow: hidden;
}
.card-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* ============= CATALOG PAGE ============= */
.catalog-header { padding: 20px 16px 8px; }
.catalog-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem; font-weight: 700; color: var(--text);
  margin-bottom: 14px;
}
.genre-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.genre-scroll::-webkit-scrollbar { display: none; }
.genre-chip {
  flex-shrink: 0; padding: 6px 14px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.15);
  border-radius: 99px; font-size: 0.78rem; color: var(--text-dim);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  font-weight: 500;
}
.genre-chip.active {
  background: var(--gold); color: #000; border-color: var(--gold);
  font-weight: 700;
}
.genre-chip:hover:not(.active) { border-color: var(--gold-border); color: var(--text); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 12px 12px 0;
}
.catalog-card {
  cursor: pointer; position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s;
}
.catalog-card:active { transform: scale(0.95); }
.catalog-poster {
  width: 100%; aspect-ratio: 2/3;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--dark3);
  border: 1px solid rgba(255,215,0,0.08);
  transition: border-color 0.2s;
}
.catalog-card:hover .catalog-poster { border-color: rgba(255,215,0,0.3); }
.catalog-card-title {
  font-size: 0.7rem; color: var(--text-dim);
  margin-top: 5px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.catalog-card-rating {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,0.75); border-radius: 4px;
  padding: 2px 5px; font-size: 0.62rem; color: var(--gold); font-weight: 700;
}
.load-more-wrap { display: flex; justify-content: center; padding: 24px 16px; }
.btn-load-more {
  padding: 11px 32px;
  background: transparent; border: 1px solid var(--gold-border);
  color: var(--gold); font-size: 0.85rem; font-weight: 600;
  border-radius: 99px; transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 1px;
}
.btn-load-more:hover { background: var(--gold-dim); }

/* ============= SEARCH ============= */
.search-container { padding: 16px; }
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--dark2); border: 1px solid var(--gold-border);
  border-radius: 99px; padding: 10px 16px;
  color: var(--text-dim); margin-bottom: 16px;
}
.search-input-wrap:focus-within { border-color: var(--gold); }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 0.95rem; color: var(--text);
}
.search-input::placeholder { color: var(--text-dimmer); }
.search-clear {
  color: var(--text-dimmer); font-size: 0.8rem; padding: 2px 4px;
  transition: color 0.2s;
}
.search-clear:hover { color: var(--text); }
.search-clear.hidden { display: none; }

.search-results { display: flex; flex-direction: column; gap: 10px; }
.search-result-item {
  display: flex; gap: 12px;
  background: var(--dark2); border-radius: var(--radius);
  padding: 10px; cursor: pointer;
  border: 1px solid rgba(255,215,0,0.06);
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.search-result-item:hover { border-color: var(--gold-border); }
.search-result-poster {
  width: 52px; height: 78px; border-radius: 6px;
  object-fit: cover; background: var(--dark3); flex-shrink: 0;
}
.search-result-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.search-result-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.search-result-meta { font-size: 0.75rem; color: var(--text-dim); }
.search-result-desc {
  font-size: 0.72rem; color: var(--text-dimmer);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.search-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px; text-align: center;
}
.search-empty-icon { font-size: 3rem; }
.search-empty p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* ============= DETAIL PAGE ============= */
.detail-back-bar { padding: 16px 16px 0; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-dim); font-size: 0.85rem; font-weight: 500;
  padding: 6px 0; transition: color 0.2s;
}
.back-btn:hover { color: var(--gold); }

.detail-backdrop {
  width: 100%; aspect-ratio: 16/9; max-height: 240px;
  object-fit: cover; background: var(--dark2);
  position: relative;
}
.detail-backdrop-wrap {
  position: relative; overflow: hidden;
}
.detail-backdrop-wrap::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(0deg, var(--black), transparent);
}

.detail-main { padding: 0 16px 24px; }
.detail-top { display: flex; gap: 14px; margin-top: -40px; position: relative; z-index: 2; }
.detail-poster {
  width: 100px; height: 150px; border-radius: var(--radius);
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,215,0,0.3);
  background: var(--dark3);
}
.detail-info { flex: 1; padding-top: 44px; }
.detail-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem; font-weight: 700; line-height: 1.2;
  margin-bottom: 6px;
}
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 0.75rem; color: var(--text-dim); margin-bottom: 8px;
}
.detail-meta-item { display: flex; align-items: center; gap: 4px; }
.detail-rating-badge {
  display: flex; align-items: center; gap: 4px;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  padding: 3px 8px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; color: var(--gold);
}
.detail-action-row {
  display: flex; gap: 10px; margin: 16px 0;
}
.btn-play-detail {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px;
  background: linear-gradient(135deg, #FFD700, #B8860B);
  color: #000; font-weight: 700; font-size: 0.9rem;
  border-radius: var(--radius); transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-play-detail:hover { box-shadow: 0 4px 16px rgba(255,215,0,0.35); }
.btn-list-detail {
  width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark3); border: 1px solid var(--gold-border);
  border-radius: var(--radius); color: var(--gold);
  font-size: 1.1rem; transition: all 0.2s;
}
.btn-list-detail:hover { background: var(--gold-dim); }
.btn-list-detail.in-list { background: var(--gold-dim); }

.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.detail-genre-tag {
  padding: 4px 10px; border-radius: 99px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.15);
  font-size: 0.72rem; color: var(--text-dim);
}

.detail-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem; font-weight: 600; color: var(--gold);
  margin: 18px 0 8px; display: flex; align-items: center; gap: 6px;
}
.detail-section-title::before {
  content: ''; display: block; width: 3px; height: 14px;
  background: var(--gold); border-radius: 2px;
}
.detail-overview { font-size: 0.85rem; color: var(--text-dim); line-height: 1.6; }

/* Cast scroll */
.cast-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-card { flex-shrink: 0; width: 72px; text-align: center; }
.cast-photo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  background: var(--dark3); border: 2px solid rgba(255,215,0,0.15); margin-bottom: 4px;
}
.cast-name { font-size: 0.65rem; color: var(--text-dim); line-height: 1.3; }

/* Seasons (detail) */
.seasons-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.seasons-row::-webkit-scrollbar { display: none; }
.season-btn {
  flex-shrink: 0; padding: 7px 14px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.15);
  border-radius: 99px; font-size: 0.78rem; color: var(--text-dim);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.season-btn.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }

.episodes-list { display: flex; flex-direction: column; gap: 8px; }
.episode-item {
  display: flex; gap: 12px; background: var(--dark2);
  border-radius: var(--radius); padding: 10px;
  cursor: pointer; border: 1px solid rgba(255,215,0,0.06);
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.episode-item:hover { border-color: var(--gold-border); }
.episode-thumb {
  width: 80px; height: 50px; border-radius: 6px;
  object-fit: cover; background: var(--dark3); flex-shrink: 0;
}
.episode-info { flex: 1; }
.episode-num { font-size: 0.68rem; color: var(--gold); font-weight: 600; }
.episode-name { font-size: 0.82rem; font-weight: 500; margin: 2px 0; }
.episode-desc { font-size: 0.7rem; color: var(--text-dimmer); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============= PLAYER ============= */
.player-page { background: var(--black); min-height: 100vh; }
.player-back-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: rgba(0,0,0,0.5);
}
.back-btn-white { color: var(--text-dim); }
.player-title-bar {
  font-size: 0.85rem; color: var(--text-dim); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-iframe-wrap {
  position: relative; width: 100%;
  padding-top: 56.25%; background: #000;
}
.player-iframe-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.player-loader {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.player-loader-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.player-loader-inner p { font-size: 0.85rem; color: var(--text-dim); }
.player-loader.hidden { display: none; }

.player-controls { padding: 16px; background: var(--dark); }
.source-selector { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.source-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.source-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.source-btn {
  padding: 6px 12px; border-radius: 99px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.15);
  font-size: 0.75rem; color: var(--text-dim); cursor: pointer;
  transition: all 0.2s;
}
.source-btn.active { background: var(--gold); color: #000; font-weight: 700; border-color: var(--gold); }
.source-btn:hover:not(.active) { border-color: var(--gold-border); color: var(--text); }

.episode-panel { display: flex; flex-direction: column; gap: 12px; }
.season-selector { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.season-selector::-webkit-scrollbar { display: none; }

.episode-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px; max-height: 200px; overflow-y: auto;
  padding: 2px 0;
}
.episode-list::-webkit-scrollbar { width: 3px; }
.ep-btn {
  padding: 8px 4px; background: var(--dark3);
  border: 1px solid rgba(255,215,0,0.1); border-radius: 6px;
  font-size: 0.72rem; color: var(--text-dim); cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.ep-btn.active { background: var(--gold); color: #000; font-weight: 700; border-color: var(--gold); }
.ep-btn:hover:not(.active) { border-color: var(--gold-border); color: var(--text); }

/* ============= ADMIN PANEL ============= */
.admin-overlay {
  position: fixed; inset: 0; z-index: 7000;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end;
  animation: fadeIn 0.25s ease;
}
.admin-overlay.hidden { display: none; }

.admin-container {
  width: 100%; max-height: 92vh;
  background: var(--dark);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid rgba(255,215,0,0.2); border-bottom: none;
  display: flex; flex-direction: column;
  animation: slideUp 0.3s ease;
}

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,215,0,0.1);
}
.admin-logo { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--gold); font-weight: 600; }
.admin-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--dark3); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: all 0.2s;
}
.admin-close-btn:hover { background: var(--dark4); color: var(--text); }

.admin-tabs {
  display: flex; gap: 2px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid rgba(255,215,0,0.1);
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 8px 8px 0 0;
  font-size: 0.8rem; font-weight: 600; color: var(--text-dimmer);
  transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer;
}
.admin-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.admin-tab:hover:not(.active) { color: var(--text-dim); }

.admin-content {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.admin-tab-content { display: none; flex-direction: column; gap: 10px; }
.admin-tab-content.active { display: flex; }

.admin-content label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.admin-input {
  width: 100%; padding: 10px 12px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.15);
  border-radius: var(--radius); color: var(--text); font-size: 0.88rem;
  transition: border-color 0.2s;
}
.admin-input:focus { border-color: var(--gold); outline: none; }
select.admin-input { appearance: none; cursor: pointer; }
.admin-color { height: 44px; padding: 4px 8px; cursor: pointer; }

.toggle-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--dark3); border-radius: var(--radius);
  cursor: pointer;
}
.toggle-label span:first-of-type { font-size: 0.85rem; color: var(--text); font-weight: 500; text-transform: none; letter-spacing: 0; }
.toggle-check { display: none; }
.toggle-slider {
  width: 42px; height: 24px; background: var(--dark4);
  border-radius: 99px; position: relative;
  transition: background 0.3s; flex-shrink: 0;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-dim); transition: transform 0.3s, background 0.3s;
}
.toggle-check:checked + .toggle-slider { background: var(--gold-dark); }
.toggle-check:checked + .toggle-slider::after { transform: translateX(18px); background: var(--gold); }

.admin-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem; color: var(--gold); font-weight: 600;
  padding: 10px 0 4px; text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,215,0,0.1);
}
.admin-section-title.danger-zone { color: var(--danger); border-bottom-color: rgba(255,68,68,0.2); }

.api-result {
  padding: 8px 12px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  min-height: 0; transition: all 0.3s;
}
.api-result.success { background: rgba(68,221,136,0.15); color: var(--success); border: 1px solid rgba(68,221,136,0.3); }
.api-result.error { background: rgba(255,68,68,0.12); color: var(--danger); border: 1px solid rgba(255,68,68,0.3); }

.admin-footer { padding: 12px 20px; border-top: 1px solid rgba(255,215,0,0.1); }
.auth-error { color: var(--danger); font-size: 0.8rem; text-align: center; font-weight: 600; }
.auth-error.hidden { display: none; }

.admin-auth-box { gap: 12px; }
.admin-auth-box h2 { font-size: 1.2rem; }

/* Sections list */
.sections-list { display: flex; flex-direction: column; gap: 6px; }
.section-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--dark3); border-radius: 8px;
}
.section-item-name { font-size: 0.83rem; color: var(--text); }

/* ============= MAINTENANCE ============= */
.maintenance-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.maintenance-screen.hidden { display: none; }
.maint-content { text-align: center; padding: 30px; }
.maint-icon { font-size: 4rem; margin-bottom: 20px; }
.maint-content h2 { font-family: 'Cinzel', serif; font-size: 1.5rem; color: var(--gold); margin-bottom: 12px; }
.maint-content p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* ============= TOAST ============= */
.toast-container {
  position: fixed; bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 6000; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 18px; border-radius: 99px;
  background: var(--dark3); border: 1px solid rgba(255,215,0,0.2);
  font-size: 0.82rem; font-weight: 600; color: var(--text);
  white-space: nowrap; animation: toastIn 0.3s ease;
  pointer-events: none;
}
.toast.success { background: rgba(68,221,136,0.15); border-color: rgba(68,221,136,0.3); color: var(--success); }
.toast.error { background: rgba(255,68,68,0.1); border-color: rgba(255,68,68,0.3); color: var(--danger); }
.toast.gold { background: rgba(255,215,0,0.12); border-color: var(--gold-border); color: var(--gold); }
@keyframes toastIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

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

/* ============= MISC ============= */
.hidden { display: none !important; }
.fade { animation: fadeIn 0.4s ease; }

.no-results {
  text-align: center; padding: 40px 20px;
  color: var(--text-dimmer); font-size: 0.88rem;
}

/* Responsive */
@media (min-width: 480px) {
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .card { width: 120px; }
  .card-poster, .card-poster-placeholder { width: 120px; height: 180px; }
}
@media (min-width: 640px) {
  .catalog-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 768px) {
  .featured-section { max-height: 500px; }
  .catalog-grid { grid-template-columns: repeat(6, 1fr); }
  .admin-container { max-width: 540px; margin: 0 auto; border-radius: var(--radius-lg); border: 1px solid rgba(255,215,0,0.2); }
  .admin-overlay { align-items: center; }
}
