/* ============================================================
   CHUN FLIX — Main Stylesheet v2
   Claymorphism + Glassmorphism — Dark/Light — Fully Responsive
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --red-glow: rgba(229,9,20,0.3);
  --gold: #f5c518;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 0.14s ease;
  --shadow-clay: 5px 5px 0px rgba(0,0,0,0.22);
  --shadow-clay-hover: 9px 9px 0px rgba(0,0,0,0.28);
  --shadow-glow: 0 0 28px var(--red-glow);
  --header-h: 64px;
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --bg4: #242424;
  --surface: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text-muted: #888;
  --text-dim: #444;
  --card-bg: #1a1a1a;
  --clay-bg: linear-gradient(135deg,#1e1e1e,#2a2a2a);
  --clay-border: rgba(255,255,255,0.06);
  --input-bg: rgba(255,255,255,0.06);
  --header-bg: rgba(13,13,13,0.94);
}

[data-theme="light"] {
  --bg: #f0eeeb;
  --bg2: #e8e5e1;
  --bg3: #ddd9d4;
  --bg4: #d0ccc6;
  --surface: rgba(255,255,255,0.65);
  --surface-hover: rgba(255,255,255,0.9);
  --border: rgba(0,0,0,0.1);
  --text: #1a1a1a;
  --text-muted: #666;
  --text-dim: #aaa;
  --card-bg: #fff;
  --clay-bg: linear-gradient(135deg,#fff,#f5f3f0);
  --clay-border: rgba(0,0,0,0.07);
  --input-bg: rgba(0,0,0,0.05);
  --header-bg: rgba(240,238,235,0.94);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family:var(--font-body);
  background:var(--bg); color:var(--text);
  transition:background var(--transition), color var(--transition);
  overflow-x:hidden; min-height:100vh;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; border:none; background:none; font-family:var(--font-body); }
input,textarea,select { font-family:var(--font-body); }
ul { list-style:none; }

/* ── Page Loader ─────────────────────────────────────────────── */
#page-loader {
  position:fixed; inset:0; z-index:9999;
  background:#0d0d0d;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:24px;
  transition:opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity:0; visibility:hidden; }
.loader-logo { font-family:var(--font-display); font-size:3rem; font-weight:800; letter-spacing:-1px; }
.loader-logo .logo-c, .loader-logo .logo-flix { color:var(--red); }
.loader-logo .logo-rest { color:#fff; }
.loader-bar { width:180px; height:4px; background:rgba(255,255,255,0.1); border-radius:99px; overflow:hidden; }
.loader-fill { height:100%; width:0%; background:var(--red); border-radius:99px; animation:loadFill 1.3s ease forwards; }
@keyframes loadFill { to { width:100%; } }

/* ═══════════════════════════════════════════════════════════
   HEADER — Fully responsive
   ═══════════════════════════════════════════════════════════ */
.site-header {
  position:fixed; top:0; left:0; right:0;
  height:var(--header-h); z-index:500;
  background:var(--header-bg);
  backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--border);
  transition:background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled { box-shadow:0 4px 30px rgba(0,0,0,0.4); }

.header-inner {
  max-width:1400px; margin:0 auto; height:100%;
  padding:0 16px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}

/* Left side */
.header-left { display:flex; align-items:center; gap:12px; min-width:0; flex-shrink:0; }
.header-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }

/* ── Logo ── */
.site-logo {
  font-family:var(--font-display); font-weight:800;
  letter-spacing:-0.5px; white-space:nowrap;
  display:flex; align-items:center; gap:1px;
  line-height:1;
}
.site-logo .logo-c, .site-logo .logo-flix { color:var(--red); }

/* Desktop logo: show ChunFlix, hide CFlix */
.logo-desktop { font-size:1.55rem; display:flex; }
.logo-mobile  { font-size:1.5rem;  display:none; }

/* Nav links — desktop only */
.header-nav { display:flex; align-items:center; gap:2px; }
.header-nav a {
  padding:6px 11px; border-radius:var(--radius-sm);
  font-size:0.85rem; font-weight:500; color:var(--text-muted);
  transition:var(--transition-fast); white-space:nowrap;
}
.header-nav a:hover { color:var(--text); background:var(--surface); }

/* ── Search ── */
.header-search {
  display:flex; align-items:center;
  background:var(--input-bg); border:1.5px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
  transition:var(--transition);
}
.header-search:focus-within { border-color:var(--red); box-shadow:0 0 0 3px var(--red-glow); }

/* Desktop: input always visible */
.header-search input {
  background:none; border:none; outline:none;
  padding:7px 14px; color:var(--text); font-size:0.85rem;
  width:180px; transition:width var(--transition);
}
.header-search input:focus { width:220px; }
.search-submit-btn { padding:7px 12px; color:var(--text-muted); transition:var(--transition-fast); }
.search-submit-btn:hover { color:var(--red); }
/* Mobile search icon button (hidden on desktop) */
.search-icon-btn { display:none; padding:7px 10px; color:var(--text-muted); }

