:root {
  --bg: #05060d;
  --panel: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --text: #e8f0ff;
  --dim: #8a96b8;
  --cyan: #00f0ff;
  --mag: #ff2bd6;
  --vio: #8b5cff;
  --font: "Orbitron", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--body); min-height: 100vh; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }

/* Background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.aurora { position: absolute; inset: -30%; background:
  radial-gradient(40% 35% at 20% 30%, rgba(0,240,255,.22), transparent 70%),
  radial-gradient(40% 40% at 80% 20%, rgba(255,43,214,.20), transparent 70%),
  radial-gradient(45% 40% at 60% 85%, rgba(139,92,255,.22), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate; filter: blur(30px); }
.grid { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(0,240,255,.06) 1px, transparent 1px),
  linear-gradient(90deg, rgba(0,240,255,.06) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 3px); }
@keyframes drift { to { transform: translate3d(6%, -4%, 0) rotate(8deg) scale(1.1); } }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 14px 4vw;
  background: linear-gradient(rgba(5,6,13,.85), rgba(5,6,13,0)); backdrop-filter: blur(10px); transition: background .3s; }
.nav.solid { background: rgba(5,6,13,.85); border-bottom: 1px solid var(--line); }
.logo { font-family: var(--font); font-weight: 800; letter-spacing: .28em; font-size: 1.15rem; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, var(--cyan), var(--mag)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(var(--cyan), var(--mag), var(--vio), var(--cyan));
  box-shadow: 0 0 18px var(--cyan); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.links { display: flex; gap: 22px; font-size: .9rem; color: var(--dim); }
.links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: .2s; }
.links a:hover, .links a.active { color: var(--text); border-color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.count { background: var(--mag); color: #fff; font-size: .7rem; border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); transition: .25s; }
.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,.35); color: var(--cyan); }
.search input { background: none; border: 0; outline: 0; color: var(--text); width: 150px; transition: width .3s; font: inherit; }
.search input:focus { width: 230px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--vio), var(--mag)); box-shadow: 0 0 16px rgba(255,43,214,.5); }

/* Hero */
.hero { position: relative; min-height: 86vh; display: flex; align-items: center; padding: 110px 4vw 60px; overflow: hidden; }
.hero-art { position: absolute; inset: 0; opacity: .95; transition: opacity .8s; }
.hero-art::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 8%, transparent 70%), linear-gradient(0deg, var(--bg), transparent 40%); }
.hero-art .orb { position: absolute; right: 8%; top: 50%; width: min(46vw, 560px); aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  filter: blur(2px); animation: float 9s ease-in-out infinite alternate; }
.hero-art .ring { position: absolute; right: 8%; top: 50%; width: min(56vw, 680px); aspect-ratio: 1; transform: translateY(-50%) rotateX(68deg); border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); box-shadow: 0 0 40px rgba(255,255,255,.1), inset 0 0 40px rgba(255,255,255,.08); animation: pulse 6s ease-in-out infinite; }
@keyframes float { to { transform: translateY(-54%) scale(1.04); } }
@keyframes pulse { 50% { opacity: .4; } }
.hero-body { position: relative; max-width: 640px; animation: rise .8s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.tag { display: inline-flex; gap: 10px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.hero h1 { font-family: var(--font); font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1.02; margin-bottom: 16px;
  background: linear-gradient(90deg, #fff, var(--cyan) 60%, var(--mag)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--dim); font-size: .9rem; margin-bottom: 14px; }
.match { color: #3dffa0; font-weight: 700; }
.badge { border: 1px solid var(--line); padding: 1px 8px; border-radius: 4px; font-size: .78rem; }
.hero p { color: #c4cde6; line-height: 1.6; margin-bottom: 26px; max-width: 54ch; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { padding: 13px 28px; border-radius: 10px; font-weight: 700; letter-spacing: .04em; transition: .25s; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); }
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 24px rgba(0,240,255,.35); }
.btn.primary { background: linear-gradient(90deg, var(--cyan), var(--vio)); color: #02030a; border: 0; box-shadow: 0 0 28px rgba(0,240,255,.45); }
.btn.primary:hover { box-shadow: 0 0 40px rgba(0,240,255,.8); }
.dots { position: absolute; bottom: 28px; left: 4vw; display: flex; gap: 8px; }
.dots button { width: 28px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); transition: .3s; }
.dots button.on { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); width: 48px; }

/* Rails */
.rail { padding: 18px 0 8px; position: relative; }
.rail h2 { font-family: var(--font); font-size: 1.05rem; letter-spacing: .12em; padding: 0 4vw 12px; display: flex; align-items: center; gap: 12px; }
.rail h2::before { content: ""; width: 4px; height: 18px; background: linear-gradient(var(--cyan), var(--mag)); border-radius: 2px; box-shadow: 0 0 10px var(--cyan); }
.track { display: flex; gap: 16px; overflow-x: auto; padding: 14px 4vw 26px; scroll-snap-type: x proximity; scrollbar-width: none; perspective: 1000px; }
.track::-webkit-scrollbar { display: none; }
.arrow { position: absolute; top: 50%; z-index: 5; width: 44px; height: 90px; margin-top: -30px; background: rgba(5,6,13,.7); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; opacity: 0; transition: .25s; font-size: 1.4rem; }
.rail:hover .arrow { opacity: 1; }
.arrow:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(0,240,255,.5); }
.arrow.l { left: 1vw; } .arrow.r { right: 1vw; }

.card { flex: 0 0 auto; width: 210px; scroll-snap-align: start; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 2/3; border: 1px solid var(--line);
  transition: transform .15s ease-out, box-shadow .3s, border-color .3s; transform-style: preserve-3d; cursor: pointer; text-align: left; display: block; }
.card:hover, .card:focus-visible { border-color: var(--cyan); box-shadow: 0 0 30px rgba(0,240,255,.4), 0 20px 40px rgba(0,0,0,.6); outline: 0; z-index: 2; }
.card .poster { position: absolute; inset: 0; }
.card .poster::before { content: ""; position: absolute; width: 140%; aspect-ratio: 1; left: -20%; top: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.35), transparent 60%); mix-blend-mode: overlay; }
.card .poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,6,13,.95) 8%, transparent 60%); }
.card .info { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; }
.card h3 { font-family: var(--font); font-size: .9rem; margin-bottom: 4px; }
.card small { color: var(--dim); font-size: .75rem; }
.card .add { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(5,6,13,.65); backdrop-filter: blur(6px); border: 1px solid var(--line); display: grid; place-items: center; opacity: 0; transition: .2s; }
.card:hover .add, .card .add.on { opacity: 1; }
.card .add.on { background: var(--mag); border-color: var(--mag); }

