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

:root {
  --bg: #05060a;
  --bg2: #0a0c14;
  --bg3: #10141f;
  --card: #111827;
  --card-hover: #1a2235;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #f0f4ff;
  --text2: #8899bb;
  --text3: #5a6a88;
  --accent: #3d8ef8;
  --accent2: #6c63ff;
  --accent-glow: rgba(61,142,248,0.35);
  --green: #22c55e;
  --red: #ef4444;
  --gold: #f59e0b;
  --nav-h: 64px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.7);
  --surface: #111827;
  --hero-shadow: #05060a;
  --transition: 0.2s ease;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg2: #ffffff;
  --bg3: #e9eef7;
  --card: #ffffff;
  --card-hover: #f0f4fb;
  --border: rgba(15,23,42,0.08);
  --border2: rgba(15,23,42,0.14);
  --text: #111827;
  --text2: #526173;
  --text3: #7b8798;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --accent-glow: rgba(37,99,235,0.22);
  --shadow: 0 4px 24px rgba(15,23,42,0.12);
  --shadow-lg: 0 8px 48px rgba(15,23,42,0.18);
  --surface: #ffffff;
  --hero-shadow: rgba(246, 248, 252, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5,6,10,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(8,9,15,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
html[data-theme="light"] .navbar {
  background: rgba(246,248,252,0.82);
}
html[data-theme="light"] .navbar.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 20px rgba(15,23,42,0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 20px var(--accent-glow);
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
html[data-theme="light"] .logo-text {
  background: linear-gradient(90deg, #111827, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}
.nav-link.active { color: var(--accent); }
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active {
  background: rgba(15,23,42,0.07);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: all var(--transition);
}
.btn-icon:hover { background: rgba(255,255,255,0.08); color: var(--text); }
html[data-theme="light"] .btn-icon:hover { background: rgba(15,23,42,0.06); }
.theme-toggle {
  position: relative;
  overflow: hidden;
}
.theme-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  transition: transform var(--transition), opacity var(--transition);
}
.theme-sun { opacity: 0; transform: translateY(12px); }
.theme-moon { opacity: 1; transform: translateY(0); }
html[data-theme="light"] .theme-sun { opacity: 1; transform: translateY(0); }
html[data-theme="light"] .theme-moon { opacity: 0; transform: translateY(-12px); }

.pro-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(61,142,248,0.15), rgba(108,99,255,0.15));
  border: 1px solid rgba(61,142,248,0.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}
.pro-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.85); }
}

/* ── Search Bar ──────────────────────────────────────────────────────────── */
.search-bar {
  display: none;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: rgba(8,9,15,0.97);
}
.search-bar.open { display: block; }
.search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 10px 16px;
}
.search-inner svg { color: var(--text3); flex-shrink: 0; }
#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
#search-input::placeholder { color: var(--text3); }

/* ── Page Layout ─────────────────────────────────────────────────────────── */
#app {
  flex: 1;
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
  background: var(--bg);
}

/* ── Loaders ─────────────────────────────────────────────────────────────── */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
}
.loader-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--card-hover) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Hero / Banner ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  margin-bottom: 8px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero-bg.loaded { transform: scale(1); }
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5,6,10,0.97) 0%,
    rgba(5,6,10,0.72) 45%,
    rgba(5,6,10,0.25) 100%
  ),
  linear-gradient(
    to top,
    var(--hero-shadow) 0%,
    rgba(5,6,10,0.94) 12%,
    rgba(5,6,10,0.58) 28%,
    transparent 62%
  );
}
html[data-theme="light"] .hero-gradient {
  background: linear-gradient(
    to right,
    rgba(246,248,252,0.98) 0%,
    rgba(246,248,252,0.82) 45%,
    rgba(246,248,252,0.35) 100%
  ),
  linear-gradient(
    to top,
    var(--hero-shadow) 0%,
    rgba(246,248,252,0.95) 14%,
    rgba(246,248,252,0.6) 30%,
    transparent 62%
  );
}
.hero-carousel {
  position: relative;
  height: min(72vh, 620px);
  min-height: 480px;
  overflow: hidden;
  margin-bottom: 12px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.hero-slide .hero-bg {
  transform: scale(1.06);
}
.hero-slide.active .hero-bg.loaded {
  transform: scale(1);
}
.hero-topbar {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(8,9,15,0.55);
  color: var(--text);
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: all var(--transition);
}
html[data-theme="light"] .hero-theme-btn {
  background: rgba(255,255,255,0.82);
  color: #0f172a;
}
.hero-theme-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.hero-theme-btn {
  position: relative;
  overflow: hidden;
}
.hero-theme-btn .theme-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: rgba(8,9,15,0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
html[data-theme="light"] .hero-nav-btn {
  background: rgba(255,255,255,0.85);
  color: #0f172a;
}
.hero-nav-btn.prev { left: 20px; }
.hero-nav-btn.next { right: 20px; }
.hero-dots {
  position: absolute;
  left: 60px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--transition);
}
html[data-theme="light"] .hero-dot {
  background: rgba(15,23,42,0.25);
}
.hero-dot.active {
  width: 28px;
  background: var(--accent);
}
.hero-content {
  position: absolute;
  bottom: 72px;
  left: 60px;
  max-width: 560px;
  z-index: 3;
  animation: fadeUp 0.6s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}
.hero-desc {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(61,142,248,0.4);
}
.btn-primary:hover {
  background: #5aa0ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(61,142,248,0.5);
}
.btn-glass {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}
html[data-theme="light"] .btn-glass {
  background: rgba(15,23,42,0.08);
  border-color: rgba(15,23,42,0.16);
  color: var(--text);
}
html[data-theme="light"] .hero .btn-glass,
html[data-theme="light"] .detail-hero .btn-glass,
html[data-theme="light"] .player-overlay .btn-glass {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(61,142,248,0.1);
}

/* ── Content Sections ────────────────────────────────────────────────────── */
.content-section {
  padding: 0 40px 40px;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 6%);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2));
  border-radius: 2px;
}
.section-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  opacity: 0.8;
  transition: opacity var(--transition);
}
.section-link:hover { opacity: 1; }

