/* ============ N-STYLE ============ */
@font-face { font-family: "Bebas Neue"; src: url("fonts/bebas-neue.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #08080a; --bg-2: #0f0f13; --panel: #141419; --panel-2: #1b1b22; --line: #26262f;
  --text: #f2efe9; --muted: #9b98a3; --accent: #e3262a; --accent-hot: #ff4b2b; --accent-glow: rgba(227, 38, 42, .35);
  --ok: #2f9e5b; --err: #e04a40;
  --radius: 14px; --max: 1120px;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
body.has-player { padding-bottom: 96px; }
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hot); }
img { max-width: 100%; display: block; object-fit: cover; background: var(--panel-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: .95; margin: 0 0 .4em; }
h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-hot); margin: 0 0 .7em; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { left: -9999px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 3px; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ---- Header ---- */
header.site { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px); background: rgba(8, 8, 10, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); }
.logo { font-family: var(--display); font-size: 1.9rem; letter-spacing: .14em; text-decoration: none; color: var(--text); line-height: 1; }
.logo:hover { color: var(--text); }
header.site nav, footer.site nav { display: flex; gap: clamp(14px, 3vw, 28px); align-items: center; flex-wrap: wrap; }
header.site nav a, footer.site nav a { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
header.site nav a:hover, footer.site nav a:hover { color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 26px; font: 800 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease; box-shadow: 0 8px 24px -10px var(--accent-glow); }
.btn:hover { background: var(--accent-hot); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .22); box-shadow: none; backdrop-filter: blur(6px); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn.small { padding: 9px 16px; font-size: .7rem; }

/* ---- Hero ---- */
.hero { position: relative; margin: 0 calc(50% - 50vw) 56px; width: 100vw; min-height: min(78vh, 680px); display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(227, 38, 42, .35), transparent 70%), linear-gradient(180deg, #120709, var(--bg)); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; filter: saturate(1.1) contrast(1.05); transform: scale(1.03); }
.hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 8, 10, .25) 0%, rgba(8, 8, 10, .35) 45%, var(--bg) 100%),
              linear-gradient(90deg, rgba(8, 8, 10, .75) 0%, transparent 70%); }
.hero-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 80px clamp(16px, 4vw, 40px) 48px; }
.hero h1 { font-size: clamp(4.5rem, 17vw, 11rem); line-height: .82; letter-spacing: .03em; margin: 0 0 .15em; text-shadow: 0 6px 40px rgba(0, 0, 0, .5); }
.hero .tagline { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: #d9d5ce; max-width: 34ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---- Sections ---- */
.block { margin: 0 0 64px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.block-head h2 { margin: 0; }
.more { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 210px), 1fr)); gap: clamp(12px, 2.5vw, 24px); }
.album-card { text-decoration: none; color: var(--text); display: block; }
.album-card img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; margin-bottom: 12px; transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9); }
.album-card:hover img { transform: translateY(-4px); box-shadow: 0 24px 50px -20px var(--accent-glow); }
.album-card-title { display: block; font-weight: 800; line-height: 1.25; }
.album-card-sub { display: block; color: var(--muted); font-size: .85rem; }
.album-card:hover { color: var(--text); }

/* ---- Track list ---- */
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.track { display: grid; grid-template-columns: 40px 48px 1fr auto; align-items: center; gap: 14px; padding: 10px 8px; border-bottom: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; transition: background .15s ease; }
.track:hover { background: var(--panel); }
.track.is-current { background: linear-gradient(90deg, rgba(227, 38, 42, .16), transparent 70%); }
.track-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center;
  cursor: pointer; font: 600 .95rem var(--body); padding: 0; }