.empty { text-align: center; color: var(--dim); padding: 120px 4vw; }
.footer { text-align: center; color: var(--dim); font-size: .8rem; padding: 50px 4vw 40px; letter-spacing: .1em; }
body.search-mode .hero { display: none; }
body.search-mode main { padding-top: 90px; }

/* Player */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(2,3,8,.82); backdrop-filter: blur(14px); display: grid; place-items: center; padding: 3vw; animation: fade .25s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.player { width: min(1100px, 100%); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #070914; box-shadow: 0 0 80px rgba(139,92,255,.35); position: relative; }
.close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: rgba(5,6,13,.7); border: 1px solid var(--line); }
.close:hover { border-color: var(--mag); box-shadow: 0 0 16px var(--mag); }
.screen { position: relative; aspect-ratio: 16/9; background: #000; }
.screen canvas, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.now { position: absolute; left: 24px; bottom: 20px; text-shadow: 0 2px 12px #000; pointer-events: none; }
.now h2 { font-family: var(--font); font-size: clamp(1.1rem, 3vw, 1.9rem); }
.now p { color: #c4cde6; font-size: .85rem; }
.controls { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: rgba(255,255,255,.04); border-top: 1px solid var(--line); }
.controls button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.controls button:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(0,240,255,.5); }
.time { font-variant-numeric: tabular-nums; color: var(--dim); font-size: .8rem; flex: none; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); outline: 0; cursor: pointer; }
#seek { flex: 1; min-width: 0; background: linear-gradient(90deg, var(--cyan) var(--p, 0%), rgba(255,255,255,.2) var(--p, 0%)); }
#vol { width: 90px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--cyan); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--cyan); }

@media (max-width: 720px) {
  .links, .avatar { display: none; }
  .nav { gap: 12px; } .search input, .search input:focus { width: 110px; }
  .card { width: 150px; }
  .hero { min-height: 78vh; align-items: flex-end; }
  .hero-art .orb { right: -20%; width: 90vw; top: 30%; }
  .hero-art .ring { display: none; }
  #vol, .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
