/* ============================================================
   ANIRA — Design System
   Dark · Glass · Aurora · Premium
   ============================================================ */

:root {
  --bg: #050508;
  --bg-elev: rgba(255, 255, 255, 0.035);
  --bg-elev-2: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f7;
  --text-dim: #9a9aae;
  --text-faint: #5d5d70;
  --violet: #8b5cf6;
  --blue: #4f7cff;
  --cyan: #38bdf8;
  --pink: #ec4899;
  --grad: linear-gradient(120deg, #8b5cf6, #4f7cff 45%, #ec4899);
  --grad-soft: linear-gradient(120deg, rgba(139,92,246,.25), rgba(79,124,255,.18) 45%, rgba(236,72,153,.22));
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-card: 0 8px 32px rgba(0,0,0,.45);
  --shadow-pop: 0 24px 64px rgba(0,0,0,.6);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior-y: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(139,92,246,.4); }

html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb { display: none; background: transparent; }

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

/* ---------- Aurora background ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(139,92,246,.18), transparent 62%),
    radial-gradient(ellipse 55% 42% at 106% 38%, rgba(56,189,248,.09), transparent 65%),
    radial-gradient(ellipse 65% 45% at -10% 85%, rgba(236,72,153,.10), transparent 65%),
    var(--bg);
}
.aurora {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .22;
  animation: drift 26s var(--ease) infinite alternate;
}
.a1 { width: 58vw; height: 58vw; background: #7c3aed; top: -22vw; left: -14vw; }
.a2 { width: 48vw; height: 48vw; background: #2563eb; top: 26vh; right: -20vw; animation-delay: -8s; }
.a3 { width: 44vw; height: 44vw; background: #db2777; bottom: -20vw; left: 20vw; animation-delay: -16s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vw, -4vh) scale(1.15); }
}
/* star dust */
.bg-aurora::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.3px 1.3px at 11% 19%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1px 1px at 31% 7%, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(1.6px 1.6px at 52% 27%, rgba(196,181,253,.5), transparent 100%),
    radial-gradient(1px 1px at 69% 11%, rgba(255,255,255,.35), transparent 100%),
    radial-gradient(1.3px 1.3px at 87% 31%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 22% 46%, rgba(165,243,252,.4), transparent 100%),
    radial-gradient(1.5px 1.5px at 44% 59%, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(1px 1px at 63% 43%, rgba(255,255,255,.32), transparent 100%),
    radial-gradient(1.2px 1.2px at 81% 61%, rgba(249,168,212,.42), transparent 100%),
    radial-gradient(1px 1px at 8% 71%, rgba(255,255,255,.36), transparent 100%),
    radial-gradient(1.5px 1.5px at 36% 83%, rgba(255,255,255,.42), transparent 100%),
    radial-gradient(1px 1px at 57% 74%, rgba(196,181,253,.36), transparent 100%),
    radial-gradient(1.2px 1.2px at 76% 88%, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(1px 1px at 93% 79%, rgba(255,255,255,.3), transparent 100%),
    radial-gradient(1px 1px at 47% 5%, rgba(255,255,255,.3), transparent 100%),
    radial-gradient(1.4px 1.4px at 17% 93%, rgba(165,243,252,.38), transparent 100%);
  background-size: 900px 900px;
  background-repeat: repeat;
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
/* film grain + vignette */
.bg-aurora::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(130% 95% at 50% 18%, transparent 52%, rgba(0, 0, 0, .42) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  background-size: cover, 180px 180px;
}
@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Glass ---------- */
.glass {
  background: rgba(14, 14, 22, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--stroke);
}
.glass-strong {
  background: rgba(16, 16, 26, 0.82);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--stroke-strong);
}

/* ---------- Icons ---------- */
.ico { width: 1.05em; height: 1.05em; flex-shrink: 0; vertical-align: -0.14em; display: inline-block; }
.section-title .ico { margin-right: 9px; opacity: .9; }
.btn .ico, .act-btn .ico, .chip .ico { width: 1.1em; height: 1.1em; }
.bento-item .ico { width: 27px; height: 27px; margin-bottom: auto; padding-bottom: 10px; box-sizing: content-box; opacity: .95; }
.e-icon { display: flex; justify-content: center; margin-bottom: 14px; color: var(--text-faint); }
.e-icon .ico { width: 44px; height: 44px; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(1200px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px; border-radius: 20px; z-index: 50;
  box-shadow: var(--shadow-card);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad);
  font-family: var(--font-display); font-weight: 900; font-size: 17px; color: #fff;
  box-shadow: 0 4px 18px rgba(139,92,246,.45);
}
.logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 3px;
  background: linear-gradient(90deg, #fff, #c9c9ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a {
  padding: 8px 15px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text-dim);
  transition: color .25s, background .25s;
}
.nav-desktop a:hover { color: var(--text); background: var(--bg-elev-2); }
.nav-desktop a.active { color: var(--text); background: var(--bg-elev-2); }
.nav-premium { background: var(--grad-soft); color: var(--text) !important; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  color: var(--text-dim); transition: all .25s var(--ease);
  border: 1px solid transparent;
}
.icon-btn:hover { color: var(--text); background: var(--bg-elev-2); border-color: var(--stroke); }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--stroke-strong); background-size: cover; background-position: center;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.avatar-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(139,92,246,.3); }