/* ── Theme Toggle ── */
.theme-toggle {
  width:36px; height:36px; flex-shrink:0;
  background:var(--surface); border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center;
  font-size:0.85rem; color:var(--text-muted);
  transition:var(--transition);
}
.theme-toggle:hover { background:var(--surface-hover); color:var(--gold); }

/* ── User Menu ── */
.user-menu { position:relative; }
.user-btn {
  display:flex; align-items:center; gap:7px;
  padding:5px 10px; border-radius:var(--radius-sm);
  background:var(--surface); border:1.5px solid var(--border);
  color:var(--text); font-size:0.85rem; transition:var(--transition);
  max-width:160px;
}
.user-btn:hover { background:var(--surface-hover); }
.user-avatar {
  width:26px; height:26px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,var(--red),#6c3fc5);
  display:flex; align-items:center; justify-content:center;
  font-size:0.75rem; font-weight:800; color:#fff;
}
.user-name-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:80px; }
.user-chevron { font-size:0.65rem; flex-shrink:0; }
.user-dropdown {
  position:absolute; top:calc(100% + 8px); right:0;
  min-width:170px; background:var(--bg3);
  border:1px solid var(--border); border-radius:var(--radius-md);
  box-shadow:0 16px 40px rgba(0,0,0,0.3);
  padding:6px; z-index:200;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:var(--transition);
}
.user-dropdown.open { opacity:1; visibility:visible; transform:translateY(0); }
.user-dropdown a {
  display:flex; align-items:center; gap:10px;
  padding:9px 12px; border-radius:var(--radius-sm);
  font-size:0.85rem; color:var(--text-muted); transition:var(--transition-fast);
}
.user-dropdown a:hover { background:var(--surface); color:var(--text); }
.user-dropdown a i { width:15px; text-align:center; }

/* Auth buttons */
.btn-login, .btn-signup {
  padding:7px 14px; border-radius:var(--radius-xl);
  font-size:0.82rem; font-weight:600; transition:var(--transition);
  white-space:nowrap; flex-shrink:0;
}
.btn-login { color:var(--text); border:1.5px solid var(--border); }
.btn-login:hover { background:var(--surface); }
.btn-signup {
  background:var(--red); color:#fff;
  box-shadow:3px 3px 0 var(--red-dark);
}
.btn-signup:hover { transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--red-dark); }
/* Full text / short icon for signup */
.signup-full { display:inline; }
.signup-short { display:none; }

/* ═══════════════════════════════════════════════════════════
   MOBILE HEADER — ≤ 640px
   ═══════════════════════════════════════════════════════════ */
@media (max-width:640px) {
  :root { --header-h: 56px; }

  .header-inner { padding:0 12px; gap:6px; }

  /* Show mobile logo, hide desktop logo */
  .logo-desktop { display:none; }
  .logo-mobile  { display:flex; font-size:1.4rem; }

  /* Hide desktop nav */
  .header-nav { display:none; }

  /* Collapse search to icon-only; expand on activation */
  .header-search { background:none; border-color:transparent; }
  .header-search.expanded {
    background:var(--input-bg); border-color:var(--red);
    box-shadow:0 0 0 3px var(--red-glow);
    position:absolute; top:50%; left:12px; right:12px;
    transform:translateY(-50%); z-index:10; border-radius:var(--radius-xl);
  }
  .search-icon-btn { display:flex; }
  .search-submit-btn { display:none; }
  .header-search.expanded .search-submit-btn { display:flex; }
  .header-search input { width:0; padding:0; overflow:hidden; }
  .header-search.expanded input { width:100%; padding:9px 14px; }
  .header-search.expanded .search-icon-btn { display:none; }

  /* Hide login text link, show only sign-up icon */
  .btn-login { display:none; }
  .signup-full { display:none; }
  .signup-short { display:inline; }
  .btn-signup { padding:7px 10px; }

  /* Shrink user name */
  .user-name-text { display:none; }
  .user-chevron  { display:none; }
  .user-btn { padding:5px 8px; gap:5px; }
}

