@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --bg: #0b0a0f;
  --panel: #15131c;
  --line: #2a2634;
  --text: #f3f0ea;
  --muted: #8d8798;
  --hot: #ff2e63;
  --cool: #25f4ee;
  --ok: #2bd96b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(255,46,99,.18), transparent 60%),
    radial-gradient(700px 500px at -20% 110%, rgba(37,244,238,.12), transparent 60%),
    var(--bg);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.onair {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  border: 1px solid var(--hot); color: var(--hot); padding: 6px 12px; border-radius: 999px;
}
.onair::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 12px var(--hot); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.toplink { color: var(--muted); font-size: 14px; text-decoration: none; }
.toplink:hover { color: var(--text); }

h1 {
  font-size: clamp(44px, 8vw, 96px); line-height: .9; margin: 0 0 14px; font-weight: 800; letter-spacing: -.035em;
}
h1 .glitch { color: var(--hot); text-shadow: -3px 0 var(--cool); }
.lede { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 0 40px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { margin: 0 0 18px; font-size: 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel h2 .count { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--muted); font-weight: 400; }

label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 8px; letter-spacing: .04em; text-transform: uppercase; font-family: "JetBrains Mono", monospace; }
input[type=text], input[type=password] {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font: inherit; font-size: 18px; outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--cool); }
.field { margin-bottom: 20px; }

.drop {
  display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 28px 18px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.drag { border-color: var(--cool); background: rgba(37,244,238,.05); }
.drop strong { display: block; font-size: 18px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 14px; }
.drop .file { color: var(--cool); font-family: "JetBrains Mono", monospace; font-size: 14px; word-break: break-all; }
.drop input { display: none; }

button {
  font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 14px 20px; font-weight: 600; font-size: 16px;
  transition: transform .08s, opacity .15s, background .15s;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { width: 100%; background: var(--hot); color: #fff; font-size: 18px; padding: 16px; }
.btn-primary:hover:not(:disabled) { background: #ff4876; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-ok {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(43,217,107,.12); color: var(--ok);
  border: 1px solid rgba(43,217,107,.45); padding: 9px 14px; font-size: 14px; white-space: nowrap;
}
.btn-ok:hover { background: var(--ok); color: #04120a; }
.tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #04120a; font-size: 13px; font-weight: 800; }

.progress { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 14px; display: none; }
.progress.on { display: block; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cool), var(--hot)); transition: width .2s; }
.msg { margin-top: 14px; font-size: 15px; min-height: 1.2em; }
.msg.err { color: var(--hot); }
.msg.ok { color: var(--ok); }

.mine {
  border: 1px solid var(--cool); background: rgba(37,244,238,.06); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; display: none;
}
.mine.on { display: block; }
.mine .big { font-size: 40px; font-weight: 800; line-height: 1; }
.mine .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

ol.queue { list-style: none; padding: 0; margin: 0; }
ol.queue li {
  display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line);
}
ol.queue li:last-child { border-bottom: 0; }
.pos { font-family: "JetBrains Mono", monospace; color: var(--muted); width: 34px; flex: none; font-size: 14px; }
.name { flex: 1; font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.queue li.now .pos { color: var(--hot); }
ol.queue li.now .name::after {
  content: "IN ASCOLTO"; margin-left: 10px; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .15em;
  color: var(--hot); border: 1px solid var(--hot); padding: 2px 6px; border-radius: 4px; vertical-align: middle;
}
ol.queue li.me { background: rgba(37,244,238,.07); border-radius: 8px; }
ol.queue li.me .name { color: var(--cool); }
ol.queue li.done .name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(141,135,152,.5); }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }
details.history { margin-top: 18px; }
details.history summary { color: var(--muted); cursor: pointer; font-size: 14px; }

/* admin */
.admin-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.admin-row .meta { color: var(--muted); font-size: 13px; font-family: "JetBrains Mono", monospace; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.admin-row.playing { background: rgba(255,46,99,.08); border-radius: 8px; }
.player { position: sticky; top: 0; z-index: 5; background: var(--panel); border: 1px solid var(--hot); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; display: none; }
.player.on { display: block; }
.player .who { font-size: 26px; font-weight: 800; }
.player audio { width: 100%; margin-top: 10px; }
.login { max-width: 420px; margin: 10vh auto 0; }
.login .btn-primary { margin-top: 16px; }
.turnstile:not(:empty) { margin: 0 0 14px; display: flex; justify-content: center; }
