/* ==========================================================================
   NOVAFLIX — cosmic neon theme with glassmorphism and 3D cards
   ========================================================================== */
:root {
  --bg: #07051a;
  --bg-2: #110a2e;
  --surface: rgba(255, 255, 255, .06);
  --surface-2: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .12);
  --text: #f4f1ff;
  --muted: #a9a3c9;
  --pink: #ff3d81;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #fbbf24;
  --green: #34d399;
  --danger: #f43f5e;
  --grad: linear-gradient(120deg, #ff3d81 0%, #a855f7 50%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 61, 129, .25), rgba(139, 92, 246, .25), rgba(34, 211, 238, .25));
  --radius: 18px;
  --shadow: 0 20px 50px -12px rgba(0, 0, 0, .7);
  --glow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -10px rgba(168, 85, 247, .55);
  --nav-h: 72px;
  --gutter: clamp(16px, 4vw, 56px);
  --card-w: clamp(132px, 15vw, 210px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 700px at 80% -10%, #2a0f5c 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #3b0b3a 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--pink); color: #fff; }
.muted { color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius);
}

/* animated background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22; mix-blend-mode: screen;
  animation: orb 26s ease-in-out infinite alternate;
}
.bg-orbs span:nth-child(1) { background: var(--pink); top: -20%; left: -10%; }
.bg-orbs span:nth-child(2) { background: var(--violet); bottom: -25%; right: -10%; animation-delay: -8s; }
.bg-orbs span:nth-child(3) { background: var(--cyan); top: 40%; left: 40%; width: 30vmax; height: 30vmax; opacity: .12; animation-delay: -16s; }
@keyframes orb { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } 100% { transform: translate(-6vw, -4vh) scale(.9); } }

/* ------------------------------------------------------------------ Buttons */
.btn {
  --b: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .75em 1.35em; border-radius: 999px; border: 1px solid transparent;
  background: var(--b); font-weight: 600; letter-spacing: .2px; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
  white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--grad); background-size: 200% 100%; color: #fff; box-shadow: 0 10px 30px -8px rgba(255, 61, 129, .7); animation: shimmerBg 6s linear infinite; }
.btn--primary:hover { box-shadow: 0 14px 40px -8px rgba(168, 85, 247, .85); }
@keyframes shimmerBg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.btn--glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); }
.btn--glass:hover { background: rgba(255, 255, 255, .2); }
.btn--ghost { background: transparent; border-color: var(--border); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06); }
.btn--sm { padding: .5em 1em; font-size: .9rem; }
.btn--lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn--block { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: .4em; padding: .28em .75em; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; }
.chip--gold { color: #1a1200; background: var(--gold); border-color: transparent; font-weight: 700; }
.chip--outline { background: transparent; border-color: rgba(255, 255, 255, .45); }
.chip--glow { background: var(--grad-soft); border-color: rgba(168, 85, 247, .5); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; align-items: center; gap: .35em; padding: .2em .65em; font-size: .78rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.pill--ok { background: rgba(52, 211, 153, .15); border-color: rgba(52, 211, 153, .4); color: #8ff0c7; }
.pill--warn { background: rgba(251, 191, 36, .15); border-color: rgba(251, 191, 36, .45); color: #fde68a; }
.pill--admin { background: var(--grad-soft); border-color: rgba(255, 61, 129, .5); }
.status { display: inline-flex; align-items: center; gap: .35em; font-size: .78rem; font-weight: 600; padding: .2em .65em; border-radius: 999px; }
.status--done { background: rgba(52, 211, 153, .18); color: #7ef3c1; border: 1px solid rgba(52, 211, 153, .45); }
.status--progress { background: rgba(34, 211, 238, .14); color: #9cecfb; border: 1px solid rgba(34, 211, 238, .4); }

/* --------------------------------------------------------------------- Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
  background: linear-gradient(to bottom, rgba(7, 5, 26, .85), transparent);
}
.nav.is-scrolled { background: rgba(10, 7, 30, .78); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .8); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 900; letter-spacing: 3px; font-size: 1.35rem; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 8px 24px -6px rgba(255, 61, 129, .8);
  transform: perspective(200px) rotateY(-18deg) rotateX(8deg); animation: markFloat 5s ease-in-out infinite;
}
.brand__mark i { font-size: .9rem; margin-left: 2px; }
@keyframes markFloat { 50% { transform: perspective(200px) rotateY(18deg) rotateX(-8deg) translateY(-2px); } }
.brand__text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__links { display: flex; align-items: center; gap: .25rem; }
.nav__links > a, .dropdown__toggle {
  padding: .5rem .9rem; border-radius: 999px; color: var(--muted); background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; transition: color .2s, background .2s;
}
.nav__links > a:hover, .dropdown__toggle:hover, .nav__links .active { color: #fff; background: var(--surface); }
.search { margin-left: auto; position: relative; display: flex; align-items: center; }
.search--menu { display: none; }
.search i { position: absolute; left: 14px; color: var(--muted); font-size: .9rem; }
.search input {
  width: 220px; padding: .55rem 1rem .55rem 2.4rem; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .06); outline: none; transition: width .35s var(--ease), border-color .2s, background .2s;
}
.search input:focus { width: 280px; border-color: rgba(168, 85, 247, .7); background: rgba(255, 255, 255, .1); }
.nav__actions { display: flex; align-items: center; gap: .6rem; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 800;
  background: var(--grad); box-shadow: var(--glow); transition: transform .2s;
}
.avatar:hover { transform: rotate(-6deg) scale(1.05); }
.nav__burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px; padding: .5rem;
  background: rgba(18, 12, 44, .96); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top;
  transition: all .22s var(--ease); max-height: 70vh; overflow: auto; z-index: 60;
}
.dropdown--right .dropdown__menu { left: auto; right: 0; }
.dropdown.is-open .dropdown__menu, .dropdown:focus-within .dropdown__menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .dropdown:hover .dropdown__menu { opacity: 1; visibility: visible; transform: none; } }
.dropdown__menu a, .dropdown__menu button {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .8rem; border-radius: 10px; color: var(--muted);
  background: none; border: 0; text-align: left; cursor: pointer; font-size: .95rem;
}
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); color: #fff; }
.dropdown__head { padding: .6rem .8rem .8rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; display: grid; gap: .25rem; }
.dropdown__head small { color: var(--muted); }
.dropdown__head .pill { justify-self: start; padding: .25em .7em; }

/* ------------------------------------------------------------------- Toasts */
.toasts { position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; z-index: 80; display: grid; gap: .6rem; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: 14px;
  background: rgba(20, 14, 48, .95); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: toastIn .5s var(--ease) both;
}
.toast i { font-size: 1.1rem; }
.toast--success i { color: var(--green); }
.toast--error i { color: var(--danger); }
.toast--info i { color: var(--cyan); }
.toast span { flex: 1; }
.toast button { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.toast.is-hiding { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* --------------------------------------------------------------------- Hero */
.hero { position: relative; height: min(92vh, 860px); min-height: 560px; overflow: hidden; perspective: 1400px; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 1s; display: flex; align-items: center; padding: var(--nav-h) var(--gutter) 90px; gap: 4vw; }
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero__bg { position: absolute; inset: -2%; background-size: cover; background-position: center 25%; transform: scale(1.12); transition: transform 9s linear; }
.hero__slide.is-active .hero__bg { transform: scale(1.02); }
.hero__bg--blur { filter: blur(26px) saturate(140%); }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 5, 26, .96) 0%, rgba(7, 5, 26, .75) 38%, rgba(7, 5, 26, .15) 70%, rgba(7, 5, 26, .45) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero__content { position: relative; z-index: 2; max-width: 640px; }
.hero__slide.is-active .hero__content > * { animation: riseIn .9s var(--ease) both; }
.hero__slide.is-active .hero__content > :nth-child(2) { animation-delay: .08s; }
.hero__slide.is-active .hero__content > :nth-child(3) { animation-delay: .16s; }
.hero__slide.is-active .hero__content > :nth-child(4) { animation-delay: .24s; }
.hero__slide.is-active .hero__content > :nth-child(5) { animation-delay: .32s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); filter: blur(6px); } }
.hero__tag { display: inline-flex; align-items: center; gap: .5em; padding: .35em .9em; border-radius: 999px; background: var(--grad-soft); border: 1px solid rgba(255, 61, 129, .45); font-size: .85rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.hero__tag i { color: var(--gold); }
.hero__title { font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: 1.02; margin: .9rem 0 .8rem; font-weight: 900; letter-spacing: -1px; text-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; color: #ddd6fe; font-size: .95rem; }
.hero__desc { color: #d8d2f0; font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 58ch; margin: 1rem 0 1.6rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__poster {
  position: relative; z-index: 2; margin-left: auto; width: clamp(200px, 22vw, 320px); aspect-ratio: 2 / 3; border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .15), 0 0 80px -10px rgba(168, 85, 247, .6);
  transform: rotateY(-16deg) rotateX(6deg); transform-style: preserve-3d; transition: transform .6s var(--ease);
  background: var(--grad);
}
.hero__slide.is-active .hero__poster { animation: posterIn 1.2s var(--ease) both, floaty 6s ease-in-out 1.2s infinite; }
@keyframes posterIn { from { opacity: 0; transform: rotateY(-50deg) translateX(120px) translateZ(-200px); } }
@keyframes floaty { 50% { translate: 0 -12px; } }
.hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.hero__poster.noimg::after { content: ''; position: absolute; inset: 0; background: var(--grad); }
.hero__arrow {
  position: absolute; bottom: 36px; z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer;
  background: rgba(10, 7, 30, .5); backdrop-filter: blur(10px); transition: background .2s, transform .2s;
}
.hero__arrow:hover { background: rgba(255, 61, 129, .55); transform: scale(1.08); }
.hero__arrow--prev { right: calc(var(--gutter) + 64px); }
.hero__arrow--next { right: var(--gutter); }
.hero__dots { position: absolute; bottom: 48px; left: var(--gutter); z-index: 3; display: flex; gap: .55rem; }
.hero__dots button { width: 34px; height: 6px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .25); cursor: pointer; overflow: hidden; transition: width .35s var(--ease); }
.hero__dots button.is-active { width: 64px; }
.hero__dots button span { display: block; height: 100%; width: 0; background: var(--grad); }
.hero__dots button.is-active span { animation: dotFill var(--hero-interval, 7s) linear forwards; }
.hero.is-paused .hero__dots button.is-active span { animation-play-state: paused; }
@keyframes dotFill { to { width: 100%; } }
.empty-hero { padding: calc(var(--nav-h) + 80px) var(--gutter) 60px; text-align: center; }

/* -------------------------------------------------------------- Rows/cards */
.rows { position: relative; z-index: 2; margin-top: -40px; padding-bottom: 40px; }
.rows--tight { margin-top: 0; }
.row { margin: 0 0 2.4rem; }
.row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter); margin-bottom: .4rem; }
.row__head h2 { font-size: clamp(1.15rem, 2vw, 1.55rem); margin: 0; font-weight: 700; }
.row__head h2 i { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: .2rem; }
.row__more { color: var(--muted); font-size: .9rem; white-space: nowrap; transition: color .2s, gap .2s; display: inline-flex; align-items: center; gap: .35rem; }
.row__more:hover { color: #fff; gap: .6rem; }
.row__viewport { position: relative; }
.row__track {
  display: flex; gap: clamp(12px, 1.4vw, 22px); overflow-x: auto; overflow-y: visible; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 26px var(--gutter) 34px; scrollbar-width: none; perspective: 1000px;
}
.row__track::-webkit-scrollbar { display: none; }
.row__arrow {
  position: absolute; top: 26px; bottom: 34px; width: calc(var(--gutter) - 4px); min-width: 40px; z-index: 5; border: 0; cursor: pointer; opacity: 0;
  transition: opacity .25s; font-size: 1.3rem;
}
.row__arrow--prev { left: 0; background: linear-gradient(90deg, rgba(7, 5, 26, .95), transparent); border-radius: 0 14px 14px 0; }
.row__arrow--next { right: 0; background: linear-gradient(-90deg, rgba(7, 5, 26, .95), transparent); border-radius: 14px 0 0 14px; }
.row__viewport:hover .row__arrow { opacity: 1; }
.row__arrow[disabled] { opacity: 0 !important; pointer-events: none; }

.card3d {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  flex: 0 0 var(--card-w); width: var(--card-w); scroll-snap-align: start; perspective: 900px; display: block; outline: none;
}
.card3d__inner {
  position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: linear-gradient(150deg, #2b1660, #10082a);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .07);
}
.card3d:hover .card3d__inner, .card3d:focus-visible .card3d__inner {
  transform: translateY(-10px) scale(1.06) rotateX(var(--rx)) rotateY(var(--ry));
  box-shadow: 0 30px 50px -16px rgba(0, 0, 0, .9), 0 0 0 2px rgba(255, 61, 129, .7), 0 0 40px -6px rgba(168, 85, 247, .8);
}
.card3d.is-tilting .card3d__inner { transition: transform .08s linear, box-shadow .45s var(--ease); }
.card3d__inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.card3d:hover .card3d__inner img { transform: scale(1.08); filter: saturate(1.2); }
.card3d__ph { position: absolute; inset: 0; display: grid; place-items: end start; padding: 14px; background: var(--grad); opacity: 0; }
.card3d__ph span { font-weight: 800; font-size: 1.1rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.noimg .card3d__ph { opacity: 1; }
.card3d__shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .7), transparent 55%);
}
.card3d:hover .card3d__shine, [data-tilt]:hover .card3d__shine { opacity: 1; }
.card3d__rating {
  position: absolute; top: 10px; left: 10px; z-index: 2; font-size: .75rem; font-weight: 700; padding: .25em .6em; border-radius: 999px;
  background: rgba(7, 5, 26, .7); backdrop-filter: blur(6px); border: 1px solid rgba(251, 191, 36, .5); color: var(--gold);
}
.card3d__info {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 46px 12px 14px;
  background: linear-gradient(0deg, rgba(7, 5, 26, .98) 10%, rgba(7, 5, 26, .7) 55%, transparent);
  transform: translateY(32%); transition: transform .45s var(--ease); translate: 0 0 40px;
}
.card3d:hover .card3d__info, .card3d:focus-visible .card3d__info { transform: none; }
.card3d__info h3 { margin: 0; font-size: .98rem; line-height: 1.2; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card3d__info p { margin: .25rem 0 0; font-size: .75rem; color: var(--muted); opacity: 0; transition: opacity .35s .05s; }
.card3d:hover .card3d__info p { opacity: 1; }
.card3d__play {
  position: absolute; right: 12px; top: -10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 8px 20px -6px rgba(255, 61, 129, .9); transform: scale(0) rotate(-90deg); transition: transform .4s var(--ease);
}
.card3d:hover .card3d__play { transform: scale(1) rotate(0); }
.card3d__progress { position: absolute; left: 10px; right: 10px; bottom: 40px; z-index: 3; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.card3d__progress span { display: block; height: 100%; background: var(--grad); border-radius: inherit; box-shadow: 0 0 12px rgba(255, 61, 129, .8); }
.card3d--continue .card3d__info, .card3d--history .card3d__info { padding-bottom: 54px; transform: none; }
.card3d--continue .card3d__info p, .card3d--history .card3d__info p { display: none; }
.card3d .status { position: absolute; left: 10px; bottom: 12px; z-index: 3; font-size: .7rem; backdrop-filter: blur(6px); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card3d--continue .card3d__play { top: auto; bottom: 120px; transform: scale(1); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr)); gap: clamp(14px, 2vw, 26px); padding: 10px 0 40px; perspective: 1200px; }
.grid .card3d { width: auto; }

.promo {
  margin: 0 var(--gutter) 2.4rem; padding: 1.4rem 1.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  border-radius: 22px; background: linear-gradient(120deg, rgba(255, 61, 129, .22), rgba(139, 92, 246, .22) 50%, rgba(34, 211, 238, .18)); border: 1px solid rgba(255, 255, 255, .15);
  position: relative; overflow: hidden;
}
.promo::before { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .08), transparent 30%); animation: spin 10s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.promo > * { position: relative; }
.promo h2 { margin: 0 0 .3rem; font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
.promo h2 i { color: var(--gold); }
.promo p { margin: 0; color: #ddd6fe; }
.promo__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------- Pages */
.page { padding: calc(var(--nav-h) + 30px) var(--gutter) 40px; min-height: 70vh; }
.page__head { margin-bottom: 1.4rem; }
.page__head h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; letter-spacing: -.5px; }
.page__head p { margin: .3rem 0 0; color: var(--muted); max-width: 80ch; }
.cat-pills { display: flex; gap: .55rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: 1rem; scrollbar-width: thin; }
.cat-pill { padding: .5rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; color: var(--muted); transition: all .2s; }
.cat-pill small { opacity: .7; margin-left: .2rem; }
.cat-pill:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.cat-pill.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(255, 61, 129, .8); }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); display: grid; justify-items: center; gap: 1rem; }
.empty i { font-size: 3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------- Detail */
.detail { position: relative; min-height: 88vh; display: flex; align-items: center; padding: calc(var(--nav-h) + 30px) var(--gutter) 50px; overflow: hidden; }
.detail__bg { position: absolute; inset: -3%; background-size: cover; background-position: center; animation: kenburns 30s ease-in-out infinite alternate; }
.detail__bg--blur { filter: blur(30px) saturate(150%); }
@keyframes kenburns { to { transform: scale(1.1) translate(-1%, -1%); } }
.detail__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 5, 26, .97) 0%, rgba(7, 5, 26, .85) 45%, rgba(7, 5, 26, .45) 100%), linear-gradient(0deg, var(--bg), transparent 40%); }
.detail__inner { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; width: 100%; max-width: 1300px; }
.poster3d {
  position: relative; width: clamp(220px, 24vw, 340px); aspect-ratio: 2 / 3; border-radius: 22px; overflow: hidden; background: linear-gradient(150deg, #2b1660, #10082a);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .15), 0 0 90px -20px rgba(255, 61, 129, .7);
  transform: perspective(1000px) rotateY(var(--ry, 10deg)) rotateX(var(--rx, 2deg)); transition: transform .5s var(--ease); animation: riseIn 1s var(--ease) both;
}
.poster3d img { width: 100%; height: 100%; object-fit: cover; }
.detail__info { animation: riseIn 1s .1s var(--ease) both; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.crumbs a { font-size: .82rem; color: var(--muted); padding: .2rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.crumbs a:hover { color: #fff; }
.detail__title { margin: 0 0 .7rem; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.04; font-weight: 900; letter-spacing: -1px; }
.detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; color: #ddd6fe; }
.stars { display: inline-flex; align-items: center; gap: .15rem; color: var(--gold); }
.stars b { color: #fff; margin-left: .4rem; }
.stars small { color: var(--muted); }
.detail__desc { font-size: 1.08rem; color: #ddd6fe; max-width: 70ch; margin: 1.1rem 0 1.2rem; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0 1.6rem; }
.resume-box { max-width: 520px; display: grid; gap: .4rem; }
.resume-box small { color: var(--muted); }
.resume-box__bar { height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.resume-box__bar span { display: block; height: 100%; background: var(--grad); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 2rem; margin: 0; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: .35rem; }
.facts dd { margin: 0; }
.section { padding: 0 var(--gutter) 2.6rem; }
.section__title { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 0 0 1rem; }
.section__title i { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cast { display: flex; gap: 1.2rem; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.cast__item { flex: 0 0 auto; width: 110px; text-align: center; display: grid; justify-items: center; gap: .5rem; font-size: .88rem; color: #ddd6fe; }
.cast__avatar {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem;
  background: linear-gradient(135deg, hsl(var(--h) 85% 60%), hsl(calc(var(--h) + 60) 85% 45%));
  box-shadow: 0 12px 26px -10px hsl(var(--h) 85% 50%), inset 0 0 0 3px rgba(255, 255, 255, .2); transition: transform .35s var(--ease);
}
.cast__item:hover .cast__avatar { transform: translateY(-6px) rotate(-6deg) scale(1.06); }
.trailer { position: relative; aspect-ratio: 16 / 9; max-width: 1000px; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--border); background: #000; }
.trailer iframe, .trailer video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* -------------------------------------------------------------- Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s; }
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3, 2, 12, .72); backdrop-filter: blur(8px); }
.modal__card {
  position: relative; width: min(460px, 100%); padding: 2.2rem 1.8rem 1.8rem; text-align: center; border-radius: 26px;
  background: linear-gradient(160deg, rgba(40, 22, 90, .97), rgba(16, 10, 40, .97)); border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 80px -20px rgba(255, 61, 129, .6);
  transform: perspective(900px) rotateX(18deg) translateY(30px) scale(.92); transition: transform .5s var(--ease);
}
.modal.is-open .modal__card { transform: none; }
.modal__x { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 1.6rem; color: var(--muted); cursor: pointer; }
.modal__icon { width: 74px; height: 74px; margin: -70px auto 1rem; border-radius: 22px; display: grid; place-items: center; font-size: 1.8rem; background: var(--grad); box-shadow: 0 16px 36px -10px rgba(255, 61, 129, .9); transform: rotate(-8deg); animation: markFloat 4s ease-in-out infinite; }
.modal__icon i { color: #fff; }
.modal__card h3 { margin: 0 0 .5rem; font-size: 1.45rem; }
.modal__text { color: #cfc8ec; margin: 0 0 1.4rem; }
.modal__text span { color: #fff; font-weight: 700; }
.modal__actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.modal.shake .modal__card { animation: shake .5s; }
@keyframes shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }

/* --------------------------------------------------------------- Auth */
.page-auth { background: var(--bg); }
.auth-wall { position: fixed; inset: 0; z-index: -1; overflow: hidden; perspective: 1000px; }
.auth-wall::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(7, 5, 26, .55), rgba(7, 5, 26, .96) 70%); }
.auth-wall__plane { position: absolute; inset: -30% -10%; display: flex; gap: 18px; justify-content: center; transform: rotateX(32deg) rotateZ(-14deg) scale(1.15); }
.auth-wall__col { display: flex; flex-direction: column; gap: 18px; width: 180px; animation: wallScroll 60s linear infinite; }
.auth-wall__col:nth-child(even) { animation-direction: reverse; margin-top: -120px; }
.auth-wall__col img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; opacity: .55; }
@keyframes wallScroll { to { transform: translateY(-50%); } }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth__card { width: min(440px, 100%); padding: 2.2rem 2rem; box-shadow: var(--shadow); animation: riseIn .8s var(--ease) both; background: rgba(16, 10, 40, .75); }
.auth__card--wide { width: min(860px, 100%); }
.auth__card h1 { margin: .4rem 0 .2rem; font-size: 2rem; }
.auth__icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); font-size: 1.4rem; box-shadow: 0 12px 30px -10px rgba(255, 61, 129, .9); }
.auth__alt { text-align: center; color: var(--muted); margin: 1rem 0 0; }
.auth__alt a { color: #fff; font-weight: 600; border-bottom: 1px dashed rgba(255, 255, 255, .5); }
.demo-creds { margin-top: 1rem; font-size: .9rem; color: var(--muted); background: var(--surface); border-radius: 12px; padding: .6rem .9rem; }
.demo-creds summary { cursor: pointer; }
.demo-note { color: var(--muted); font-size: .9rem; }
.install-log { padding-left: 1.2rem; color: #ddd6fe; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan__card {
  display: grid; gap: .45rem; padding: 1.2rem; border-radius: 18px; background: var(--surface); border: 2px solid var(--border); cursor: pointer; height: 100%;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, background .3s;
}
.plan__card:hover { transform: translateY(-4px) rotateX(4deg); }
.plan input:checked + .plan__card { border-color: var(--pink); background: linear-gradient(160deg, rgba(255, 61, 129, .2), rgba(139, 92, 246, .15)); box-shadow: 0 18px 40px -16px rgba(255, 61, 129, .8); transform: translateY(-6px); }
.plan input:focus-visible + .plan__card { outline: 2px solid var(--cyan); }
.plan__icon { font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan__card b { font-size: 1.2rem; }
.plan__price { font-size: 1.7rem; font-weight: 800; }
.plan__price small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.plan__feat { font-size: .88rem; color: #cfc8ec; }
.plan__feat i { color: var(--green); margin-right: .3rem; }

/* -------------------------------------------------------------- Forms */
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field > span { font-size: .85rem; color: #cfc8ec; font-weight: 500; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select, .toolbar select, .toolbar input, .track-row input {
  width: 100%; padding: .75rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: rgba(7, 5, 26, .55); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select option, .toolbar select option { background: #1a1140; }
.field input:focus, .field textarea:focus, .field select:focus, .track-row input:focus, .toolbar input:focus, .toolbar select:focus {
  border-color: rgba(168, 85, 247, .8); box-shadow: 0 0 0 4px rgba(168, 85, 247, .2); background: rgba(7, 5, 26, .8);
}
.field textarea { resize: vertical; min-height: 70px; }
.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: .4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
.alert { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: center; }
.alert--error { background: rgba(244, 63, 94, .14); border: 1px solid rgba(244, 63, 94, .45); color: #fecdd3; }

/* -------------------------------------------------------------- Admin */
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.admin-tabs a { padding: .6rem 1.1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); display: inline-flex; gap: .5rem; align-items: center; transition: all .2s; }
.admin-tabs a:hover { color: #fff; }
.admin-tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; transition: transform .3s var(--ease); }
.stat:hover { transform: translateY(-4px) rotateX(6deg); }
.stat > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--grad); font-size: 1.2rem; box-shadow: 0 10px 24px -10px rgba(255, 61, 129, .9); }
.stat b { display: block; font-size: 1.6rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .85rem; }
.toolbar { display: flex; gap: .7rem; padding: .8rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.toolbar__search { position: relative; flex: 1 1 240px; }
.toolbar__search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar__search input { padding-left: 2.5rem; }
.toolbar select { width: auto; flex: 0 1 220px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .07); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .04); }
.table .right { text-align: right; }
.nowrap { white-space: nowrap; }
.empty-cell { text-align: center !important; color: var(--muted); padding: 2rem !important; }
.t-title { display: flex; align-items: center; gap: .8rem; }
.t-title img { width: 44px; height: 66px; object-fit: cover; border-radius: 8px; flex: none; box-shadow: 0 6px 14px -6px #000; }
.t-title a { font-weight: 600; }
.t-title a:hover { color: var(--pink); }
.t-title small { display: block; color: var(--muted); font-size: .78rem; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: all .2s; }
.icon-btn:hover { background: var(--violet); border-color: transparent; transform: translateY(-2px); }
.icon-btn--danger:hover { background: var(--danger); }
form.inline { display: inline; }
.vform { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; align-items: start; }
.vform fieldset { margin: 0 0 1.2rem; padding: 1.2rem 1.3rem .4rem; min-width: 0; }
.vform legend { padding: .3rem .8rem; border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.vform legend small { color: var(--muted); font-weight: 400; }
.vform__side { position: sticky; top: calc(var(--nav-h) + 16px); }
.vform__actions { display: grid; gap: .6rem; }
.tracks { display: grid; gap: .6rem; margin: .4rem 0 1rem; }
.track-row { display: grid; grid-template-columns: 90px 160px 1fr 36px; gap: .5rem; align-items: center; animation: riseIn .4s var(--ease) both; }
.poster-preview { width: 150px; aspect-ratio: 2 / 3; margin: .4rem auto 1rem; border-radius: 14px; overflow: hidden; background: var(--grad-soft); box-shadow: var(--shadow); transform: perspective(600px) rotateY(-12deg); }
.backdrop-preview { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--grad-soft); margin-bottom: 1rem; }
.poster-preview img, .backdrop-preview img { width: 100%; height: 100%; object-fit: cover; }
.check-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.check-chips input { position: absolute; opacity: 0; }
.check-chips span { display: inline-block; padding: .4rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: .88rem; transition: all .2s; }
.check-chips input:checked + span { background: var(--grad); border-color: transparent; }
.check-chips input:focus-visible + span { outline: 2px solid var(--cyan); }
.switch { display: flex; align-items: center; gap: .8rem; cursor: pointer; padding-bottom: .8rem; }
.switch input { position: absolute; opacity: 0; }
.switch__ui { width: 46px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .15); position: relative; transition: background .25s; flex: none; }
.switch__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + .switch__ui { background: var(--pink); }
.switch input:checked + .switch__ui::after { transform: translateX(20px); }
.cat-create { display: grid; grid-template-columns: 1fr 1.5fr 90px auto; gap: .8rem; padding: 1.1rem 1.2rem .2rem; align-items: end; margin-bottom: 1.2rem; }
.cat-create .btn { margin-bottom: 1rem; }
.cat-list { display: grid; gap: .8rem; }
.cat-item { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem 0; flex-wrap: wrap; }
.cat-item__form { flex: 1 1 520px; display: grid; grid-template-columns: 1fr 1.5fr 90px 36px; gap: .7rem; align-items: end; }
.cat-item__form .icon-btn { margin-bottom: 1rem; }
.cat-item__meta { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }

/* ------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--border); margin-top: 20px; background: linear-gradient(0deg, rgba(0, 0, 0, .35), transparent); }
.footer__inner { padding: 2.4rem var(--gutter); display: grid; gap: .5rem; justify-items: start; color: var(--muted); }
.footer__inner p { margin: 0; }
.footer__small { font-size: .8rem; opacity: .75; }

/* ============================================================== PLAYER */
.page-watch { background: #000; overflow: hidden; }
.page-watch .bg-orbs { display: none; }
.player { position: fixed; inset: 0; background: #000; user-select: none; -webkit-user-select: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player video::cue { background: rgba(0, 0, 0, .65); color: #fff; font-family: 'Outfit', sans-serif; font-size: clamp(16px, 2.4vw, 30px); line-height: 1.35; }
.player.is-idle { cursor: none; }
.player__top, .player__controls { position: absolute; left: 0; right: 0; z-index: 5; transition: opacity .35s, transform .35s var(--ease); }
.player.is-idle .player__top, .player.is-idle .player__controls { opacity: 0; pointer-events: none; }
.player.is-idle .player__top { transform: translateY(-20px); }
.player.is-idle .player__controls { transform: translateY(20px); }
.player__top { top: 0; display: flex; align-items: center; gap: 1rem; padding: 18px clamp(12px, 3vw, 32px) 50px; background: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent); }
.player__title { flex: 1; text-align: center; min-width: 0; }
.player__title small { display: block; color: var(--muted); font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; }
.player__title strong { font-size: clamp(1rem, 2vw, 1.3rem); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbtn { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); backdrop-filter: blur(10px); transition: background .2s, transform .2s; }
.pbtn:hover { background: rgba(255, 61, 129, .6); transform: translateY(-2px); }
.player__controls { bottom: 0; padding: 60px clamp(12px, 3vw, 32px) max(16px, env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .5) 60%, transparent); }
.seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek__track { position: relative; width: 100%; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .2); transition: height .2s; }
.seek:hover .seek__track, .seek.is-dragging .seek__track { height: 8px; }
.seek__buffer, .seek__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; }
.seek__buffer { background: rgba(255, 255, 255, .35); width: 0; }
.seek__fill { background: var(--grad); width: 0; box-shadow: 0 0 14px rgba(255, 61, 129, .8); }
.seek__thumb { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 61, 129, .5); transform: translate(-50%, -50%) scale(0); transition: transform .2s; left: 0; }
.seek:hover .seek__thumb, .seek.is-dragging .seek__thumb { transform: translate(-50%, -50%) scale(1); }
.seek__tip { position: absolute; bottom: 26px; padding: .25rem .55rem; border-radius: 8px; background: rgba(20, 14, 48, .95); border: 1px solid var(--border); font-size: .8rem; transform: translateX(-50%); opacity: 0; transition: opacity .2s; pointer-events: none; font-variant-numeric: tabular-nums; }
.seek:hover .seek__tip, .seek.is-dragging .seek__tip { opacity: 1; }
.cbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.cbar__group { display: flex; align-items: center; gap: clamp(2px, .6vw, 8px); min-width: 0; }
.cbtn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; font-size: 1.15rem; display: grid; place-items: center; transition: background .2s, transform .2s, color .2s; flex: none; }
.cbtn:hover { background: rgba(255, 255, 255, .12); transform: scale(1.1); }
.cbtn.is-on { color: var(--pink); }
.cbtn em { position: absolute; font-style: normal; font-size: .52rem; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -38%); }
.cbtn[disabled] { opacity: .35; pointer-events: none; }
#playBtn { width: 50px; height: 50px; font-size: 1.35rem; background: var(--grad); border-radius: 50%; box-shadow: 0 8px 24px -6px rgba(255, 61, 129, .9); }
.volume { display: flex; align-items: center; }
.volume input { width: 0; opacity: 0; transition: width .3s var(--ease), opacity .3s; accent-color: var(--pink); }
.volume:hover input, .volume input:focus { width: 90px; opacity: 1; }
.time { font-variant-numeric: tabular-nums; font-size: .92rem; color: #ddd; white-space: nowrap; margin-left: .4rem; }
.menu-wrap { position: relative; }
.pmenu {
  position: absolute; bottom: calc(100% + 12px); right: 0; min-width: 210px; max-height: 55vh; overflow: auto; padding: .6rem;
  background: rgba(16, 10, 40, .97); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.96); transform-origin: bottom right; transition: all .22s var(--ease);
}
.pmenu.is-open { opacity: 1; visibility: visible; transform: none; }
.pmenu h4 { margin: .3rem .5rem .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.pmenu ul { list-style: none; margin: 0 0 .4rem; padding: 0; }
.pmenu li button { width: 100%; text-align: left; padding: .55rem .7rem; border-radius: 10px; border: 0; background: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.pmenu li button:hover { background: rgba(255, 255, 255, .08); }
.pmenu li button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); flex: none; }
.pmenu li button.is-active { color: #fff; font-weight: 600; }
.pmenu li button.is-active::before { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 10px var(--pink); }
.pmenu .pmenu__empty { color: var(--muted); font-size: .85rem; padding: .3rem .7rem; }
.player__bigplay {
  position: absolute; top: 50%; left: 50%; z-index: 4; width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer; font-size: 2.2rem;
  background: var(--grad); box-shadow: 0 0 0 12px rgba(255, 61, 129, .18), 0 20px 60px -10px rgba(255, 61, 129, .9);
  transform: translate(-50%, -50%) scale(0); transition: transform .4s var(--ease);
}
.player__bigplay i { margin-left: 6px; }
.player[data-state="paused"] .player__bigplay, .player[data-state="ready"] .player__bigplay, .player[data-state="stopped"] .player__bigplay { transform: translate(-50%, -50%) scale(1); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 22px rgba(255, 61, 129, .06), 0 20px 60px -10px rgba(255, 61, 129, .9); } }
.player__spinner { position: absolute; inset: 0; display: none; place-items: center; z-index: 3; pointer-events: none; }
.player[data-state="loading"] .player__spinner, .player.is-buffering .player__spinner { display: grid; }
.player__spinner span { width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--pink); border-right-color: var(--violet); animation: spin .9s linear infinite; }
.player__flash { position: absolute; top: 50%; left: 50%; z-index: 4; transform: translate(-50%, -50%); padding: .8rem 1.3rem; border-radius: 16px; background: rgba(10, 7, 30, .75); backdrop-filter: blur(10px); font-weight: 700; font-size: 1.2rem; opacity: 0; pointer-events: none; }
.player__flash.is-show { animation: flash .8s var(--ease); }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); } }
.player__tap { position: absolute; top: 15%; bottom: 25%; width: 32%; z-index: 2; display: grid; place-items: center; }
.player__tap--left { left: 0; }
.player__tap--right { right: 0; }
.player__tap span { opacity: 0; padding: .7rem 1.1rem; border-radius: 999px; background: rgba(255, 255, 255, .15); backdrop-filter: blur(6px); font-weight: 700; }
.player__tap.is-show span { animation: flash .7s var(--ease); }
.player__resume {
  position: absolute; left: 50%; top: 90px; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem .6rem 1.1rem;
  border-radius: 999px; background: rgba(16, 10, 40, .9); border: 1px solid var(--border); box-shadow: var(--shadow); animation: riseIn .6s var(--ease) both; white-space: nowrap;
}
.player__resume button { border: 0; border-radius: 999px; padding: .4rem .9rem; background: var(--grad); cursor: pointer; font-weight: 600; }
.player__end, .player__error { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(3, 2, 12, .78); backdrop-filter: blur(10px); padding: 20px; text-align: center; }
.player__end[hidden], .player__error[hidden], .player__resume[hidden] { display: none; }
#video::-webkit-media-text-track-container { transition: transform .3s var(--ease); }
.player:not(.is-idle) #video::-webkit-media-text-track-container { transform: translateY(-96px); }
@media (max-width: 600px) { .player:not(.is-idle) #video::-webkit-media-text-track-container { transform: translateY(-64px); } }
.player__endcard { animation: riseIn .7s var(--ease) both; }
.player__endcard > i { font-size: 3.4rem; color: var(--green); filter: drop-shadow(0 0 20px rgba(52, 211, 153, .7)); }
.player__endcard h2 { margin: .6rem 0 .3rem; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.player__endcard p { color: var(--muted); margin: 0 0 1.4rem; }
.player__endactions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.player__error { display: grid; gap: 1rem; align-content: center; }
.player__error > i { font-size: 3rem; color: var(--danger); }

/* --------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .nav__inner { gap: .8rem; }
  .brand { font-size: 1.15rem; letter-spacing: 2px; }
  .search input { width: 170px; }
  .search input:focus { width: 210px; }
  .nav__actions .btn { padding-inline: 1em; }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .vform { grid-template-columns: 1fr; }
  .vform__side { position: static; }
  .form-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__burger { display: grid; place-items: center; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .2rem; padding: 1rem var(--gutter) 1.4rem;
    background: rgba(12, 8, 34, .98); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px);
    transform: translateY(calc(-100% - var(--nav-h) - 20px)); visibility: hidden; transition: transform .4s var(--ease), visibility 0s linear .4s; max-height: calc(100vh - var(--nav-h)); overflow: auto;
  }
  .nav.menu-open .nav__links { transform: none; visibility: visible; transition: transform .4s var(--ease); }
  .nav.menu-open { background: rgba(12, 8, 34, .98); }
  .nav__links > a, .dropdown__toggle { width: 100%; padding: .8rem 1rem; }
  .nav__links .dropdown__menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; border: 0; display: none; padding-left: 1rem; max-height: none; }
  .nav__links .dropdown.is-open .dropdown__menu { display: block; }
  .search { display: none; }
  .search.search--menu { display: flex; margin: 0 0 .6rem; }
  .search--menu input, .search--menu input:focus { width: 100%; }
  .nav__actions { margin-left: auto; }
  .hero { height: 86vh; min-height: 520px; }
  .hero__slide { align-items: flex-end; padding-bottom: 96px; }
  .hero__poster { display: none; }
  .hero__shade { background: linear-gradient(0deg, var(--bg) 4%, rgba(7, 5, 26, .82) 45%, rgba(7, 5, 26, .3) 100%); }
  .hero__arrow { display: none; }
  .hero__dots { left: 50%; transform: translateX(-50%); bottom: 40px; }
  .detail { min-height: auto; }
  .detail__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .poster3d { width: min(56vw, 260px); }
  .detail__meta, .detail__actions, .crumbs, .chips { justify-content: center; }
  .detail__desc { margin-inline: auto; }
  .resume-box { margin-inline: auto; }
  .facts { text-align: left; }
  .plans { grid-template-columns: 1fr; }
  .cat-create, .cat-item__form { grid-template-columns: 1fr 1fr; }
  .track-row { grid-template-columns: 70px 1fr 36px; }
  .track-row input[type="url"] { grid-column: 1 / 3; }
}
@media (max-width: 600px) {
  :root { --card-w: 38vw; }
  .hide-sm { display: none !important; }
  .brand__text { display: none; }
  .volume { display: none; }
  .hero__title { font-size: 2.1rem; }
  .hero__desc { -webkit-line-clamp: 3; }
  .hero__actions .btn { flex: 1; padding: .8em 1em; }
  .form-grid, .form-grid--4, .cat-create, .cat-item__form { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: .8rem; gap: .6rem; }
  .stat > i { width: 38px; height: 38px; }
  .auth__card { padding: 1.6rem 1.2rem; }
  .row__arrow { display: none; }
  .card3d__info { transform: none; }
  .card3d__info p { display: none; }
  .cbtn { width: 38px; height: 38px; font-size: 1rem; }
  #playBtn { width: 44px; height: 44px; }
  .volume input { display: none; }
  .time { font-size: .8rem; }
  .player__bigplay { width: 76px; height: 76px; font-size: 1.7rem; }
}
@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .cbtn { width: 34px; height: 34px; font-size: .92rem; }
  .cbar__group { gap: .15rem; }
}
@media (hover: none) {
  .card3d__info { transform: none; }
  .card3d__play { transform: scale(.85); }
  .row__arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