/* ── Horizontal Scroll Row ───────────────────────────────────────────────── */
.movies-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}
.movies-row::-webkit-scrollbar { height: 4px; }
.movies-row::-webkit-scrollbar-thumb { background: var(--bg3); }

/* ── Movie Card ──────────────────────────────────────────────────────────── */
.movie-card {
  flex-shrink: 0;
  width: 180px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.25s ease;
  position: relative;
}
.movie-card:hover { transform: scale(1.05) translateY(-4px); z-index: 2; }

.movie-thumb {
  position: relative;
  width: 180px;
  height: 255px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.movie-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.movie-card:hover .movie-thumb img { transform: scale(1.08); }

.movie-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}
.movie-card:hover .movie-overlay { opacity: 1; }

.play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  transition: all var(--transition);
  margin-bottom: 8px;
}
.play-btn:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }

.badge-free {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--green);
  color: #fff;
}
.badge-pro {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.badge-series {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(8, 9, 15, 0.82);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-info {
  padding: 10px 2px 0;
}
.movie-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  margin-bottom: 4px;
}
.movie-vj {
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
}
.movie-episode {
  margin-top: 4px;
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.movie-card.current-episode .movie-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.movie-card.current-episode .movie-title::after {
  content: "Current";
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(229, 9, 20, 0.16);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.movie-ldur {
  font-size: 11px;
  color: var(--accent);
  margin-top: 3px;
}

/* ── Grid Layout (Browse Pages) ──────────────────────────────────────────── */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}
.movies-grid .movie-card { width: 100%; }
.movies-grid .movie-thumb { width: 100%; }

/* ── Genre Cards ─────────────────────────────────────────────────────────── */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.genre-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  font-weight: 600;
  font-size: 14px;
}
.genre-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(61,142,248,0.15);
}
.genre-emoji { font-size: 28px; margin-bottom: 8px; }

/* ── VJ Cards ────────────────────────────────────────────────────────────── */
.vj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}
.vj-card {
  text-align: center;
  cursor: pointer;
  padding: 16px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  transition: all var(--transition);
}
.vj-card:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(61,142,248,0.2);
}
.vj-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 2px solid var(--border2);
  background: var(--bg3);
}
.vj-name { font-size: 13px; font-weight: 600; }

/* ── Detail / Watch Page ─────────────────────────────────────────────────── */
.detail-hero {
  position: relative;
  height: 450px;
  overflow: hidden;
}
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px) brightness(0.4);
  transform: scale(1.05);
}
.detail-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(8,9,15,0.5) 50%, transparent 100%);
}
.detail-hero-content {
  position: absolute;
  bottom: 40px;
  left: 60px;
  right: 60px;
  display: flex;
  gap: 32px;
  align-items: flex-end;
}
.detail-poster {
  width: 180px;
  height: 255px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}
.detail-info { flex: 1; }
.detail-title {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.tag.accent { border-color: var(--accent); color: var(--accent); }
.detail-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
  margin-bottom: 20px;
  max-width: 600px;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.detail-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}
.episodes-section {
  margin-bottom: 40px;
}
.season-block {
  margin-bottom: 22px;
}
.season-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.season-title span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text3);
  font-size: 11px;
}
.episodes-row {
  padding: 4px 4px 18px;
}
.episode-count {
  color: var(--text3);
  font-size: 12px;
  font-weight: 600;
}

/* ── Progress bar on card ────────────────────────────────────────────────── */
.watch-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.watch-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  min-width: 4px;
}

