:root {
  --bg: #07090f;
  --bg2: #0b0f1a;
  --surface: #10162a;
  --surface2: #172040;
  --line: #243055;
  --text: #eef2ff;
  --muted: #a3adcf;
  --blue: #2f6bff;
  --blue-soft: #7da2ff;
  --red: #ff2e4d;
  --red-soft: #ff8ba0;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22,.8,.3,1);
  --player-h: 0px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.has-player { --player-h: 96px; }
img { max-width: 100%; display: block; }
a { color: var(--blue-soft); }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue); border-radius: 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip { position: absolute; left: 8px; top: -60px; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: calc(56px + env(safe-area-inset-top)) 0 36px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 80% at 8% 0%, rgba(47,107,255,.38), transparent 60%),
    radial-gradient(55% 70% at 100% 20%, rgba(255,46,77,.28), transparent 62%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}
.hero-banner { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .35;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.hero h1 {
  font-size: clamp(4rem, 17vw, 8.5rem); font-weight: 700; letter-spacing: -.04em;
  background: linear-gradient(100deg, #fff 0%, var(--blue-soft) 45%, var(--red) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content;
}
.tagline { margin: 8px 0 0; font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.stats li { background: rgba(16,22,42,.8); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .95rem; color: var(--text); }
.stats b { color: var(--red-soft); font-weight: 700; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.socials a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--blue); color: var(--text); text-decoration: none; font-weight: 600; transition: background .2s var(--ease), transform .2s var(--ease); }
.socials a:hover { background: var(--blue); transform: translateY(-1px); }

/* Tabs */
.tabs-bar { position: sticky; top: 0; z-index: 20; background: rgba(7,9,15,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
[role=tablist] { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
[role=tablist]::-webkit-scrollbar { display: none; }
[role=tab] {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 16px;
  font-weight: 600; transition: background .2s var(--ease), border-color .2s var(--ease);
  display: inline-flex; gap: 8px; align-items: center; min-height: 44px;
}
[role=tab]:hover { border-color: var(--blue); }
[role=tab][aria-selected=true] { background: linear-gradient(120deg, var(--blue), #5b3bd6 60%, var(--red)); border-color: transparent; color: #fff; }
.count { background: rgba(0,0,0,.35); border-radius: 999px; padding: 0 8px; font-size: .85rem; min-width: 1.6em; text-align: center; }
[role=tab][aria-selected=true] .count::before { content: ""; }
.panel-title { font-size: 1.4rem; margin: 28px 0 14px; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; text-align: center; }
.state { color: var(--muted); padding: 28px 0; }

/* Track list */
.tracks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.track { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; animation: rise .4s var(--ease) both; transition: border-color .2s var(--ease), background .2s var(--ease); scroll-margin: 90px; }
.track:hover { border-color: #34457e; }
.track.is-current { border-color: var(--blue); background: linear-gradient(90deg, rgba(47,107,255,.16), rgba(255,46,77,.08)); }
.track.is-linked { outline: 2px solid var(--red); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row { display: flex; gap: 12px; align-items: center; }
.cover { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--blue), var(--red)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.ph::after { content: "SZK"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 .85rem var(--font-head); letter-spacing: .08em; color: rgba(255,255,255,.85); }
.info { flex: 1 1 auto; min-width: 0; }
.t-title { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.t-feat { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.t-meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.soon { color: var(--red-soft); font-weight: 600; }
.actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.btn { border: 1px solid var(--line); background: var(--surface2); border-radius: 999px; min-height: 44px; min-width: 44px; padding: 0 14px; font-weight: 600; transition: background .2s var(--ease), transform .15s var(--ease), border-color .2s; }
.btn:hover { border-color: var(--blue); }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(120deg, var(--blue), #4f46e5); border-color: transparent; color: #fff; }
.btn.danger { background: #3a0f1a; border-color: var(--red); color: #ffd3da; }
.btn.play { width: 48px; height: 48px; padding: 0; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--red)); border: 0; color: #fff; display: grid; place-items: center; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn[hidden] { display: none; }
.lyrics-box { margin: 10px 2px 2px; padding: 12px; background: var(--bg2); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: #d9e0ff; border: 1px solid var(--line); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 6px; vertical-align: middle; }
.eq i { width: 3px; background: var(--red); border-radius: 2px; height: 40%; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%,100% { height: 25%; } 50% { height: 100%; } }
.paused .eq i { animation: none; }

footer.site { margin: 56px 0 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }

/* Player */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(11,15,26,.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.player::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--red)); }
.player[hidden] { display: none; }
.p-inner { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; align-items: center; }
.p-now { display: flex; gap: 10px; align-items: center; min-width: 0; }
.p-now .cover { width: 48px; height: 48px; }
.p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist { font-size: .85rem; color: var(--muted); }
.p-ctrl { display: flex; gap: 4px; align-items: center; }
.p-ctrl .btn { padding: 0; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; }
.p-ctrl .btn.play { width: 48px; height: 48px; }
.p-seek { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-seek input { flex: 1; }
.p-vol { display: none; align-items: center; gap: 6px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; --pct: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--blue) var(--pct), #2a3560 var(--pct)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #2a3560; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--blue); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--red); margin-top: -6px; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--red); }
@media (min-width: 760px) {
  .p-inner { grid-template-columns: 1fr auto 1fr; }
  .p-seek { grid-column: 1 / -1; order: 3; }
  .p-vol { display: flex; justify-content: flex-end; }
  .p-vol input { width: 110px; }
  .cover { width: 72px; height: 72px; }
}
@media (max-width: 759px) { .actions .btn.label-btn span.long { display: none; } .t-title { font-size: 1rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Forms (admin) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; }
.card h2 { font-size: 1.3rem; margin-bottom: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field legend { font-weight: 600; }
.hint { color: var(--muted); font-size: .88rem; }
input[type=text], input[type=password], input[type=url], input[type=date], select, textarea, input[type=file] {
  width: 100%; background: var(--bg2); border: 1px solid #34457e; border-radius: 10px; padding: 11px 12px; min-height: 44px; font-size: 16px;
}
textarea { min-height: 140px; resize: vertical; }
.err { color: #ffd3da; background: #3a0f1a; border: 1px solid var(--red); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.ok { color: #d6f5e3; background: #0f2f22; border: 1px solid #2fbf7f; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.err:empty, .ok:empty { display: none; }
progress { width: 100%; height: 14px; accent-color: var(--blue); }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 0 6px; }
.adm-head h1 { font-size: 2rem; }
.adm-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-actions select { width: auto; min-width: 150px; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--red); border-radius: var(--radius); max-width: 420px; padding: 20px; }
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog menu { display: flex; gap: 10px; justify-content: flex-end; padding: 0; margin: 18px 0 0; }
.notfound { min-height: 80vh; display: grid; place-content: center; text-align: center; gap: 12px; padding: 20px; }
.notfound h1 { font-size: clamp(4rem, 20vw, 8rem); background: linear-gradient(100deg, var(--blue), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