/* ── Hamburger ── */
.hamburger-btn {
  width:36px; height:36px; flex-shrink:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  background:var(--surface); border:1.5px solid var(--border);
  border-radius:var(--radius-sm); transition:var(--transition);
}
.hamburger-btn:hover { background:var(--surface-hover); }
.hamburger-btn span {
  display:block; width:17px; height:2px;
  background:var(--text); border-radius:2px; transition:var(--transition);
}
.hamburger-btn.active span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity:0; transform:scaleX(0); }
.hamburger-btn.active span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar-nav {
  position:fixed; top:0; left:0; bottom:0; z-index:600;
  width:272px; background:var(--bg2);
  border-right:1px solid var(--border);
  transform:translateX(-100%);
  transition:transform 0.32s cubic-bezier(0.4,0,0.2,1);
  overflow-y:auto; overflow-x:hidden;
}
.sidebar-nav.open { transform:translateX(0); }
.sidebar-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 16px; border-bottom:1px solid var(--border);
  position:sticky; top:0; background:var(--bg2); z-index:1;
}
.sidebar-close {
  width:32px; height:32px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-sm); color:var(--text-muted);
  display:flex; align-items:center; justify-content:center;
  transition:var(--transition);
}
.sidebar-close:hover { color:var(--red); background:var(--surface-hover); }
.sidebar-links { padding:10px; }
.sidebar-link {
  display:flex; align-items:center; gap:12px;
  padding:11px 13px; border-radius:var(--radius-md);
  font-size:0.88rem; font-weight:500; color:var(--text-muted);
  transition:var(--transition-fast);
}
.sidebar-link:hover { background:var(--surface); color:var(--text); transform:translateX(3px); }
.sidebar-link i { width:19px; text-align:center; font-size:0.9rem; }
.sidebar-divider {
  padding:13px 13px 5px;
  font-size:0.68rem; font-weight:700; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--text-dim);
}
.sidebar-overlay {
  position:fixed; inset:0; z-index:590;
  background:rgba(0,0,0,0.6); backdrop-filter:blur(3px);
  opacity:0; visibility:hidden; transition:var(--transition);
}
.sidebar-overlay.active { opacity:1; visibility:visible; }

/* ═══════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════ */
.flash-container {
  position:fixed; top:calc(var(--header-h) + 10px); right:14px;
  z-index:800; display:flex; flex-direction:column; gap:8px;
  max-width:340px; width:calc(100vw - 28px);
}
.flash {
  display:flex; align-items:flex-start; gap:10px;
  padding:12px 14px; border-radius:var(--radius-md);
  font-size:0.85rem; font-weight:500;
  background:var(--bg3); border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.25);
  animation:flashSlide 0.3s ease;
}
@keyframes flashSlide { from { opacity:0; transform:translateX(20px); } }
.flash i { margin-top:1px; flex-shrink:0; }
.flash span { flex:1; line-height:1.5; }
.flash-success i { color:#22c55e; }
.flash-danger  i { color:#ef4444; }
.flash-info    i { color:#3b82f6; }
.flash-close { margin-left:auto; color:var(--text-dim); padding:1px; flex-shrink:0; transition:var(--transition-fast); }
.flash-close:hover { color:var(--text); }

/* ── Main offset ── */
#main-content { padding-top:var(--header-h); min-height:70vh; }

/* ═══════════════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════════════ */
.hero {
  position:relative; height:88vh; min-height:520px;
  display:flex; align-items:flex-end; overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0;
  background-size:cover; background-position:center;
  animation:heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform:scale(1.04); } to { transform:scale(1.1); } }
.hero-gradient {
  position:absolute; inset:0;
  background:linear-gradient(to right,rgba(0,0,0,0.88) 30%, rgba(0,0,0,0.2) 65%, transparent 100%),
             linear-gradient(to top,rgba(0,0,0,0.9) 15%, transparent 65%);
}
.hero-content {
  position:relative; z-index:2;
  max-width:580px; padding:50px 50px 70px;
  animation:heroUp 0.75s ease both;
}
@keyframes heroUp { from { opacity:0; transform:translateY(28px); } }
.hero-badge {
  display:inline-flex; align-items:center; gap:7px;
  background:var(--red); color:#fff; padding:5px 13px;
  border-radius:var(--radius-xl); font-size:0.72rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.07em; margin-bottom:14px;
}
.hero h1 {
  font-family:var(--font-display); font-size:clamp(1.8rem,4.5vw,3.5rem);
  font-weight:800; line-height:1.05; margin-bottom:14px; color:#fff;
}
.hero-meta { display:flex; align-items:center; gap:14px; margin-bottom:18px; flex-wrap:wrap; }
.hero-meta span { font-size:0.85rem; color:rgba(255,255,255,0.7); }
.hero-meta .rating { color:var(--gold); font-weight:700; }
.hero p { font-size:0.95rem; color:rgba(255,255,255,0.72); line-height:1.7; margin-bottom:26px; max-width:460px; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; }
.btn-play {
  display:inline-flex; align-items:center; gap:9px;
  background:var(--red); color:#fff;
  padding:13px 26px; border-radius:var(--radius-xl);
  font-size:0.95rem; font-weight:700; font-family:var(--font-display);
  box-shadow:4px 4px 0 var(--red-dark); transition:var(--transition);
}
.btn-play:hover { transform:translate(-3px,-3px); box-shadow:7px 7px 0 var(--red-dark); }
.btn-info {
  display:inline-flex; align-items:center; gap:9px;
  background:rgba(255,255,255,0.14); color:#fff;
  padding:13px 26px; border-radius:var(--radius-xl);
  font-size:0.95rem; font-weight:600;
  backdrop-filter:blur(8px); border:1px solid rgba(255,255,255,0.22);
  transition:var(--transition);
}
.btn-info:hover { background:rgba(255,255,255,0.24); }

@media (max-width:640px) {
  .hero { height:72vh; min-height:420px; }
  .hero-content { padding:24px 18px 42px; }
  .hero p { display:none; }
  .btn-play, .btn-info { padding:10px 18px; font-size:0.85rem; }
}

/* ═══════════════════════════════════════════════════════════
   CONTENT ROWS & CARDS
   ═══════════════════════════════════════════════════════════ */
.content-section { padding:44px 0; }
.container { max-width:1400px; margin:0 auto; padding:0 20px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.section-title {
  font-family:var(--font-display); font-size:1.35rem; font-weight:800;
  display:flex; align-items:center; gap:9px;
}
.section-title i { color:var(--red); }
.section-more {
  font-size:0.85rem; font-weight:600; color:var(--red);
  display:flex; align-items:center; gap:5px; transition:var(--transition-fast);
}
.section-more:hover { gap:9px; }

.card-row {
  display:flex; gap:14px; overflow-x:auto; padding-bottom:10px;
  scrollbar-width:thin; scrollbar-color:var(--red) transparent;
}
.card-row::-webkit-scrollbar { height:3px; }
.card-row::-webkit-scrollbar-thumb { background:var(--red); border-radius:99px; }

.card-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(155px,1fr));
  gap:18px;
}

.movie-card {
  flex-shrink:0; width:162px; position:relative;
  cursor:pointer; transition:var(--transition);
  animation:cardFade 0.38s ease both;
}
.card-grid .movie-card { width:auto; }
@keyframes cardFade { from { opacity:0; transform:translateY(10px); } }
.movie-card:hover { transform:translateY(-7px) scale(1.03); z-index:5; }

.card-poster {
  position:relative; border-radius:var(--radius-md); overflow:hidden;
  aspect-ratio:2/3; background:var(--bg3);
  box-shadow:var(--shadow-clay); border:2px solid var(--clay-border);
  transition:box-shadow var(--transition), border-color var(--transition);
}
.movie-card:hover .card-poster { box-shadow:var(--shadow-clay-hover),var(--shadow-glow); border-color:var(--red); }
.card-poster img { width:100%; height:100%; object-fit:cover; transition:transform 0.55s ease; }
.movie-card:hover .card-poster img { transform:scale(1.07); }

.card-overlay {
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 55%);
  opacity:0; transition:opacity var(--transition);
  display:flex; align-items:flex-end; justify-content:center; padding:14px;
}
.movie-card:hover .card-overlay { opacity:1; }
.card-play-btn {
  width:42px; height:42px; border-radius:50%;
  background:var(--red); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:0.95rem; box-shadow:0 4px 14px rgba(229,9,20,0.55);
  transform:scale(0.75); transition:var(--transition);
}
.movie-card:hover .card-play-btn { transform:scale(1); }