/* ---------- Tabbar (mobile) ---------- */
.tabbar {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: min(480px, calc(100% - 24px));
  display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px; z-index: 50; box-shadow: var(--shadow-pop);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 14px; color: var(--text-faint);
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  transition: color .25s, transform .3s var(--ease);
}
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { filter: drop-shadow(0 0 8px rgba(139,92,246,.8)); color: var(--violet); }
.tabbar a:active { transform: scale(.92); }
.tab-ai svg { color: var(--pink); }

/* ---------- Layout ---------- */
.app {
  max-width: 1200px; margin: 0 auto;
  padding: 86px 16px 110px;
}
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .tabbar { display: none; }
  .app { padding-bottom: 60px; }
}

.section { margin-top: 44px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(17px, 2.4vw, 22px); font-weight: 700;
}
.section-title .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-link { font-size: 13px; font-weight: 700; color: var(--violet); white-space: nowrap; transition: opacity .2s; }
.section-link:hover { opacity: .75; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 420px;
  display: flex; align-items: flex-end; border: 1px solid var(--stroke);
  box-shadow: var(--shadow-pop);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transform: scale(1.04); transition: opacity 1s ease, transform 8s linear; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,5,8,.15) 0%, rgba(5,5,8,.55) 55%, rgba(5,5,8,.94) 100%),
              linear-gradient(90deg, rgba(5,5,8,.55), transparent 60%);
}
.hero-content { position: relative; z-index: 2; padding: clamp(20px, 4vw, 44px); width: 100%; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  background: rgba(139,92,246,.18); border: 1px solid rgba(139,92,246,.4); color: #c4b5fd;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(26px, 5vw, 52px); font-weight: 900; line-height: 1.08;
  margin: 14px 0 10px; text-shadow: 0 4px 40px rgba(0,0,0,.6); max-width: 16ch;
}
.hero-desc { max-width: 56ch; color: var(--text-dim); font-size: 15px; line-height: 1.65; margin-bottom: 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.07); border: 1px solid var(--stroke); color: var(--text-dim);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: all .25s var(--ease); cursor: default;
}
a.chip, button.chip { cursor: pointer; }
a.chip:hover, button.chip:hover { background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.5); color: var(--text); transform: translateY(-2px); }
.chip-score { color: #fbbf24; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.1); }

.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 16px;
  font-size: 14.5px; font-weight: 800; letter-spacing: .2px;
  transition: transform .3s var(--ease), box-shadow .3s, filter .3s;
  will-change: transform;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px rgba(139,92,246,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(139,92,246,.55); filter: brightness(1.08); }
.btn-glass { background: rgba(255,255,255,.08); border: 1px solid var(--stroke-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-dots { position: absolute; bottom: 18px; right: 22px; z-index: 3; display: flex; gap: 7px; }
.hero-dot { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); transition: all .4s var(--ease); }
.hero-dot.on { width: 26px; background: var(--grad); }

/* ---------- Search bar (home) ---------- */
.home-search {
  margin: 18px 0 0; display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 20px; cursor: text;
  color: var(--text-faint); font-size: 15px;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.home-search:hover { border-color: rgba(139,92,246,.45); box-shadow: 0 0 0 4px rgba(139,92,246,.08); transform: translateY(-1px); }
.home-search kbd {
  margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 700; color: var(--text-faint);
  padding: 4px 8px; border-radius: 7px; border: 1px solid var(--stroke); background: var(--bg-elev);
}

/* ---------- Card rows ---------- */
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px, 15vw, 178px);
  gap: 14px; overflow-x: auto; padding: 14px 6px 16px; margin: -10px -2px -2px; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.row-scroll > * { scroll-snap-align: start; }

.grid-cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
}
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

.card {
  position: relative; border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--stroke);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
  will-change: transform;
}
.card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.35); border-color: rgba(139,92,246,.4); }
.card-cover { aspect-ratio: 2/2.9; width: 100%; object-fit: cover; background: var(--bg-elev-2); }
.card-body { padding: 10px 12px 13px; }
.card-title { font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-sub { margin-top: 5px; font-size: 11.5px; color: var(--text-faint); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card-score {
  position: absolute; top: 8px; right: 8px; padding: 4px 9px; border-radius: 9px;
  font-size: 11.5px; font-weight: 800; color: #fbbf24;
  background: rgba(5,5,8,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(251,191,36,.3);
}
.card-rank {
  position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 9px; font-size: 12.5px; font-weight: 900; font-family: var(--font-display);
  background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(139,92,246,.5);
}

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--bg-elev); border-radius: var(--r-md); border: 1px solid var(--stroke); }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.06) 50%, transparent 70%);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-card { aspect-ratio: 2/3.35; }