/* ── Load More ───────────────────────────────────────────────────────────── */
.load-more-btn {
  display: block;
  margin: 32px auto 0;
  padding: 12px 32px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.load-more-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent);
}
.load-more-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Plans Page ──────────────────────────────────────────────────────────── */
.plans-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}
.plans-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.plans-sub { color: var(--text2); font-size: 16px; margin-bottom: 48px; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  transition: all var(--transition);
  position: relative;
}
.plan-card.popular {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(61,142,248,0.08), rgba(108,99,255,0.08));
}
.plan-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 16px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-duration { font-size: 13px; color: var(--text2); margin-bottom: 8px; font-weight: 500; }
.plan-price { font-size: 28px; font-weight: 800; color: var(--text); }
.plan-usd { font-size: 12px; color: var(--text3); margin-top: 4px; }
.plan-discount {
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.15);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* ── Search Results Page ─────────────────────────────────────────────────── */
/* ── Account / Profile / Admin ───────────────────────────────────────────── */
.account-page, .profile-page, .admin-page {
  padding: 32px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.account-page {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}
.account-panel {
  width: min(100%, 460px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.account-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.account-sub, .profile-meta { color: var(--text2); font-size: 14px; margin-bottom: 22px; }
.account-form, .profile-form, .admin-settings, .admin-create-user, .admin-plan-form { display: flex; flex-direction: column; gap: 14px; }
.account-form label, .profile-form label, .admin-settings label,
.admin-create-user label, .admin-edit-grid label, .admin-plan-form label, .plan-form-grid label {
  display: flex; flex-direction: column; gap: 7px;
  color: var(--text2); font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.account-form input, .profile-form input, .profile-form select,
.admin-settings input, .admin-settings select,
.admin-create-user input, .admin-create-user select,
.admin-edit-grid input, .admin-edit-grid select,
.admin-plan-form input, .admin-plan-form select,
.plan-form-grid input, .plan-form-grid select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  padding: 11px 12px; outline: none;
}
.account-form input:focus, .profile-form input:focus, .profile-form select:focus,
.admin-settings input:focus, .admin-settings select:focus,
.admin-create-user input:focus, .admin-create-user select:focus,
.admin-edit-grid input:focus, .admin-edit-grid select:focus,
.admin-plan-form input:focus, .admin-plan-form select:focus,
.plan-form-grid input:focus, .plan-form-grid select:focus { border-color: var(--accent); }
.profile-hero, .admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(229,9,20,0.14), rgba(61,142,248,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-hero {
  position: sticky;
  top: 82px;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.admin-hero-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}
.profile-identity { flex: 1; min-width: 0; }
.profile-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.profile-identity h1, .admin-hero h1 {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 4px;
}
.profile-identity p, .admin-hero p {
  color: var(--text2);
  font-size: 14px;
}
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.profile-chips span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
html[data-theme="light"] .profile-chips span {
  background: rgba(15,23,42,0.05);
  color: #334155;
}
.profile-signout { flex-shrink: 0; }
.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr) minmax(300px, 0.9fr);
  gap: 20px;
  margin-bottom: 32px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-heading span {
  color: var(--text3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.panel-title { font-size: 18px; font-weight: 800; margin-bottom: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid label:last-child { grid-column: 1 / -1; }
.subscription-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg2);
}
.subscription-card span {
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.subscription-card strong {
  color: var(--text);
  font-size: 18px;
}
.subscription-card small {
  color: var(--text2);
  font-size: 12px;
}
.profile-stats { display: grid; grid-template-columns: 1fr; gap: 14px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  min-height: 92px;
}
.stat-card strong { display: block; font-size: 28px; margin-bottom: 6px; }
.stat-card span { color: var(--text2); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.admin-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.admin-stat span { order: 0; }
.admin-stat strong { order: 1; margin: 0; }
.admin-stat small {
  order: 2;
  color: var(--text3);
  font-size: 12px;
}
.admin-stat.danger {
  border-color: rgba(239, 68, 68, 0.35);
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.admin-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.admin-console {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-console-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}
.admin-side-nav {
  position: sticky;
  top: 108px;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-side-nav .admin-tab {
  width: 100%;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 14px;
}
.admin-console .admin-tab-panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.admin-console .admin-tabs {
  display: none;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.admin-tab span {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg2);
  color: var(--text3);
  font-size: 11px;
}
.admin-tab.active {
  background: var(--accent);
  color: white;
}
.admin-tab.active span {
  background: rgba(255,255,255,0.2);
  color: white;
}
.admin-tab-panel {
  display: none;
}
.admin-tab-panel.active {
  display: block;
}
.admin-users-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-plans-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-users-main {
  min-width: 0;
}
.admin-settings, .admin-create-user, .admin-plan-form {
  width: 100%;
  max-width: none;
  margin-bottom: 28px;
}
.admin-create-user, .admin-plan-form {
  position: sticky;
  top: 252px;
}
.admin-create-user form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-create-grid, .admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-create-grid label:nth-child(-n+3) {
  grid-column: 1 / -1;
}
.plan-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.plan-form-grid .wide {
  grid-column: 1 / -1;
}
.admin-check {
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg2);
}
html[data-theme="light"] .admin-check {
  background: #f8fafc;
  color: #334155;
}
.admin-check input {
  width: auto;
  min-width: 0;
  margin: 0 8px 0 0;
  accent-color: var(--accent);
}
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-toolbar p {
  margin-top: 4px;
  color: var(--text2);
  font-size: 13px;
}
.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px;
  gap: 10px;
  min-width: min(100%, 420px);
}
.admin-filter-bar input, .admin-filter-bar select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.admin-filter-bar input:focus, .admin-filter-bar select:focus {
  border-color: var(--accent);
}
.admin-empty-filter {
  padding: 28px;
  text-align: center;
  color: var(--text2);
  background: var(--card);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
}
.admin-users-header { margin-top: 8px; }
.admin-user-grid {
  display: grid;
  gap: 16px;
}
.admin-user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.admin-user-card.blocked {
  border-color: rgba(239, 68, 68, 0.4);
}
.admin-user-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-user-top h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.admin-user-top p {
  color: var(--text2);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.admin-user-top small {
  flex-shrink: 0;
  color: var(--text3);
  font-size: 11px;
  text-align: right;
}
.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.admin-user-badges span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
html[data-theme="light"] .admin-user-badges span {
  background: #f8fafc;
  color: #334155;
}
.admin-user-badges .ok { color: #22c55e; }
.admin-user-badges .warn { color: #f59e0b; }
.admin-user-badges .danger { color: #ef4444; }
.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.admin-card-actions.no-border {
  margin: 4px 0 0;
  padding-top: 0;
  border-top: 0;
}
.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.24);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.admin-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  align-items: start;
}
.admin-plans-main { min-width: 0; }
.admin-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.admin-plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.admin-plan-card.inactive {
  opacity: 0.75;
}
.admin-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.admin-plan-top h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.admin-plan-top p {
  color: var(--text2);
  font-size: 13px;
}
.admin-plan-top span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-plan-top .ok { color: var(--green); }
.admin-plan-top .warn { color: var(--gold); }
.admin-settings-note {
  width: 100%;
}
.admin-rule-list {
  display: grid;
  gap: 12px;
}
.admin-rule-list div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}
.admin-rule-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
}
.admin-rule-list span {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
}
.admin-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.admin-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.4fr) minmax(110px, 0.7fr) minmax(240px, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
}
.admin-user-cell strong, .admin-status-cell b {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 3px;
}
.admin-row small {
  display: block;
  margin-top: 4px;
  color: var(--text3);
  font-size: 11px;
}
.admin-row:last-child { border-bottom: 0; }
.admin-head { color: var(--text); font-weight: 800; background: var(--bg2); }
.admin-password-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.admin-password-cell input {
  min-width: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 10px;
}

.search-page { padding: 30px 40px; max-width: 1400px; margin: 0 auto; }
.search-query-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.search-result-count { color: var(--text2); font-size: 14px; margin-bottom: 28px; }

/* ── New Uploads Page ────────────────────────────────────────────────────── */
.new-page { padding: 30px 40px; max-width: 1400px; margin: 0 auto; }

/* ── Error States ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.empty-sub { color: var(--text2); font-size: 14px; }

/* ── Video Player Overlay ────────────────────────────────────────────────── */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: none;
  flex-direction: column;
}
.player-overlay.open { display: flex; }

.player-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.player-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  z-index: 10;
  flex-shrink: 0;
}
.player-back {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  transition: all var(--transition);
}
.player-back:hover { background: rgba(255,255,255,0.16); }

.player-title-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#player-title {
  font-size: 16px;
  font-weight: 700;
}
.player-vj-name {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.player-dl-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}
.player-dl-btn:hover {
  background: rgba(61,142,248,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.video-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
#main-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}
.video-spinner {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
}
.video-spinner.show { display: flex; }

.player-meta {
  background: rgba(0,0,0,0.9);
  padding: 16px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text2);
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.player-meta-item { display: flex; align-items: center; gap: 6px; }
.player-meta-item strong { color: var(--text); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  right: 20px;
  left: auto;
  transform: translateX(12px);
  background: var(--surface-strong, var(--card));
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 40px));
  white-space: normal;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast-success {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), var(--surface-strong, var(--card)));
}
.toast-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), var(--surface-strong, var(--card)));
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* Professional theme polish inspired by modern CSS component libraries */
:root {
  --surface: rgba(17, 24, 39, 0.82);
  --surface-strong: rgba(15, 23, 42, 0.96);
  --field: #0b1020;
  --text2: #b8c2d9;
  --text3: #7e8aa5;
  --accent: #2dd4bf;
  --accent2: #60a5fa;
  --accent3: #f43f5e;
  --ring: rgba(45, 212, 191, 0.34);
}
html[data-theme="light"] {
  --bg: #eef3f8;
  --bg2: #f8fafc;
  --bg3: #e2e8f0;
  --card: #ffffff;
  --card-hover: #f1f5f9;
  --field: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --border: rgba(15, 23, 42, 0.12);
  --border2: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text2: #334155;
  --text3: #64748b;
  --accent: #0f766e;
  --accent2: #2563eb;
  --accent3: #e11d48;
  --ring: rgba(15, 118, 110, 0.22);
}
body {
  background: radial-gradient(circle at 10% 0%, rgba(45, 212, 191, 0.12), transparent 30%), radial-gradient(circle at 90% 10%, rgba(96, 165, 250, 0.12), transparent 26%), var(--bg);
}
html[data-theme="light"] body {
  background: radial-gradient(circle at 8% 0%, rgba(20, 184, 166, 0.12), transparent 30%), radial-gradient(circle at 94% 12%, rgba(37, 99, 235, 0.10), transparent 28%), var(--bg);
}
.navbar { background: rgba(7, 10, 18, 0.82); }
html[data-theme="light"] .navbar { background: rgba(248, 250, 252, 0.88); }
.nav-link { font-weight: 700; }
.nav-link:hover, .nav-link.active { box-shadow: inset 0 0 0 1px var(--border2); }
.pro-badge {
  min-width: 76px;
  justify-content: center;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
  color: var(--accent);
}
.pro-badge.is-active { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.36); color: var(--green); }
.pro-badge.is-locked { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.28); color: var(--accent3); }
.search-inner, .account-panel, .stat-card, .genre-card, .vj-card, .admin-tabs, .admin-toolbar, .admin-user-card, .admin-plan-card, .plan-card {
  background: var(--surface);
  border-color: var(--border2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}
html[data-theme="light"] .search-inner, html[data-theme="light"] .account-panel, html[data-theme="light"] .stat-card, html[data-theme="light"] .genre-card, html[data-theme="light"] .vj-card, html[data-theme="light"] .admin-tabs, html[data-theme="light"] .admin-toolbar, html[data-theme="light"] .admin-user-card, html[data-theme="light"] .admin-plan-card, html[data-theme="light"] .plan-card {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}
.btn {
  border-radius: 999px;
  min-height: 42px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #ffffff;
  box-shadow: 0 12px 30px var(--ring);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent2), var(--accent)); }