.card-badge {
  position:absolute; top:8px; left:8px;
  padding:3px 8px; border-radius:var(--radius-xl);
  font-size:0.62rem; font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
}
.badge-trending { background:var(--red); color:#fff; }
.badge-new { background:var(--gold); color:#000; }
.badge-series { background:#6c3fc5; color:#fff; }

.card-rating {
  position:absolute; top:8px; right:8px;
  background:rgba(0,0,0,0.7); backdrop-filter:blur(6px);
  padding:3px 7px; border-radius:var(--radius-xl);
  font-size:0.7rem; font-weight:700; color:var(--gold);
  display:flex; align-items:center; gap:3px;
}
.card-info { padding:9px 2px; }
.card-title {
  font-family:var(--font-display); font-size:0.84rem; font-weight:700;
  line-height:1.3; margin-bottom:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.card-meta { font-size:0.73rem; color:var(--text-muted); display:flex; align-items:center; gap:5px; }
.card-meta .dot { width:3px; height:3px; border-radius:50%; background:var(--text-dim); flex-shrink:0; }

img.lazy { opacity:0; transition:opacity 0.4s ease; }
img.lazy.loaded { opacity:1; }

/* ═══════════════════════════════════════════════════════════
   DETAIL PAGE
   ═══════════════════════════════════════════════════════════ */
.detail-hero {
  position:relative; height:52vh; min-height:360px;
  display:flex; align-items:flex-end; overflow:hidden;
}
.detail-hero-bg {
  position:absolute; inset:0; background-size:cover;
  background-position:center top; filter:brightness(0.38);
}
.detail-hero-gradient {
  position:absolute; inset:0;
  background:linear-gradient(to top,var(--bg) 5%,transparent 60%),
             linear-gradient(to right,var(--bg) 0%,transparent 40%);
}
.detail-content {
  position:relative; z-index:2;
  max-width:1400px; margin:0 auto; padding:0 30px 52px;
  display:flex; gap:32px; align-items:flex-end;
}
.detail-poster {
  flex-shrink:0; width:190px; border-radius:var(--radius-md);
  overflow:hidden; box-shadow:var(--shadow-clay-hover);
  border:3px solid var(--clay-border);
}
.detail-poster img { width:100%; aspect-ratio:2/3; object-fit:cover; }
.detail-info { flex:1; }
.detail-genre-badge {
  display:inline-block; padding:4px 12px; border-radius:var(--radius-xl);
  background:var(--surface); border:1px solid var(--border);
  font-size:0.72rem; font-weight:600; margin-bottom:10px;
  text-transform:uppercase; letter-spacing:0.07em; color:var(--red);
}
.detail-title {
  font-family:var(--font-display); font-size:clamp(1.6rem,3.5vw,2.8rem);
  font-weight:800; line-height:1.1; margin-bottom:12px;
}
.detail-meta {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  margin-bottom:14px; font-size:0.85rem;
}
.detail-meta span { color:var(--text-muted); }
.detail-meta .rating-star { color:var(--gold); font-weight:700; }
.detail-desc { font-size:0.92rem; line-height:1.8; color:var(--text-muted); max-width:580px; margin-bottom:22px; }
.detail-actions { display:flex; gap:12px; flex-wrap:wrap; }
.detail-body { max-width:1400px; margin:0 auto; padding:36px 30px; }

@media (max-width:640px) {
  .detail-content { flex-direction:column; gap:16px; padding:0 16px 34px; align-items:center; text-align:center; }
  .detail-poster { width:130px; }
  .detail-actions { justify-content:center; }
  .detail-body { padding:24px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   PLAYER
   ═══════════════════════════════════════════════════════════ */
.player-wrapper {
  width:100%; max-width:1100px; margin:0 auto;
  background:#000; border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:0 18px 56px rgba(0,0,0,0.8);
}
.player-frame { position:relative; padding-top:56.25%; background:#111; }
.player-frame iframe, .player-frame .player-placeholder {
  position:absolute; inset:0; width:100%; height:100%; border:none;
}
.player-placeholder {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; background:#111; color:var(--text-muted);
}
.player-placeholder i { font-size:3.5rem; color:var(--red); }
.player-controls-bar {
  background:var(--bg2); border-top:1px solid var(--border);
  padding:16px 22px; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.server-label { font-size:0.75rem; color:var(--text-dim); font-weight:700; text-transform:uppercase; letter-spacing:0.08em; }
.server-btn {
  padding:7px 16px; border-radius:var(--radius-xl);
  background:var(--surface); border:2px solid var(--border);
  font-size:0.82rem; font-weight:600; color:var(--text-muted); transition:var(--transition);
}
.server-btn.active { background:var(--red); border-color:var(--red); color:#fff; }
.server-btn:hover:not(.active) { border-color:var(--red); color:var(--red); }

/* ═══════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════ */
.search-header { padding:54px 0 26px; text-align:center; }
.search-big {
  display:flex; max-width:560px; margin:0 auto 18px;
  background:var(--surface); border:2px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
}
.search-big input {
  flex:1; background:none; border:none; outline:none;
  padding:14px 18px; font-size:0.95rem; color:var(--text);
}
.search-big button { padding:14px 20px; background:var(--red); color:#fff; font-size:0.95rem; transition:var(--transition-fast); }
.search-big button:hover { background:var(--red-dark); }
.search-stats { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.stat-chip {
  padding:5px 14px; border-radius:var(--radius-xl);
  background:var(--surface); border:1px solid var(--border); font-size:0.84rem; font-weight:600;
}
.stat-chip span { color:var(--red); }

/* ═══════════════════════════════════════════════════════════
   AUTH FORMS
   ═══════════════════════════════════════════════════════════ */
.auth-page {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:90px 16px 36px; background:var(--bg);
}
.auth-card {
  width:100%; max-width:420px;
  background:var(--clay-bg); border:2px solid var(--clay-border);
  border-radius:var(--radius-xl); box-shadow:var(--shadow-clay-hover); padding:36px 32px;
  animation:cardFade 0.4s ease;
}
@media (max-width:480px) { .auth-card { padding:28px 18px; } }
.auth-logo { text-align:center; margin-bottom:26px; }
.auth-title { font-family:var(--font-display); font-size:1.5rem; font-weight:800; text-align:center; margin-bottom:5px; }
.auth-sub { text-align:center; color:var(--text-muted); font-size:0.88rem; margin-bottom:26px; }
.form-group { margin-bottom:16px; }
.form-label { display:block; font-size:0.82rem; font-weight:600; margin-bottom:6px; color:var(--text-muted); }
.form-input {
  width:100%; padding:11px 14px;
  background:var(--input-bg); border:2px solid var(--border);
  border-radius:var(--radius-md); color:var(--text); font-size:0.88rem;
  outline:none; transition:var(--transition);
}
.form-input:focus { border-color:var(--red); box-shadow:0 0 0 3px var(--red-glow); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:400px) { .form-row { grid-template-columns:1fr; } }
.btn-submit {
  width:100%; padding:12px; border-radius:var(--radius-xl);
  background:var(--red); color:#fff; font-size:0.95rem; font-weight:700;
  font-family:var(--font-display); box-shadow:4px 4px 0 var(--red-dark); transition:var(--transition);
}
.btn-submit:hover { transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--red-dark); }
.auth-footer { text-align:center; margin-top:18px; font-size:0.84rem; color:var(--text-muted); }
.auth-footer a { color:var(--red); font-weight:600; }

/* ═══════════════════════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════════════════════ */
.profile-page { padding:36px 0; }
.profile-card {
  background:var(--clay-bg); border:2px solid var(--clay-border);
  border-radius:var(--radius-xl); box-shadow:var(--shadow-clay);
  padding:36px; max-width:660px; margin:0 auto;
}
.profile-avatar {
  width:84px; height:84px; border-radius:50%;
  background:linear-gradient(135deg,var(--red),#6c3fc5);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-size:2rem; font-weight:800; color:#fff;
  margin:0 auto 18px;
}
.profile-username { font-family:var(--font-display); font-size:1.7rem; font-weight:800; text-align:center; margin-bottom:5px; }
.profile-email { text-align:center; color:var(--text-muted); margin-bottom:18px; }
.subscription-badge {
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 18px; border-radius:var(--radius-xl);
  font-weight:700; font-size:0.88rem;
  margin:0 auto 20px; display:flex; width:fit-content;
}
.badge-premium { background:linear-gradient(135deg,#f5c518,#e5951a); color:#000; }
.badge-free { background:var(--surface); border:2px solid var(--border); color:var(--text-muted); }
.upgrade-section {
  margin-top:26px; padding:24px; border-radius:var(--radius-lg);
  background:linear-gradient(135deg,rgba(229,9,20,0.08),rgba(108,63,197,0.08));
  border:2px solid var(--red-glow);
}
.upgrade-section h3 { font-family:var(--font-display); font-size:1.2rem; font-weight:800; margin-bottom:10px; }
.features-list { margin-bottom:18px; }
.feature-item { display:flex; align-items:center; gap:9px; padding:6px 0; font-size:0.88rem; }
.feature-item i { color:#22c55e; }

/* ═══════════════════════════════════════════════════════════
   BROWSE / CATEGORY
   ═══════════════════════════════════════════════════════════ */
.browse-header {
  padding:46px 0 26px; text-align:center;
  background:linear-gradient(to bottom,var(--bg2),var(--bg));
}
.browse-title {
  font-family:var(--font-display); font-size:2.2rem; font-weight:800;
  display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:8px;
}
.browse-title i { color:var(--red); }
.browse-count { color:var(--text-muted); font-size:0.92rem; }

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL — Fully Responsive
   ═══════════════════════════════════════════════════════════ */
.admin-layout {
  display:flex; min-height:calc(100vh - var(--header-h));
  position:relative;
}

/* Desktop sidebar */
.admin-sidebar {
  width:230px; flex-shrink:0;
  background:var(--bg2); border-right:1px solid var(--border);
  padding:14px 0;
  position:sticky; top:var(--header-h);
  height:calc(100vh - var(--header-h)); overflow-y:auto;
  transition:transform 0.3s ease, width 0.3s ease;
}
.admin-brand { padding:8px 16px 14px; border-bottom:1px solid var(--border); margin-bottom:8px; }
.admin-brand p { font-size:0.68rem; color:var(--text-dim); margin-top:4px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; }
.admin-nav-link {
  display:flex; align-items:center; gap:10px;
  padding:10px 18px; font-size:0.84rem; font-weight:500;
  color:var(--text-muted); transition:var(--transition-fast);
  white-space:nowrap;
}
.admin-nav-link:hover { background:var(--surface); color:var(--text); }
.admin-nav-link.active { background:var(--surface); color:var(--red); border-right:3px solid var(--red); }
.admin-nav-link i { width:17px; text-align:center; flex-shrink:0; }
.admin-nav-divider { height:1px; background:var(--border); margin:7px 14px; }

/* Admin content area */
.admin-content { flex:1; padding:24px 20px; min-width:0; overflow-x:hidden; }

.admin-page-title {
  font-family:var(--font-display); font-size:1.5rem; font-weight:800;
  margin-bottom:22px; display:flex; align-items:center; gap:10px;
}
.admin-page-title i { color:var(--red); }

/* ── Admin Stats grid ── */
.admin-stats {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:14px; margin-bottom:26px;
}
.stat-card {
  background:var(--clay-bg); border:2px solid var(--clay-border);
  border-radius:var(--radius-lg); padding:18px 14px; text-align:center;
  box-shadow:var(--shadow-clay); transition:var(--transition);
}
.stat-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-clay-hover); }
.stat-card .stat-icon { font-size:1.6rem; color:var(--red); margin-bottom:8px; }
.stat-card .stat-num { font-family:var(--font-display); font-size:1.8rem; font-weight:800; line-height:1; }
.stat-card .stat-label { font-size:0.7rem; color:var(--text-muted); margin-top:4px; text-transform:uppercase; letter-spacing:0.06em; }

/* ── Admin Table ── */
.admin-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.admin-table {
  width:100%; border-collapse:collapse; min-width:500px;
  background:var(--bg2); border-radius:var(--radius-md); overflow:hidden;
  border:1px solid var(--border);
}
.admin-table th {
  padding:12px 14px; text-align:left;
  background:var(--bg3); font-size:0.73rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted);
  border-bottom:1px solid var(--border); white-space:nowrap;
}
.admin-table td {
  padding:10px 14px; font-size:0.84rem;
  border-bottom:1px solid var(--border); vertical-align:middle;
}
.admin-table tr:last-child td { border-bottom:none; }
.admin-table tr:hover td { background:var(--surface); }
.admin-table img { width:36px; height:54px; object-fit:cover; border-radius:5px; }

/* ── Admin Form card ── */
.admin-form-card {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:24px; max-width:700px;
}
.admin-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px) { .admin-form-grid { grid-template-columns:1fr; } }
.checkbox-group { display:flex; align-items:center; gap:8px; cursor:pointer; }
.checkbox-group input { accent-color:var(--red); width:15px; height:15px; }

/* ── Admin Action Buttons ── */
.btn-admin {
  padding:6px 12px; border-radius:var(--radius-sm);
  font-size:0.78rem; font-weight:600;
  display:inline-flex; align-items:center; gap:5px;
  transition:var(--transition-fast); white-space:nowrap;
}
.btn-admin-primary   { background:var(--red); color:#fff; }
.btn-admin-primary:hover  { background:var(--red-dark); }
.btn-admin-edit      { background:rgba(59,130,246,0.12); color:#3b82f6; border:1px solid rgba(59,130,246,0.22); }
.btn-admin-edit:hover     { background:rgba(59,130,246,0.22); }
.btn-admin-delete    { background:rgba(239,68,68,0.12); color:#ef4444; border:1px solid rgba(239,68,68,0.22); }
.btn-admin-delete:hover   { background:rgba(239,68,68,0.22); }
.btn-admin-secondary { background:var(--surface); border:1px solid var(--border); color:var(--text-muted); }
.btn-admin-secondary:hover { color:var(--text); background:var(--surface-hover); }

/* ── Mobile Admin — hamburger triggers a slide-over ── */
.admin-mobile-topbar {
  display:none; align-items:center; gap:12px;
  padding:12px 16px; background:var(--bg2);
  border-bottom:1px solid var(--border);
  position:sticky; top:var(--header-h); z-index:50;
}
.admin-mobile-topbar button {
  width:34px; height:34px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-sm); color:var(--text-muted);
  display:flex; align-items:center; justify-content:center;
}
.admin-sidebar-overlay {
  display:none; position:fixed; inset:0; z-index:490;
  background:rgba(0,0,0,0.55); backdrop-filter:blur(3px);
  opacity:0; visibility:hidden; transition:var(--transition);
}
.admin-sidebar-overlay.active { opacity:1; visibility:visible; }

/* Mobile admin breakpoint ≤ 860px */
@media (max-width:860px) {
  .admin-layout { flex-direction:column; }

  .admin-mobile-topbar { display:flex; }

  .admin-sidebar {
    position:fixed; top:0; left:0; bottom:0; z-index:500;
    width:250px; height:100vh;
    transform:translateX(-100%);
    padding-top:calc(var(--header-h) + 10px);
    box-shadow:4px 0 24px rgba(0,0,0,0.35);
  }
  .admin-sidebar.open { transform:translateX(0); }
  .admin-sidebar-overlay { display:block; }

  .admin-content { padding:16px 14px; }
  .admin-page-title { font-size:1.25rem; }
  .admin-stats { grid-template-columns:repeat(3,1fr); gap:10px; }
  .stat-card { padding:14px 10px; }
  .stat-card .stat-num { font-size:1.5rem; }
}

@media (max-width:480px) {
  .admin-stats { grid-template-columns:repeat(2,1fr); }
  .admin-form-card { padding:16px; }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer { background:var(--bg2); border-top:1px solid var(--border); margin-top:54px; }
.footer-inner {
  max-width:1400px; margin:0 auto; padding:52px 20px 36px;
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:36px;
}
.footer-brand p { color:var(--text-muted); font-size:0.85rem; line-height:1.7; margin:12px 0 18px; max-width:260px; }
.footer-socials { display:flex; gap:9px; }
.footer-socials a {
  width:36px; height:36px; border-radius:50%;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-muted); font-size:0.82rem; transition:var(--transition);
}
.footer-socials a:hover { background:var(--red); border-color:var(--red); color:#fff; transform:translateY(-3px); }
.footer-links h4 {
  font-family:var(--font-display); font-size:0.8rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.1em; color:var(--text-muted); margin-bottom:14px;
}
.footer-links a {
  display:block; padding:4px 0; font-size:0.84rem; color:var(--text-muted); transition:var(--transition-fast);
}
.footer-links a:hover { color:var(--red); padding-left:4px; }
.footer-bottom {
  border-top:1px solid var(--border); padding:18px 20px;
  max-width:1400px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  font-size:0.78rem; color:var(--text-dim); flex-wrap:wrap; gap:8px;
}

@media (max-width:900px)  { .footer-inner { grid-template-columns:1fr 1fr; } }
@media (max-width:540px)  { .footer-inner { grid-template-columns:1fr; gap:24px; padding:36px 16px 24px; } }
@media (max-width:480px)  { .footer-bottom { flex-direction:column; text-align:center; } }

/* ═══════════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════════ */
.error-page {
  min-height:80vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding:40px 20px;
}
.error-code { font-family:var(--font-display); font-size:clamp(5rem,18vw,8rem); font-weight:800; color:var(--red); line-height:1; margin-bottom:10px; text-shadow:5px 5px 0 var(--red-dark); }
.error-msg { font-size:1.15rem; color:var(--text-muted); margin-bottom:26px; }

/* ═══════════════════════════════════════════════════════════
   UTILITIES & MISC
   ═══════════════════════════════════════════════════════════ */
.divider { height:1px; background:var(--border); margin:20px 0; }
.empty-state { text-align:center; padding:70px 20px; color:var(--text-muted); font-size:0.92rem; }
.empty-state i { font-size:2.8rem; color:var(--text-dim); margin-bottom:14px; display:block; }
.pill {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 10px; border-radius:var(--radius-xl);
  font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
}
.pill-red    { background:var(--red); color:#fff; }
.pill-gold   { background:var(--gold); color:#000; }
.pill-purple { background:#6c3fc5; color:#fff; }
.pill-green  { background:#22c55e; color:#000; }
.pill-gray   { background:var(--surface); border:1px solid var(--border); color:var(--text-muted); }

select.form-input { appearance:none; cursor:pointer; }
textarea.form-input { resize:vertical; }

::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--red); border-radius:99px; }
:focus-visible { outline:2px solid var(--red); outline-offset:3px; border-radius:4px; }

.clay-card {
  background:var(--clay-bg); border:2px solid var(--clay-border);
  border-radius:var(--radius-xl); box-shadow:var(--shadow-clay); transition:var(--transition);
}
.clay-card:hover { box-shadow:var(--shadow-clay-hover); transform:translateY(-3px); }

@media (max-width:768px) {
  .container { padding:0 14px; }
  .content-section { padding:32px 0; }
  .card-grid { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:14px; }
  .section-title { font-size:1.15rem; }
}

/* Header nav — hide on < 1024px */
@media (max-width:1024px) { .header-nav { display:none; } }

/* Search input always visible on ≥ 641px */
@media (min-width:641px) {
  .search-icon-btn { display:none !important; }
  .search-submit-btn { display:flex !important; }
  .header-search input { display:block !important; width:170px !important; padding:7px 14px !important; overflow:visible !important; }
  .header-search input:focus { width:210px !important; }
}

/* ═══════════════════════════════════════════════════════════
   EPISODE GRID
   ═══════════════════════════════════════════════════════════ */
.episodes-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px; margin-bottom:36px;
}
.episode-card {
  display:flex; gap:12px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); overflow:hidden;
  transition:var(--transition); color:var(--text);
}
.episode-card:hover { background:var(--surface-hover); transform:translateY(-2px); border-color:var(--red); }
.ep-still {
  position:relative; flex-shrink:0; width:130px;
  background:var(--bg3); overflow:hidden;
}
.ep-still img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.episode-card:hover .ep-still img { transform:scale(1.06); }
.ep-still-placeholder {
  width:100%; height:100%; min-height:80px;
  display:flex; align-items:center; justify-content:center;
  color:var(--text-dim); font-size:1.5rem;
}
.ep-play-overlay {
  position:absolute; inset:0;
  background:rgba(0,0,0,0.55);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transition:var(--transition);
  color:#fff; font-size:1.1rem;
}
.episode-card:hover .ep-play-overlay { opacity:1; }
.ep-number {
  position:absolute; bottom:6px; left:6px;
  background:var(--red); color:#fff;
  padding:2px 7px; border-radius:var(--radius-xl);
  font-size:0.65rem; font-weight:700;
}
.ep-info { flex:1; padding:12px 12px 12px 0; min-width:0; }
.ep-title { font-weight:700; font-size:0.88rem; line-height:1.35; margin-bottom:5px; }
.ep-meta { display:flex; gap:10px; font-size:0.75rem; color:var(--text-muted); margin-bottom:6px; flex-wrap:wrap; }
.ep-overview { font-size:0.78rem; color:var(--text-muted); line-height:1.5; }

@media (max-width:560px) {
  .episodes-grid { grid-template-columns:1fr; }
  .ep-still { width:100px; }
}