/* ---------- Horizontal scroller arrows ---------- */
.hscroll-wrap { position: relative; }
.hs-arrow {
  position: absolute; top: 50%; margin-top: -26px; z-index: 5;
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(22, 22, 34, .95); border: 1px solid var(--stroke-strong); color: #e6e6f2;
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
  transition: opacity .25s, transform .3s var(--ease), background .25s, border-color .25s, box-shadow .3s;
}
.hs-arrow:hover {
  background: rgba(72, 52, 140, .95); border-color: rgba(139,92,246,.65); color: #fff;
  transform: scale(1.07); box-shadow: 0 10px 30px rgba(139,92,246,.35);
}
.hs-arrow:active { transform: scale(.94); }
.hs-arrow.left { left: -10px; }
.hs-arrow.right { right: -10px; }
.hs-arrow.off { opacity: 0; pointer-events: none; }
.hs-arrow .ico { width: 20px; height: 20px; display: block; margin: auto; vertical-align: 0; }
.hs-arrow.left .ico { transform: translateX(-1px); }
.hs-arrow.right .ico { transform: translateX(1px); }
@media (hover: none) { .hs-arrow { display: none; } }

/* ---------- Bento ---------- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(4, 1fr); } }
.bento-item {
  position: relative; border-radius: var(--r-lg); padding: 22px 18px; overflow: hidden; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--stroke); min-height: 118px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px;
  text-align: center;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.bento-item:hover { transform: translateY(-4px); border-color: var(--stroke-strong); box-shadow: var(--shadow-card); }
.bento-item .emoji { font-size: 26px; margin-bottom: auto; }
.bento-item .b-title { font-weight: 800; font-size: 15px; }
.bento-item .b-sub { font-size: 12px; color: var(--text-dim); }
.bento-item::before {
  content: ''; position: absolute; inset: 0; opacity: .16; transition: opacity .4s;
  background: var(--bi-grad, var(--grad));
}
.bento-item:hover::before { opacity: .3; }
.bento-item > * { position: relative; }

/* ---------- Genres ---------- */
.genre-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Detail page ---------- */
.detail-hero { position: relative; margin: -86px -16px 0; min-height: 420px; }
@media (min-width: 1232px) { .detail-hero { border-radius: 0 0 32px 32px; overflow: hidden; } }
.detail-banner { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,8,.3), rgba(5,5,8,.85) 70%, var(--bg)); }
.detail-head {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto;
  padding: 264px 16px 26px; display: flex; gap: 24px; align-items: flex-end;
}
.detail-poster {
  width: clamp(120px, 22vw, 200px); border-radius: 20px; box-shadow: var(--shadow-pop);
  border: 1px solid var(--stroke-strong); flex-shrink: 0; aspect-ratio: 2/2.9; object-fit: cover;
}
.detail-titles { padding-bottom: 8px; min-width: 0; }
.dt-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #c9bcf5;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
}
.dt-kicker .dot { width: 3.5px; height: 3.5px; border-radius: 99px; background: currentColor; opacity: .55; }
.dt-kicker .st-air { color: #86efac; }
.detail-title { font-family: var(--font-display); font-size: clamp(20px, 4vw, 40px); font-weight: 900; line-height: 1.1; text-shadow: 0 4px 30px rgba(0,0,0,.55); }
.detail-native { color: var(--text-dim); font-size: 14px; margin-top: 7px; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.dt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 15px; }
.score-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 11px;
  background: linear-gradient(120deg, rgba(251,191,36,.2), rgba(251,146,60,.12));
  border: 1px solid rgba(251,191,36,.45); color: #fcd34d; font-weight: 900; font-size: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dt-stat {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #dcdce8;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.dt-stat .ico { width: 14px; height: 14px; opacity: .65; }
.dt-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.detail-body { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 900px) { .detail-body { grid-template-columns: minmax(0, 1fr) 320px; } }
.detail-body > * { min-width: 0; }
.detail-desc { color: #c8c8d8; line-height: 1.75; font-size: 15px; overflow-wrap: break-word; }
.detail-desc.clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.link-more { color: var(--violet); font-weight: 700; font-size: 13.5px; margin-top: 8px; display: inline-block; }

.info-panel { border-radius: var(--r-lg); padding: 20px; align-self: start; }
.ip-head { font-weight: 800; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.ip-rate {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 10px;
  background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.28);
}
.ip-rate .k { font-size: 13px; font-weight: 700; color: #d5c8ff; }
.ip-rate .star { font-size: 18px; }
.ip-next {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 14px; margin-bottom: 10px;
  background: rgba(134,239,172,.08); border: 1px solid rgba(134,239,172,.22);
  font-size: 12.5px; font-weight: 800; color: #86efac;
}
.ip-next .ico { width: 15px; height: 15px; }
.ip-list { display: grid; }
.info-row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.05); }
.info-row:last-child { border-bottom: none; }
.info-row .ri {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--bg-elev-2); border: 1px solid var(--stroke); color: var(--text-dim);
}
.info-row .ri .ico { width: 14px; height: 14px; }
.info-row .k { color: var(--text-faint); font-weight: 600; }
.info-row .v { font-weight: 700; margin-left: auto; text-align: right; min-width: 0; overflow-wrap: break-word; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.char-card {
  display: flex; gap: 0; border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--stroke); transition: transform .35s var(--ease), border-color .3s;
}
.char-card:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }
.char-card img { width: 52px; height: 72px; object-fit: cover; flex-shrink: 0; }
.char-card .cc-mid { flex: 1; padding: 9px 11px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.char-card .cc-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-card .cc-role { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.char-card .cc-va { text-align: right; }

.trailer-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--stroke); box-shadow: var(--shadow-card); }
.trailer-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.action-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.act-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 14px;
  font-size: 13.5px; font-weight: 800; border: 1px solid var(--stroke-strong);
  background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: all .3s var(--ease);
}
.act-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); }
.act-btn.on { background: var(--grad-soft); border-color: rgba(139,92,246,.55); color: #e9d5ff; box-shadow: 0 0 24px rgba(139,92,246,.25); }

.shot-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 78vw); gap: 12px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.shot-row::-webkit-scrollbar { width: 0; height: 0; display: none; }
.shot-row img { border-radius: var(--r-md); border: 1px solid var(--stroke); aspect-ratio: 16/9; object-fit: cover; width: 100%; }