.track-play .ico { width: 20px; height: 20px; display: none; }
.track:hover .track-num, .track.is-current .track-num { display: none; }
.track:hover .track-play .ico-play, .track.is-current .track-play:not(.playing) .ico-play { display: block; }
.track-play.playing .ico-pause { display: block; }
.track .track-play.playing .ico-play { display: none; }
.track.is-current .track-play { background: var(--accent); color: #fff; }
.track-art { width: 48px; height: 48px; border-radius: 6px; }
.track-meta { min-width: 0; }
.track-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.is-current .track-title { color: var(--accent-hot); }
.track-sub { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { display: none; gap: 3px; align-items: flex-end; height: 16px; width: 18px; margin-right: 6px; }
.eq i { width: 4px; background: var(--accent-hot); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; }
.track.is-playing .eq { display: flex; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ---- Artist page ---- */
.bio-block { max-width: 760px; }
.bio { font-size: 1.12rem; color: #ddd9d2; }
.album { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; }
.album-cover { position: sticky; top: 90px; }
.album-cover img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .05); }
.album-body h2 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.album-body .btn { margin: 4px 0 20px; }

/* ---- Support panel ---- */
.support { margin: 0 0 64px; border-radius: 20px; overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(ellipse 70% 120% at 100% 0%, rgba(227, 38, 42, .45), transparent 60%), linear-gradient(135deg, #1a0a0c, #0e0e12 60%);
  border: 1px solid rgba(227, 38, 42, .28); }
.support-inner { padding: clamp(28px, 6vw, 56px); max-width: 720px; }
.support h2 { font-size: clamp(2.6rem, 7vw, 4rem); }
.support-text { color: #ddd9d2; font-size: 1.05rem; max-width: 50ch; }
.donate-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; }
.btn.donate { box-shadow: none; }
.btn.donate.paypal { background: #0070ba; } .btn.donate.stripe { background: #635bff; }
.btn.donate.kofi { background: #13c3ff; color: #06202b; } .btn.donate.bmac { background: #ffdd00; color: #111; }
.btn.donate:hover { filter: brightness(1.1); }
.secure { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .82rem; margin: 0; }
.secure .ico { margin-top: 2px; }

/* ---- Sign-up ---- */
.signup-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; margin: 0 0 64px; padding: clamp(24px, 5vw, 44px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.signup-panel h2 { font-size: clamp(2.2rem, 5vw, 3rem); }
.signup-panel p.muted { margin: 0; }
.signup-row { display: flex; gap: 8px; }
.signup-row input { flex: 1; min-width: 0; }
.consent { display: block; font-size: .8rem; color: var(--muted); margin-top: 12px; }

/* ---- Forms (site + admin) ---- */
input, textarea, select { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
input[type=checkbox] { width: auto; margin-right: 6px; accent-color: var(--accent); }
input[type=file] { padding: 9px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ---- Footer ---- */
footer.site { border-top: 1px solid var(--line); padding: 40px clamp(16px, 4vw, 40px); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 0; width: 100%; }

/* ---- Player bar ---- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(14, 14, 18, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, .08); padding-bottom: env(safe-area-inset-bottom); animation: rise .3s ease; }
.player[hidden] { display: none; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.player-row { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 14px; align-items: center; max-width: var(--max); margin: 0 auto; padding: 10px clamp(12px, 4vw, 40px) 12px; }
.player-art { width: 48px; height: 48px; border-radius: 6px; }
.player-meta { min-width: 0; }
.player-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: .8rem; color: var(--muted); }
.player-time { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-controls button { background: none; border: 0; color: var(--text); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.player-controls button:disabled { opacity: .3; cursor: default; }
.player-controls .ico { width: 22px; height: 22px; }
.player-controls .pl-main { background: var(--text); color: var(--bg); width: 46px; height: 46px; }
.player-controls .pl-main:hover { background: #fff; transform: scale(1.05); }
.pl-main .ico-pause, .pl-main.playing .ico-play { display: none; }
.pl-main.playing .ico-pause { display: block; }
.player-progress { height: 4px; }
.player-progress input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; padding: 0; margin: 0; border: 0; border-radius: 0;
  background: linear-gradient(90deg, var(--accent) var(--pct, 0%), rgba(255, 255, 255, .12) var(--pct, 0%)); cursor: pointer; box-shadow: none; }
.player-progress input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.player-progress input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }

/* ---- Flash messages ---- */
.flash { padding: 13px 18px; border-radius: 10px; margin: 20px 0; border: 1px solid; }
.flash.ok { border-color: var(--ok); background: rgba(47, 158, 91, .12); }
.flash.err { border-color: var(--err); background: rgba(224, 74, 64, .12); }
.flash.info { border-color: #3a6fd8; background: rgba(58, 111, 216, .12); }

/* ---- Privacy / text pages ---- */
.prose { max-width: 720px; padding-top: 40px; }
.prose h1 { font-size: clamp(3rem, 8vw, 4.5rem); }
.prose h2 { font-size: 1.8rem; margin-top: 1.4em; }
code { background: #222; padding: 2px 6px; border-radius: 4px; }

/* ---- Admin ---- */
body.admin main { padding-top: 28px; }
body.admin h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); }
body.admin h2 { font-size: 1.7rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.form label { display: block; margin-bottom: 16px; font-weight: 600; }
.form label input, .form label textarea, .form label select { margin-top: 6px; font-weight: 400; }
.form label.check { font-weight: 400; }
.form.narrow { max-width: 440px; }
.actions { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.thumbrow { display: flex; gap: 14px; align-items: center; margin: -6px 0 16px; }
.thumbrow img { width: 80px; height: 80px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
td img { width: 48px; height: 48px; border-radius: 4px; }
td audio { min-width: 180px; height: 36px; }
table.card { padding: 0; display: block; overflow-x: auto; }
.row-actions { white-space: nowrap; }
.row-actions > * { margin-right: 10px; }
form.inline { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-hot); font: inherit; cursor: pointer; text-decoration: underline; }
header.site .linkbtn { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.linkbtn.danger { color: var(--err); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .8rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* ---- Mobile ---- */
@media (max-width: 760px) {
  .album { grid-template-columns: 1fr; }
  .album-cover { position: static; max-width: 320px; }
  .signup-panel { grid-template-columns: 1fr; gap: 16px; }
  .hero { min-height: 70vh; }
  .player-time { display: none; }
  .player-row { grid-template-columns: 44px 1fr auto; gap: 10px; }
  .player-art { width: 44px; height: 44px; }
  #pl-prev { display: none; }
  .track { grid-template-columns: 36px 44px 1fr auto; gap: 10px; padding: 8px 4px; }
  .track-art { width: 44px; height: 44px; }
  header.site { padding: 12px 16px; }
  header.site nav { gap: 14px; }
  .logo { font-size: 1.6rem; }
}
@media (max-width: 380px) {
  .signup-row { flex-direction: column; }
  header.site nav a[href="/#music"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
