:root {
  --bg: #0b0d12; --surface: #141822; --surface2: #1c2230; --line: rgba(255,255,255,.07);
  --text: #eef0f5; --muted: #8b93a7; --accent: #86e04a; --accent2: #35cfa0; --gold: #f5c542;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
  --nav-h: 66px; --pad: clamp(16px, 3.6vw, 56px); --r: 12px; --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, .logo { font-family: Sora, Inter, sans-serif; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main { outline: none; min-height: 80vh; padding-bottom: 48px; animation: in .4s var(--ease); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
::selection { background: var(--accent); color: #0b0d12; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); background: linear-gradient(rgba(11,13,18,.85), transparent); transition: background .3s; }
.nav.solid { background: rgba(11,13,18,.92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; flex: none; }
.logo b { color: var(--accent); font-weight: 800; }
.logo-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 11px; top: 8px; border: 6px solid transparent; border-left: 10px solid #0b0d12; border-right: 0; }
.links { display: flex; gap: 2px; flex: none; }
.links a { white-space: nowrap; padding: 8px 12px; border-radius: 8px; color: #c4c9d6; font-weight: 500; font-size: 14.5px; transition: .2s; }
.links a:hover { color: var(--accent); }
.links a.active { color: var(--accent); background: rgba(134,224,74,.1); }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; height: 40px; flex: 0 1 380px; min-width: 150px; transition: .25s; color: var(--muted); }
.search:focus-within { border-color: var(--accent); background: var(--surface); color: var(--text); box-shadow: 0 0 0 4px rgba(134,224,74,.12); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::-webkit-search-cancel-button { display: none; }
.nav-list { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid var(--line); transition: .2s; flex: none; }
.nav-list:hover { background: var(--accent); color: #0b0d12; }
.nav-list svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* ---------- Buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px; border-radius: 999px; font-weight: 600; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0b0d12; box-shadow: 0 8px 26px -8px rgba(134,224,74,.7); }
.btn-primary:hover { box-shadow: 0 12px 32px -6px rgba(134,224,74,.85); }
.btn-ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.imdb { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: #0b0d12; background: var(--gold); padding: 2px 8px; border-radius: 6px; line-height: 1.5; }
.chip { padding: 3px 12px; font-size: 12.5px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #dfe3ec; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: #b4bacb; font-size: 14px; }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; height: min(82vh, 720px); min-height: 500px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s, visibility .8s; display: flex; align-items: flex-end; }
.hero-slide.on { opacity: 1; visibility: visible; z-index: 1; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; transform: scale(1.03); transition: transform 9s linear; }
.hero-slide.on .hero-bg { transform: scale(1.1); }
.hero-slide::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--bg) 2%, rgba(11,13,18,.82) 30%, rgba(11,13,18,.15) 70%), linear-gradient(0deg, var(--bg) 0%, transparent 38%), linear-gradient(180deg, rgba(11,13,18,.7), transparent 22%); }
.hero-info { position: relative; z-index: 2; padding: 0 var(--pad) 84px; max-width: 760px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 62px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.hero p { margin: 4px 0 24px; color: #d3d8e4; max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-nav { position: absolute; z-index: 3; right: var(--pad); bottom: 34px; display: flex; align-items: center; gap: 14px; }
.hero-nav button.arrow { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); font-size: 20px; transition: .2s; }
.hero-nav button.arrow:hover { background: var(--accent); color: #0b0d12; }
.dots { display: flex; gap: 7px; }
.dots button { width: 8px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.28); transition: .3s; }
.dots button.on { background: var(--accent); width: 26px; }

/* ---------- Layout ---------- */
.container { padding: 0 var(--pad); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 8px; }
@media (min-width: 1150px) { .home-grid { grid-template-columns: minmax(0, 1fr) 320px; } .side { position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; } }
.sec { padding-top: 34px; }
.sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; position: relative; padding-left: 14px; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--grad); }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.tabs button { padding: 5px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--accent); color: #0b0d12; font-weight: 600; }
.view-all { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 500; transition: .2s; }
.view-all:hover { color: var(--accent); }
.sec-head .arrows { margin-left: auto; display: flex; gap: 8px; }
.arrows button { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.arrows button:hover { background: var(--accent); color: #0b0d12; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(128px, 14vw, 172px), 1fr)); gap: 24px 16px; }
.grid[hidden] { display: none; }
.row { display: flex; gap: 16px; overflow-x: auto; padding: 4px 0 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .card { flex: 0 0 clamp(132px, 14vw, 172px); scroll-snap-align: start; }
/* min-width:0 lets a tile stay at its set width instead of stretching to fit a long, no-wrap title */
.card { position: relative; display: block; min-width: 0; }
.card .meta { min-width: 0; }
.poster { position: relative; aspect-ratio: 2/3; border-radius: var(--r); overflow: hidden; background: var(--surface); transition: transform .35s var(--ease), box-shadow .35s; isolation: isolate; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .5s var(--ease); }
.poster img.in { opacity: 1; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; font: 700 15px/1.25 Sora; color: #fff; text-shadow: 0 2px 10px #0008; }
.poster::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(11,13,18,.92), rgba(11,13,18,.15) 55%, transparent); opacity: 0; transition: opacity .3s; }
.card:hover .poster { transform: translateY(-5px); box-shadow: 0 18px 36px -14px rgba(134,224,74,.35), 0 0 0 1.5px var(--accent); }
.card:hover .poster img { transform: scale(1.06); }
.card:hover .poster::after { opacity: 1; }
.play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--accent); color: #0b0d12; display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: .3s var(--ease); box-shadow: 0 8px 24px rgba(134,224,74,.5); }
.play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 3px; }
.card:hover .play { opacity: 1; transform: none; }
.badge { position: absolute; z-index: 2; top: 8px; left: 8px; display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 700; background: rgba(11,13,18,.78); backdrop-filter: blur(6px); padding: 3px 8px; border-radius: 6px; color: var(--gold); }
.type { position: absolute; z-index: 2; bottom: 8px; left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: #0b0d12; padding: 2px 7px; border-radius: 5px; }
.save { position: absolute; z-index: 3; top: 7px; right: 7px; width: 32px; height: 32px; border-radius: 50%; background: rgba(11,13,18,.78); backdrop-filter: blur(6px); display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: .2s; font-size: 16px; font-weight: 600; }
.card:hover .save, .save.on, .save:focus-visible { opacity: 1; transform: none; }
.save:hover { background: var(--accent); color: #0b0d12; }
.save.on { background: var(--accent); color: #0b0d12; }
.card .meta { padding: 10px 2px 0; }
.card h3 { font: 600 14px/1.3 Inter; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.card:hover h3 { color: var(--accent); }
.card p { color: var(--muted); font-size: 12.5px; }

.skel { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sh 1.3s infinite; border-radius: var(--r); }
@keyframes sh { to { background-position: -200% 0; } }
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(128px, 14vw, 172px), 1fr)); gap: 24px 16px; }
.skel-grid .skel { aspect-ratio: 2/3; }

/* ---------- Top list (sidebar) ---------- */
.rank { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.rank[hidden] { display: none; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; transition: background .2s; }
.rank-item:hover { background: var(--surface2); }
.rk { flex: 0 0 26px; font: 800 20px Sora; color: var(--muted); text-align: center; }
.rank-item:nth-child(-n+3) .rk { color: var(--accent); }
.rank-item img { width: 44px; height: 62px; border-radius: 7px; object-fit: cover; background: var(--surface2); flex: none; }
.rank-item b { display: block; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-item small { color: var(--muted); font-size: 12.5px; }
.side .sec-head { flex-wrap: nowrap; }

/* ---------- Browse pages ---------- */
.page { padding-top: calc(var(--nav-h) + 30px); }
.page-head { padding: 0 var(--pad); margin-bottom: 20px; }
.page-head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 0 var(--pad); margin-bottom: 26px; }
.select { appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238b93a7' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 38px 10px 16px; font-size: 14px; min-width: 150px; transition: .2s; }
.select:hover, .select:focus { border-color: var(--accent); outline: 0; }
.select option { background: var(--surface); }
.page .grid { padding: 0 var(--pad); }
.more { display: flex; justify-content: center; margin: 38px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 90px var(--pad); display: grid; gap: 14px; justify-items: center; }
.empty h2 { color: var(--text); }

/* ---------- Details ---------- */
.detail-hero { position: relative; padding: calc(var(--nav-h) + 50px) var(--pad) 44px; min-height: 540px; display: flex; align-items: flex-end; overflow: hidden; }
.detail-bg { position: absolute; inset: -20px; background-size: cover; background-position: center 20%; filter: blur(3px) saturate(1.1); transform: scale(1.05); }
.detail-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, var(--bg) 2%, rgba(11,13,18,.72) 50%, rgba(11,13,18,.6)), linear-gradient(90deg, rgba(11,13,18,.85), transparent 75%); }
.detail-inner { position: relative; z-index: 2; display: flex; gap: 38px; align-items: flex-end; width: 100%; }
.detail-poster { flex: 0 0 clamp(150px, 19vw, 250px); aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px var(--line); position: relative; background: var(--surface); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: clamp(28px, 4.6vw, 50px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.overview { max-width: 700px; color: #d3d8e4; margin-bottom: 24px; }
.block { padding: 36px var(--pad) 0; }
.block h2 { font-size: 21px; margin-bottom: 16px; position: relative; padding-left: 14px; }
.block h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--grad); }
.cast { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.person { flex: 0 0 104px; text-align: center; font-size: 13px; }
.avatar { width: 80px; height: 80px; margin: 0 auto 8px; border-radius: 50%; background: var(--surface2); border: 2px solid var(--line); display: grid; place-items: center; font: 700 20px Sora; color: var(--accent); }
.eps-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.eps-head h2 { margin: 0; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ep { display: flex; gap: 14px; text-align: left; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: .2s; align-items: center; }
.ep:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface2); }
.ep-num { flex: 0 0 42px; height: 42px; border-radius: 10px; background: rgba(134,224,74,.12); color: var(--accent); display: grid; place-items: center; font-weight: 700; transition: .2s; }
.ep:hover .ep-num { background: var(--accent); color: #0b0d12; }
.ep b { display: block; font-size: 14px; }
.ep span { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Inline player ---------- */
.player-block { padding-top: 28px; scroll-margin-top: calc(var(--nav-h) + 10px); }
.player-block[hidden] { display: none; }
.player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto 12px; width: min(100%, calc((100vh - 230px) * 1.7778)); }
.player-head small { display: block; color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.player-head b { font: 600 17px/1.3 Sora; }
.frame { aspect-ratio: 16/9; background: #000; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); width: min(100%, calc((100vh - 230px) * 1.7778)); margin: 0 auto; box-shadow: 0 30px 70px -30px #000; }
.frame iframe { width: 100%; height: 100%; border: 0; }
.frame.msg { display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.frame.msg h3 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.servers { display: flex; gap: 8px; margin: 14px auto 0; flex-wrap: wrap; align-items: center; width: min(100%, calc((100vh - 230px) * 1.7778)); }
.servers > span { color: var(--muted); font-size: 13px; margin-right: 4px; }
.pill { padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); transition: .2s; }
.pill:hover { color: var(--text); border-color: var(--accent); }
.pill.on { background: var(--accent); color: #0b0d12; border-color: transparent; font-weight: 600; }
.ep.cur { border-color: var(--accent); background: rgba(134,224,74,.08); }
.ep.cur .ep-num { background: var(--accent); color: #0b0d12; }

.toast { position: fixed; bottom: 90px; left: 50%; transform: translate(-50%, 20px); background: var(--surface2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .3s; z-index: 120; font-size: 14px; box-shadow: 0 10px 30px #0008; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { margin-top: 40px; border-top: 1px solid var(--line); padding: 36px var(--pad) 44px; display: flex; flex-direction: column; gap: 14px; color: var(--muted); font-size: 13px; background: #090b0f; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }
.footer small { max-width: 720px; line-height: 1.6; }
.tabbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav { gap: 12px; }
  .links { display: none; }
  .search { width: auto; min-width: 0; flex: 1; margin-left: 4px; }
  .logo span:last-child { font-size: 18px; }
  .tabbar { display: flex; position: fixed; z-index: 60; bottom: 0; left: 0; right: 0; background: rgba(11,13,18,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .footer { padding-bottom: 96px; }
  .hero { min-height: 470px; height: 72vh; }
  .hero-info { padding-bottom: 76px; }
  .hero-slide::before { background: linear-gradient(0deg, var(--bg) 6%, rgba(11,13,18,.62) 52%, rgba(11,13,18,.25)), linear-gradient(180deg, rgba(11,13,18,.7), transparent 25%); }
  .hero-nav { left: var(--pad); right: auto; bottom: 30px; }
  .hero-nav .arrow { display: none !important; }
  .nav-list { display: none; }
  .arrows { display: none; }
  .detail-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .detail-poster { flex-basis: auto; width: 130px; }
  .eps { grid-template-columns: 1fr; }
  .grid, .skel-grid { gap: 20px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Accounts, genres, admin
   ===================================================================== */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* status badges */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: rgba(134,224,74,.14); color: var(--accent); }
.status.warn { background: rgba(245,197,66,.14); color: var(--gold); }
.status.bad { background: rgba(255,92,92,.14); color: #ff7b7b; }
.status.idle { background: rgba(255,255,255,.08); color: #aab1c3; }

/* nav user area */
.nav-user { position: relative; flex: none; }
.nav-btn { height: 38px; padding: 0 18px; font-size: 14px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #0b0d12; font: 700 16px Sora; display: grid; place-items: center; transition: transform .2s, box-shadow .2s; }
.avatar-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(134,224,74,.2); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 24px 60px -10px #000; animation: in .2s var(--ease); z-index: 70; }
.menu[hidden] { display: none; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; justify-items: start; }
.menu-head small { color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.menu-head .status { margin-top: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: #d3d8e4; transition: .15s; }
.menu a:hover, .menu button:hover { background: var(--surface2); color: var(--accent); }

/* genres */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 16vw, 200px), 1fr)); gap: 14px; padding: 0 var(--pad); }
.genre-tile { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 16/10; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(145deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 40) 50% 13%)); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.genre-tile b { font: 700 17px Sora; position: relative; }
.genre-tile .gi { position: absolute; right: 10px; top: 4px; font-size: clamp(36px, 4.4vw, 52px); opacity: .9; transition: transform .35s var(--ease); filter: drop-shadow(0 6px 10px #0006); }
.genre-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 36px -14px hsl(var(--h) 70% 50% / .7), 0 0 0 1.5px var(--accent); }
.genre-tile:hover .gi { transform: scale(1.15) rotate(-6deg); }
.genre-strip { display: flex; gap: 10px; overflow-x: auto; padding: 18px 0 2px; scrollbar-width: none; }
.genre-strip::-webkit-scrollbar { display: none; }
.gchip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: #cfd4e1; transition: .2s; }
.gchip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.gchip.more-g { color: var(--accent); }
.genre-head h1 span { font-size: .9em; }
.crumb { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 6px; }
.crumb:hover { color: var(--accent); }

/* auth pages */
.page.narrow { max-width: 760px; margin: 0 auto; }
.page.narrow .page-head { padding: 0 var(--pad); }
.page.narrow > .panel { margin: 0 var(--pad) 16px; }
.auth-page { display: grid; place-items: start center; padding-left: var(--pad); padding-right: var(--pad); }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 30px 70px -30px #000; }
.auth-card .logo { margin-bottom: 4px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; color: #c4c9d6; }
.form label small { color: var(--muted); font-weight: 400; }
.form input { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; height: 44px; padding: 0 14px; color: var(--text); font: inherit; transition: .2s; width: 100%; }
.form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(134,224,74,.12); }
.btn.full { width: 100%; }
.form-error { color: #ff8d8d; font-size: 13.5px; }
.form-error:empty { display: none; }
.alert { background: rgba(245,197,66,.1); border: 1px solid rgba(245,197,66,.35); color: #f7d98a; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.auth-card a:not(.btn):not(.logo) { color: var(--accent); }

/* account */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 18px; }
.who { grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.who b { display: block; font-size: 17px; }
.who small { color: var(--muted); }
.avatar-lg { width: 54px; height: 54px; border-radius: 50%; background: var(--grad); color: #0b0d12; font: 700 22px Sora; display: grid; place-items: center; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 8px; transition: width .6s var(--ease); }
.steps { padding-left: 20px; display: grid; gap: 8px; color: #d3d8e4; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--accent); }
.links-panel { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.links-panel a { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); transition: .2s; }
.links-panel a:hover { border-color: var(--accent); color: var(--accent); }
.page-head { position: relative; }
.page-head .small-btn { position: absolute; right: var(--pad); top: 6px; }

/* admin */
.admin { padding: 0 var(--pad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; transition: .2s; }
.tile b { font: 800 26px Sora; }
.tile span { color: var(--muted); font-size: 13px; }
.tile:hover { border-color: rgba(134,224,74,.5); }
.tile.on { border-color: var(--accent); background: rgba(134,224,74,.07); }
.search.wide { width: min(420px, 100%); margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-top: 14px; }
.tbl { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl small { display: block; color: var(--muted); font-size: 12.5px; }
.tbl small.note { color: var(--gold); margin-top: 2px; }
.tbl a { color: var(--accent); }
.acts { min-width: 250px; }
.acts .small-btn { margin: 0 6px 6px 0; }
.small-btn { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: #ff8d8d; }
.btn.danger:hover { background: rgba(255,92,92,.18); }
.src { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.src-grid { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.src-grid .wide { grid-column: 1 / -1; }
.src label { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.src input:not([type=checkbox]) { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; height: 40px; padding: 0 12px; color: var(--text); font: inherit; width: 100%; }
.src input:focus { outline: 0; border-color: var(--accent); }
.src-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.src .chk { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.sub-h { margin: 26px 0 10px; font-size: 16px; }

@media (max-width: 820px) {
  .menu { right: -6px; }
  .who { grid-template-columns: auto 1fr; }
  .who .btn { grid-column: 1 / -1; }
  .page-head .small-btn { position: static; margin-top: 10px; }
  .src-grid { grid-template-columns: 1fr; }
}

/* usernames */
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.hint:empty { display: none; }
.hint.ok { color: var(--accent); }
.hint.bad { color: #ff8d8d; }
.username-panel { grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.username-panel small.muted { display: block; font-size: 12.5px; }
.username-panel b.copy { display: block; width: fit-content; font: 700 22px Sora; letter-spacing: .01em; }
@media (max-width: 820px) { .username-panel { grid-template-columns: 1fr; gap: 6px; } }

/* admin: row menu, reset-password dialog */
@keyframes fade { from { opacity: 0; } }
.menu-wrap { display: inline-block; }
.rowmenu { position: fixed; z-index: 90; min-width: 220px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 20px 50px -10px #000; animation: in .15s var(--ease); }
.rowmenu[hidden] { display: none; }
.rowmenu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: #d3d8e4; transition: .15s; }
.rowmenu button:hover { background: rgba(255,255,255,.07); color: var(--accent); }
.rowmenu button.danger, .rowmenu button.danger:hover { color: #ff8d8d; }
.rowmenu button.danger:hover { background: rgba(255,92,92,.14); }
.rowmenu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dialog-back { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.dialog { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 30px 80px -20px #000; }
.dialog h2 { font-size: 19px; }
.dialog .btns { justify-content: flex-end; }
.pw-box { font: 700 24px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; text-align: center; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--accent); color: var(--accent); user-select: all; word-break: break-all; }
.panel.highlight { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(134,224,74,.12); }

/* sign-up step 1: ad-blocker guide */
.guide .small { font-size: 13px; margin: 0; }
.detect { font-size: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(245,197,66,.1); border: 1px solid rgba(245,197,66,.35); color: #f7d98a; }
.detect.ok { background: rgba(134,224,74,.1); border-color: rgba(134,224,74,.4); color: var(--accent); }
.gsteps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); cursor: pointer; font-size: 14.5px; }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); }

/* ad-blocker links, announcements */
.getlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; justify-self: center; }
.linkbtn:hover { color: var(--text); }
.ann + .ann { border-top: 1px solid var(--line); padding-top: 12px; }
.ann-body { white-space: pre-wrap; color: #c4c9d6; font-size: 14.5px; line-height: 1.55; margin: 6px 0 0; }
.form textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--text); font: inherit; width: 100%; resize: vertical; min-height: 96px; }
.form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(134,224,74,.12); }