.ext-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* rating stars */
.stars { display: flex; gap: 4px; }
.star { font-size: 22px; color: var(--text-faint); cursor: pointer; transition: transform .2s var(--ease), color .2s; }
.star:hover { transform: scale(1.25); }
.star.on { color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,.6); }

/* ---------- Discover ---------- */
.filters {
  display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr);
  padding: 18px; border-radius: var(--r-lg); margin-bottom: 22px;
}
@media (min-width: 760px) { .filters { grid-template-columns: repeat(4, 1fr); } }
.filter-group { display: grid; gap: 6px; }
.filter-group label { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); }
.select {
  appearance: none; width: 100%; padding: 11px 36px 11px 13px; border-radius: 13px;
  background: var(--bg-elev-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aae' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--stroke); color: var(--text); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: border-color .25s;
}
.select:hover, .select:focus { border-color: rgba(139,92,246,.5); outline: none; }
.select option { background: #14141f; }
.load-more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Calendar ---------- */
.cal-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; margin-bottom: 16px; }
.cal-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }
.cal-tab {
  padding: 10px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 800; white-space: nowrap;
  background: var(--bg-elev); border: 1px solid var(--stroke); color: var(--text-dim);
  transition: all .3s var(--ease);
}
.cal-tab.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.ep-list { display: grid; gap: 12px; }
.ep-item {
  display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-md);
  background: var(--bg-elev); border: 1px solid var(--stroke); cursor: pointer;
  transition: transform .35s var(--ease), border-color .3s, background .3s;
}
.ep-item:hover { transform: translateX(4px); border-color: rgba(139,92,246,.4); background: var(--bg-elev-2); }
.ep-item img { width: 52px; height: 70px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; font-weight: 600; }
.ep-count {
  font-size: 12px; font-weight: 800; color: #86efac; white-space: nowrap;
  padding: 7px 12px; border-radius: 10px; background: rgba(134,239,172,.08); border: 1px solid rgba(134,239,172,.22);
  font-variant-numeric: tabular-nums;
}
.ep-count.soon { color: #fbbf24; background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 16px rgba(251,191,36,.35); } }

/* ---------- AI page ---------- */
.ai-hero { text-align: center; padding: 30px 0 6px; }
.ai-orb {
  position: relative; width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e4dcff, #a78bfa 34%, #8b5cf6 55%, #4338ca 85%);
  box-shadow:
    0 0 44px rgba(139, 92, 246, .5),
    0 0 110px rgba(236, 72, 153, .22),
    inset 0 0 26px rgba(255, 255, 255, .32),
    inset -8px -10px 30px rgba(30, 20, 90, .55);
}
.ai-orb::after {
  content: ''; position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,.28), rgba(79,124,255,.14) 45%, transparent 70%);
}
/* pause heavy background motion while the glass search overlay is open */
body.overlay-open .aurora,
body.overlay-open .bg-aurora::before { animation-play-state: paused; }
.ai-title { font-family: var(--font-display); font-size: clamp(22px, 4vw, 36px); font-weight: 900; }
.ai-sub { color: var(--text-dim); margin-top: 10px; font-size: 15px; }
.ai-input-wrap { margin: 26px auto 0; max-width: 640px; border-radius: 22px; padding: 8px 8px 8px 20px; display: flex; gap: 10px; align-items: center;
  transition: box-shadow .3s, border-color .3s; }