.btn-outline, .btn-glass {
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-outline:hover, .btn-glass:hover {
  background: rgba(45, 212, 191, 0.14);
  color: var(--text);
  border-color: var(--accent);
}
.hero .btn-glass, .detail-hero .btn-glass { color: #fff; background: rgba(255, 255, 255, 0.14); }
.movie-thumb {
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] .movie-thumb { border-color: rgba(15, 23, 42, 0.10); box-shadow: 0 18px 28px rgba(15, 23, 42, 0.16); }
.movie-title, .detail-title, .profile-identity h1, .admin-hero h1, .account-title, .panel-title, .section-title { color: var(--text); letter-spacing: 0; }
.hero-title, .hero-desc, .hero-meta, .detail-hero .detail-title, .detail-hero .detail-desc, .detail-hero .detail-tags, .detail-hero .access-strip { color: #ffffff; }
.detail-desc, .hero-desc, .movie-vj, .account-sub, .profile-meta, .admin-toolbar p, .admin-user-top p, .admin-plan-top p { color: var(--text2); }
.detail-hero .detail-desc { color: rgba(255,255,255,0.82); }
.tag { background: rgba(148, 163, 184, 0.12); color: var(--text2); }
.tag.accent { background: rgba(45, 212, 191, 0.14); color: var(--accent); }
.access-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
  font-size: 13px;
  color: var(--text2);
}
.access-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.access-pill.active { background: rgba(34, 197, 94, 0.16); color: var(--green); border-color: rgba(34, 197, 94, 0.32); }
.access-pill.locked { background: rgba(244, 63, 94, 0.14); color: #fb7185; border-color: rgba(244, 63, 94, 0.30); }
html[data-theme="light"] .access-pill.locked { color: #be123c; }
.account-form input, .profile-form input, .profile-form select, .admin-settings input, .admin-settings select, .admin-create-user input, .admin-create-user select, .admin-edit-grid input, .admin-edit-grid select, .admin-plan-form input, .admin-plan-form select, .plan-form-grid input, .plan-form-grid select, .admin-filter-bar input, .admin-filter-bar select, .admin-password-cell input {
  background: var(--field);
  color: var(--text);
  border-color: var(--border2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.account-form input::placeholder, .admin-filter-bar input::placeholder, .admin-password-cell input::placeholder { color: var(--text3); }
.account-form input:focus, .profile-form input:focus, .profile-form select:focus, .admin-settings input:focus, .admin-settings select:focus, .admin-create-user input:focus, .admin-create-user select:focus, .admin-edit-grid input:focus, .admin-edit-grid select:focus, .admin-plan-form input:focus, .admin-plan-form select:focus, .plan-form-grid input:focus, .plan-form-grid select:focus, .admin-filter-bar input:focus, .admin-filter-bar select:focus, .admin-password-cell input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}
.profile-hero, .admin-hero {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(96, 165, 250, 0.12)), var(--surface);
  border-color: var(--border2);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .profile-hero, html[data-theme="light"] .admin-hero {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(37, 99, 235, 0.10)), var(--surface-strong);
}
.admin-tab { border: 1px solid transparent; transition: all 0.2s ease; }
.admin-tab:hover { background: var(--card-hover); border-color: var(--border2); }
.admin-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 12px 26px var(--ring); }
.admin-page { max-width: 1280px; }
.admin-page .admin-hero {
  position: static;
  padding: 14px 18px;
  margin-bottom: 14px;
  gap: 14px;
}
.admin-page .admin-hero h1 {
  font-size: 22px;
  margin-bottom: 2px;
}
.admin-page .admin-hero p {
  font-size: 12px;
}
.admin-page .profile-kicker {
  margin-bottom: 3px;
}
.admin-page .admin-hero-actions .btn {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13px;
}
.admin-page .admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.admin-page .stat-card {
  min-height: 74px;
  padding: 12px;
}
.admin-page .stat-card strong {
  font-size: 22px;
}
.admin-user-card, .admin-plan-card, .plan-card { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.admin-user-card:hover, .admin-plan-card:hover, .plan-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.plan-card.current { border-color: var(--green); }
.plan-current-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}
.plan-feature-text { margin-top: 12px; color: var(--text2); font-size: 13px; line-height: 1.45; }
.plans-access-note { display: flex; justify-content: center; margin-top: 34px; }
.play-btn { color: #fff; font-size: 11px; font-weight: 900; }
.badge-series { color: #fff; }
.toast { background: var(--surface-strong); color: var(--text); }

@media (max-width: 900px) {
  .content-section { padding: 0 20px 32px; }
  .hero-content { left: 24px; bottom: 60px; }
  .hero { height: 420px; }
  .detail-hero-content { left: 24px; right: 24px; gap: 20px; }
  .detail-body { padding: 24px; }
  .detail-poster { width: 130px; height: 185px; }
  .search-page, .new-page { padding: 20px; }
  .plans-page { padding: 40px 20px; }
  .profile-page, .admin-page { padding: 24px 20px; }
  .admin-hero { position: static; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-console { grid-template-columns: 1fr; }
  .admin-console-main {
    grid-column: 1;
    grid-row: 2;
  }
  .admin-side-nav {
    position: static;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    order: -1;
  }
  .admin-side-nav .admin-tab {
    justify-content: center;
    flex-direction: column;
    gap: 4px;
  }
  .admin-users-layout, .admin-plans-layout, .admin-settings-layout { grid-template-columns: 1fr; }
  .admin-create-user, .admin-plan-form { position: static; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-filter-bar { min-width: 0; width: 100%; }
  .admin-create-grid, .admin-edit-grid, .plan-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .admin-head { display: none; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-content { left: 16px; }
  .hero { height: 360px; }
  .detail-hero-content { flex-direction: column; align-items: flex-start; bottom: 20px; }
  .detail-poster { width: 100px; height: 142px; }
  .movie-card { width: 145px; }
  .movie-thumb { width: 145px; height: 205px; }
  .profile-hero, .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-hero-actions, .admin-tabs, .admin-card-actions {
    width: 100%;
  }
  .admin-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .admin-tab {
    flex: 1;
  }
  .admin-side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-filter-bar {
    grid-template-columns: 1fr;
  }
  .profile-avatar { width: 60px; height: 60px; border-radius: 14px; }
  .profile-identity h1, .admin-hero h1 { font-size: 24px; }
  .profile-stats, .admin-metrics, .form-grid, .admin-create-grid, .admin-edit-grid, .plan-form-grid { grid-template-columns: 1fr; }
  .account-panel { padding: 18px; }
  .admin-user-top { flex-direction: column; }
  .admin-user-top small { text-align: left; }
  .admin-password-cell { grid-template-columns: 1fr; }
}

/* ── Page Transition ─────────────────────────────────────────────────────── */
.page-enter {
  animation: pageEnter 0.3s ease both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slim migration UI refresh */
:root {
  --radius: 8px;
  --radius-lg: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body,
button,
input,
select {
  letter-spacing: 0;
}

body {
  transition: background-color 0.28s var(--ease-out), color 0.28s var(--ease-out);
}

.logo-text {
  letter-spacing: 0;
}

#app > * {
  animation: pageEnter 0.34s var(--ease-soft) both;
}

.navbar,
.search-bar,
.movie-card,
.movie-thumb,
.account-panel,
.profile-hero,
.admin-hero,
.admin-console .admin-tab-panel,
.admin-side-nav,
.admin-user-card,
.admin-plan-card,
.stat-card,
.plan-card {
  transition:
    background-color 0.24s var(--ease-out),
    border-color 0.24s var(--ease-out),
    box-shadow 0.24s var(--ease-out),
    transform 0.24s var(--ease-out),
    color 0.24s var(--ease-out);
}

.movie-card:hover .movie-thumb,
.admin-user-card:hover,
.admin-plan-card:hover,
.plan-card:hover,
.genre-card:hover,
.vj-card:hover {
  transform: translateY(-3px);
}

.btn,
.btn-icon,
.admin-tab,
.admin-check,
.player-dl-btn,
.player-back {
  transition:
    transform 0.22s var(--ease-out),
    background-color 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    color 0.22s var(--ease-out);
}

.btn:hover,
.btn-icon:hover,
.admin-tab:hover,
.player-dl-btn:hover,
.player-back:hover {
  transform: translateY(-1px);
}

.btn:active,
.btn-icon:active,
.admin-tab:active {
  transform: translateY(0) scale(0.98);
}

.admin-page {
  width: min(100%, 1440px);
}

.admin-page .admin-hero {
  min-height: 96px;
  overflow: hidden;
}

.admin-page .admin-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-stat {
  position: relative;
  overflow: hidden;
}

.admin-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.72;
}

.admin-stat.danger::before {
  background: linear-gradient(90deg, var(--accent3), var(--gold));
}

.admin-console {
  grid-template-columns: 190px minmax(0, 1fr);
}

.admin-side-nav {
  top: 88px;
  background: var(--surface-strong);
}

.admin-side-nav .admin-tab {
  min-height: 46px;
}

.admin-console .admin-tab-panel {
  padding: clamp(14px, 2vw, 22px);
  background: var(--surface);
}

.admin-tab-panel.active {
  animation: adminPanelIn 0.28s var(--ease-soft) both;
}

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

.admin-users-layout,
.admin-plans-layout {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.admin-create-user,
.admin-plan-form {
  top: 104px;
}

.admin-toolbar {
  position: sticky;
  top: 76px;
  z-index: 5;
  background: var(--surface-strong);
}

.admin-user-grid,
.admin-plan-grid,
.admin-diagnostics-layout {
  align-items: start;
}

.admin-user-card,
.admin-plan-card,
.admin-diagnostic-card,
.account-panel,
.stat-card {
  border-radius: 8px;
}

.admin-user-card[hidden] {
  display: none;
}

.admin-card-actions .btn,
.admin-hero-actions .btn,
.admin-create-user .btn,
.admin-plan-form .btn {
  min-width: 124px;
}

.admin-diagnostics-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-diagnostic-card {
  min-width: 0;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.diagnostic-grid div,
.diagnostic-list div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
}

.diagnostic-grid span,
.diagnostic-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagnostic-grid strong,
.diagnostic-list strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.diagnostic-grid small {
  display: block;
  margin-top: 5px;
  color: var(--text2);
  font-size: 12px;
}

.diagnostic-list {
  display: grid;
  gap: 10px;
}

.diagnostic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagnostic-pill.ok {
  color: var(--green);
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.32);
}

.diagnostic-pill.danger {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.13);
  border-color: rgba(244, 63, 94, 0.30);
}

html[data-theme="light"] .diagnostic-pill.danger {
  color: #be123c;
}

@media (max-width: 1180px) {
  .admin-page .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-console {
    grid-template-columns: 1fr;
  }

  .admin-console-main {
    grid-column: 1;
    grid-row: 2;
  }

  .admin-side-nav {
    position: static;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-toolbar,
  .admin-create-user,
  .admin-plan-form {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    gap: 12px;
    padding: 0 14px;
  }

  .logo-text {
    font-size: 17px;
  }

  .pro-badge {
    display: none;
  }

  .admin-page {
    padding: 18px 12px;
  }

  .admin-page .admin-metrics,
  .admin-diagnostics-layout,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .admin-side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .admin-side-nav .admin-tab {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .admin-console .admin-tab-panel {
    padding: 12px;
  }

  .admin-toolbar,
  .admin-filter-bar,
  .admin-card-actions {
    gap: 10px;
  }

  .admin-card-actions .btn,
  .admin-hero-actions .btn,
  .admin-create-user .btn,
  .admin-plan-form .btn {
    width: 100%;
    min-width: 0;
  }

  .toast {
    max-width: calc(100vw - 24px);
    white-space: normal;
    text-align: center;
  }
}

/* ── Auth layout ─────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 480px);
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  gap: 0;
  align-items: stretch;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: linear-gradient(145deg, rgba(61,142,248,0.18), rgba(108,99,255,0.12));
  border: 1px solid var(--border);
  border-right: none;
}
.auth-brand h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.auth-brand p {
  color: var(--text2);
  line-height: 1.65;
  max-width: 36ch;
}
.auth-brand ul {
  margin-top: 28px;
  list-style: none;
  display: grid;
  gap: 12px;
}
.auth-brand li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text2);
  font-size: 14px;
}
.auth-brand li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 800;
}
.auth-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-lg);
}
.auth-panel {
  width: min(100%, 400px);
}
.auth-panel h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
}
.auth-panel-sub {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 22px;
  line-height: 1.5;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  font-size: 14px;
}
.auth-links a {
  color: var(--accent);
  font-weight: 600;
}
.auth-step-hint {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Admin shell (sidebar) ───────────────────────────────────────────────── */
.admin-page {
  padding: 0;
  max-width: none;
}
.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - var(--nav-h));
}
.admin-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.admin-sidebar-brand strong {
  font-size: 16px;
  font-weight: 900;
}
.admin-sidebar-brand span {
  display: block;
  color: var(--text3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-sidebar-nav {
  display: grid;
  gap: 6px;
  flex: 1;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}
.admin-sidebar-link:hover {
  background: var(--card-hover);
  color: var(--text);
}
.admin-sidebar-link.active {
  background: linear-gradient(135deg, rgba(61,142,248,0.22), rgba(108,99,255,0.12));
  border-color: rgba(61,142,248,0.35);
  color: var(--text);
}
.admin-sidebar-icon {
  width: 28px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.admin-sidebar-badge {
  margin-left: auto;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg3);
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.admin-sidebar-link.active .admin-sidebar-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.admin-sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}
.admin-main {
  min-width: 0;
  padding: 24px 28px 40px;
  background: var(--bg);
}
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.admin-topbar h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 4px;
}
.admin-topbar p {
  color: var(--text2);
  font-size: 14px;
}
.admin-topbar-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.admin-section-head {
  margin-bottom: 16px;
}
.admin-section-head h2 {
  font-size: 20px;
  font-weight: 800;
}
.admin-section-head p {
  color: var(--text2);
  font-size: 13px;
  margin-top: 4px;
}
.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.admin-panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.admin-panel-stack {
  display: grid;
  gap: 20px;
}
.admin-split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border2);
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .auth-brand {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 28px 24px;
  }
  .auth-panel-wrap {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .admin-sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .admin-sidebar-link {
    flex: 1 1 auto;
    min-width: 120px;
  }
  .admin-sidebar-footer {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .hero-content, .hero-dots {
    left: 24px;
    right: 24px;
  }
  .hero-carousel {
    min-height: 420px;
  }
}

/* ── Notifications (navbar) ─────────────────────────────────────────────── */
.notif-wrap {
  position: relative;
}
.notif-btn {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent3, #f43f5e);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-strong, var(--card));
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.notif-mark-read {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}
.notif-list {
  overflow-y: auto;
  max-height: 320px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:hover {
  background: var(--card-hover);
}
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.notif-item-body strong {
  font-size: 13px;
}
.notif-item-body span {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}
.notif-account_activated .notif-item-icon {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

/* ── Plan limits & usage ─────────────────────────────────────────────────── */
.plan-limits {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
}
.plan-limits strong {
  color: var(--text);
}
.usage-meter-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.usage-meter {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
}
.usage-meter span {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 4px;
}
.usage-meter strong {
  font-size: 18px;
}

/* ── Admin polish ─────────────────────────────────────────────────────────── */
.admin-field-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
}
.admin-stat {
  border-left: 3px solid var(--accent);
}
.admin-stat.danger {
  border-left-color: var(--red);
}
.admin-main {
  background: radial-gradient(circle at 100% 0%, rgba(61, 142, 248, 0.06), transparent 40%), var(--bg);
}
.admin-sidebar {
  background: linear-gradient(180deg, var(--bg2) 0%, #070910 100%);
}
.admin-topbar {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.admin-plan-card,
.admin-user-card {
  border-radius: 14px;
}
.browse-page,
.search-page,
.plans-page,
.profile-page,
.new-page {
  background: var(--bg);
  min-height: calc(100vh - var(--nav-h));
}

/* ── Site footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 20px 24px;
  margin-top: auto;
}
.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text3);
}
.site-footer-links {
  display: flex;
  gap: 18px;
}
.site-footer-links a {
  color: var(--text2);
  font-weight: 600;
}
.site-footer-links a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