.ai-input-wrap:focus-within { border-color: rgba(139,92,246,.55); box-shadow: 0 0 0 4px rgba(139,92,246,.12), 0 12px 40px rgba(139,92,246,.15); }
.ai-input-wrap input { flex: 1; background: none; border: none; outline: none; font-size: 15px; padding: 12px 0; min-width: 0; }
.ai-input-wrap input::placeholder { color: var(--text-faint); }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 18px auto 0; max-width: 700px; }
.ai-answer {
  max-width: 760px; margin: 28px auto 0; padding: 20px 22px; border-radius: var(--r-lg);
  font-size: 14.5px; line-height: 1.7; color: #d6d6e4;
}
.ai-answer b { color: var(--text); }
.ai-meta { margin-top: 10px; font-size: 11.5px; color: var(--text-faint); font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.14); border-top-color: #a78bfa;
  animation: spin .9s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-answer.loading { background: #14141f; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--stroke); }

/* ---------- Profile ---------- */
.profile-head {
  border-radius: 28px; padding: 28px 22px; text-align: center; position: relative; overflow: hidden;
}
.profile-head::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: .55; }
.profile-head > * { position: relative; }
.profile-ava {
  width: 96px; height: 96px; border-radius: 30px; margin: 0 auto 14px; background-size: cover;
  border: 2px solid var(--stroke-strong); box-shadow: 0 12px 34px rgba(139,92,246,.35);
  cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s;
}
.profile-ava:hover { transform: scale(1.05); box-shadow: 0 14px 40px rgba(139,92,246,.5); }
.ava-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 12px; font-weight: 600; }
.profile-name { font-family: var(--font-display); font-size: 22px; font-weight: 900; }
.profile-level { margin-top: 8px; font-size: 13px; color: #c4b5fd; font-weight: 700; }
.xp-bar { max-width: 260px; height: 8px; margin: 12px auto 0; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.xp-fill { height: 100%; border-radius: 99px; background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.7); transition: width 1.2s var(--ease); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { border-radius: var(--r-lg); padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stat-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(139,92,246,.13); border: 1px solid rgba(139,92,246,.3); color: #cabffd; }
.stat-ico .ico { width: 18px; height: 18px; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-dim); font-weight: 700; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ach {
  border-radius: var(--r-md); padding: 18px 14px 14px; text-align: center;
  background: var(--bg-elev); border: 1px solid var(--stroke);
  transition: transform .3s var(--ease), border-color .3s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ach:hover { transform: translateY(-3px); }
.ach .a-ico {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.38); color: #c4b5fd;
}
.ach .a-ico .ico { width: 22px; height: 22px; }
.ach.done { border-color: rgba(139,92,246,.38); box-shadow: 0 0 22px rgba(139,92,246,.14); }
.ach.locked { opacity: .62; }
.ach.locked .a-ico { background: var(--bg-elev-2); border-color: var(--stroke); color: var(--text-faint); }
.ach .a-name { font-size: 12.5px; font-weight: 800; }
.ach .a-desc { font-size: 11px; color: var(--text-faint); line-height: 1.45; }
.a-prog { width: 100%; height: 4px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 2px; }
.a-prog i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.a-count { font-size: 10.5px; font-weight: 800; color: var(--text-faint); letter-spacing: .4px; }

.seg-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.seg-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; }
.seg-btn .ico { width: 15px; height: 15px; }

.empty-state { text-align: center; color: var(--text-faint); padding: 44px 20px; font-size: 14px; line-height: 1.7; }
.empty-state .e-icon { font-size: 40px; margin-bottom: 12px; }

/* ---------- Premium ---------- */
.price-grid { display: grid; gap: 16px; margin-top: 26px; }
@media (min-width: 820px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card { border-radius: 26px; padding: 28px 24px; position: relative; display: flex; flex-direction: column; gap: 0;
  transition: transform .4s var(--ease), box-shadow .4s; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); }
.price-card.featured { border-color: rgba(139,92,246,.55); box-shadow: 0 0 44px rgba(139,92,246,.22); }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 5px 16px; border-radius: 999px;
  background: var(--grad); font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 6px 18px rgba(139,92,246,.5); }
.price-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.price-value { font-family: var(--font-display); font-size: 36px; font-weight: 900; margin: 14px 0 2px; }
.price-value small { font-size: 13px; color: var(--text-dim); font-family: var(--font-body); font-weight: 600; }
.price-feats { margin: 18px 0 24px; display: grid; gap: 10px; }
.price-feats div { display: flex; gap: 10px; font-size: 13.5px; color: #c8c8d8; align-items: flex-start; }
.price-feats .ok { color: #86efac; flex-shrink: 0; }

/* ---------- Watch page (cinema) ---------- */
.watch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.watch-src { font-size: 12.5px; font-weight: 800; color: var(--text-faint); letter-spacing: .4px; }
.watch-layout { display: grid; gap: 18px; }
@media (min-width: 1000px) { .watch-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.watch-layout > * { min-width: 0; }
.player-shell {
  position: relative; background: #000; border-radius: 20px; overflow: hidden;
  aspect-ratio: 16/9; border: 1px solid var(--stroke); box-shadow: var(--shadow-pop);
}
.player-shell video { width: 100%; height: 100%; display: block; background: #000; }
.pc-center {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%;
  background: rgba(10,10,16,.72); border: 1px solid rgba(255,255,255,.22); color: #fff;
  display: grid; place-items: center; transition: opacity .25s, transform .25s var(--ease); z-index: 3;
}
.pc-center .ico { width: 30px; height: 30px; margin-left: 3px; }
.pc-center:hover { transform: scale(1.07); }
.player-shell.playing .pc-center { opacity: 0; pointer-events: none; }
.pc-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px;
  background: linear-gradient(transparent, rgba(5,5,8,.9));
  opacity: 0; transition: opacity .25s;
}
.player-shell:hover .pc-bar, .player-shell.paused .pc-bar, .player-shell:focus-within .pc-bar { opacity: 1; }
@media (hover: none) { .pc-bar { opacity: 1; } }
.pc-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: rgba(255,255,255,.09); flex-shrink: 0; transition: background .2s; }
.pc-btn:hover { background: rgba(255,255,255,.18); }
.pc-time { font-size: 12px; font-weight: 700; color: #cfcfda; font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }
.pc-seek { flex: 1; appearance: none; -webkit-appearance: none; height: 5px; border-radius: 99px; background: rgba(255,255,255,.18); outline: none; cursor: pointer; min-width: 60px; }
.pc-seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(139,92,246,.9); }
.pc-seek::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: #fff; }
.pc-q { display: flex; gap: 6px; }
.pc-qbtn { font-size: 11.5px; font-weight: 800; padding: 6px 9px; border-radius: 8px; color: #cfcfda; background: rgba(255,255,255,.09); }
.pc-qbtn.on { background: var(--grad); color: #fff; }
.pc-qbtn.locked { color: #8a8a9a; display: inline-flex; align-items: center; gap: 4px; }
.pc-qbtn.locked .ico { width: 11px; height: 11px; opacity: .8; }
.pc-qbtn.locked:hover { color: #fcd34d; }
.skip-op {
  position: absolute; right: 14px; bottom: 66px; z-index: 4; padding: 11px 18px; border-radius: 12px;
  background: rgba(10,10,16,.85); border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-weight: 800; font-size: 13px; transition: background .2s, transform .2s var(--ease);
}
.skip-op:hover { background: rgba(34,34,50,.95); transform: translateY(-1px); }
.watch-title { margin-top: 14px; }
.ep-rail { border-radius: 20px; padding: 14px; align-self: start; display: flex; flex-direction: column; max-height: 76vh; }
.ep-rail-head { font-weight: 800; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-faint); margin: 2px 4px 10px; }
.ep-rail-list { overflow-y: auto; display: grid; gap: 8px; }
.epi {
  display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--stroke); transition: background .2s, border-color .2s;
}
.epi:hover { background: var(--bg-elev-2); }
.epi.on { border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.13); }
.epi-thumb { width: 84px; aspect-ratio: 16/9; border-radius: 8px; background-color: #101018; background-size: cover; background-position: center; flex-shrink: 0; }
.epi-info { min-width: 0; display: grid; gap: 2px; }
.epi-info b { font-size: 13px; }
.epi-info small { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-cta { padding: 11px 20px; border-radius: 14px; font-size: 13.5px; }
.watch-cta .watch-sub { font-size: 11px; opacity: .8; font-weight: 700; }
@media (max-width: 560px) { .action-bar .watch-cta { width: 100%; justify-content: center; } }
body.watching .aurora, body.watching .bg-aurora::before { animation-play-state: paused; }

/* ---------- Search overlay ---------- */
.search-overlay[hidden], .toast[hidden] { display: none !important; }
.search-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(3,3,6,.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 20px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.search-panel {
  width: min(640px, 100%); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-pop);
  animation: popIn .35s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-16px) scale(.98); } }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--stroke); color: var(--text-dim); }
.search-input-row input { flex: 1; background: none; border: none; outline: none; font-size: 16px; color: var(--text); min-width: 0; }
.search-results { max-height: 56vh; overflow-y: auto; }
.sr-item { display: flex; gap: 13px; padding: 11px 16px; cursor: pointer; align-items: center; transition: background .2s; }
.sr-item:hover, .sr-item.sel { background: rgba(139,92,246,.12); }
.sr-item img { width: 42px; height: 58px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sr-title { font-size: 14px; font-weight: 700; }
.sr-sub { font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.sr-label { padding: 12px 16px 6px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-faint); }
.sr-history { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 16px; }

/* ---------- Auth ---------- */
.auth-overlay {
  position: fixed; inset: 0; z-index: 110; background: rgba(3,3,6,.65);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .25s ease;
}
.auth-overlay[hidden] { display: none !important; }
.auth-panel {
  position: relative; width: min(400px, 100%); border-radius: 26px; padding: 30px 26px 24px;
  display: flex; flex-direction: column; gap: 11px; text-align: center;
  box-shadow: var(--shadow-pop); animation: popIn .35s var(--ease);
}
.auth-close { position: absolute; top: 12px; right: 12px; }
.auth-logo {
  width: 52px; height: 52px; margin: 0 auto 2px; display: grid; place-items: center;
  border-radius: 16px; background: var(--grad); color: #fff;
  font-family: var(--font-display); font-weight: 900; font-size: 24px;
  box-shadow: 0 8px 26px rgba(139,92,246,.5);
}
.auth-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.auth-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; line-height: 1.5; }
.auth-google { justify-content: center; gap: 10px; }
.auth-div { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; margin: 2px 0; }
.auth-div::before, .auth-div::after { content: ''; flex: 1; height: 1px; background: var(--stroke); }
.auth-input {
  width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 14.5px;
  background: var(--bg-elev-2); border: 1px solid var(--stroke); color: var(--text); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.auth-input::placeholder { color: var(--text-faint); }
.auth-input:focus { border-color: rgba(139,92,246,.55); box-shadow: 0 0 0 4px rgba(139,92,246,.1); }
.auth-err {
  padding: 10px 13px; border-radius: 12px; font-size: 12.5px; font-weight: 700; text-align: left;
  background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.35); color: #fda4af;
}
.auth-submit { justify-content: center; }
.auth-switch { font-size: 13px; color: var(--text-dim); padding: 6px; transition: color .2s; }
.auth-switch:hover { color: var(--text); }
.auth-switch b { color: var(--violet); }
.auth-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 16px;
}
.auth-cta .ac-text { display: grid; gap: 3px; text-align: left; min-width: 0; }
.auth-cta .ac-text b { font-size: 14.5px; }
.auth-cta .ac-text span { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.premium-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 10.5px; font-weight: 900; letter-spacing: 1.8px; text-transform: uppercase; color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 20px rgba(139,92,246,.4);
  margin: 10px auto 0;
}
.premium-pill .ico { width: 13px; height: 13px; }
/* premium status card: brand gradient border */
.prem-wrap {
  border-radius: 24px; padding: 1.5px; margin-bottom: 16px;
  background: var(--grad);
  box-shadow: 0 12px 44px rgba(139,92,246,.22);
}
.prem-inner {
  border-radius: 22.5px; background: rgba(13,13,21,.95);
  padding: 15px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.prem-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(139,92,246,.45);
}
.prem-ico .ico { width: 20px; height: 20px; }
.prem-grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.prem-wrap.big { max-width: 600px; margin: 30px auto 30px; }
.prem-inner.column { flex-direction: column; text-align: center; padding: 30px 24px 26px; gap: 10px; }
.prem-ico.big { width: 62px; height: 62px; border-radius: 20px; }
.prem-ico.big .ico { width: 27px; height: 27px; }
.prem-title { font-family: var(--font-display); font-weight: 900; font-size: 21px; }
.prem-sub { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; max-width: 42ch; }
.prem-usage { width: min(300px, 100%); height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.prem-usage i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.prem-usage-label { font-size: 11px; color: var(--text-faint); font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }

/* ---------- Auth gate ---------- */
.gate {
  max-width: 620px; margin: 6vh auto 0; border-radius: 30px; padding: clamp(28px, 5vw, 48px);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}
.gate::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: .35; pointer-events: none; }
.gate > * { position: relative; }
.gate-orb {
  width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 14px 40px rgba(139,92,246,.45);
}
.gate-orb .ico { width: 32px; height: 32px; }
.gate-title { font-family: var(--font-display); font-size: clamp(20px, 3.4vw, 30px); font-weight: 900; }
.gate-sub { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; max-width: 46ch; }
.gate-feats { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 6px 0 4px; width: 100%; max-width: 430px; }
.gate-feats div {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 11px 15px; border-radius: 13px; font-size: 13.5px; font-weight: 600; color: #d6d6e4;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke);
}
.gate-feats .ico { width: 17px; height: 17px; color: #c4b5fd; flex-shrink: 0; }
.gate-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  padding: 13px 22px; border-radius: 16px; font-size: 13.5px; font-weight: 700; z-index: 120;
  box-shadow: var(--shadow-pop); animation: toastIn .4s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
@media (min-width: 900px) { .toast { bottom: 28px; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- Page transitions ---------- */
.page { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Misc ---------- */
.page-title { font-family: var(--font-display); font-size: clamp(22px, 4vw, 34px); font-weight: 900; margin-bottom: 6px; }
.page-sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 24px; }
.divider { height: 1px; background: var(--stroke); margin: 26px 0; }
.center { text-align: center; }
