* { box-sizing: border-box; margin: 0; padding: 0; }

/* the hidden attribute must always win, even over display:flex rules */
[hidden] { display: none !important; }

:root {
  --accent1: #ff3b5c;
  --accent2: #ff7a3b;
  --accent3: #7a5cff;
  --accent4: #2bd2ff;
  --text: #eef0ff;
  --muted: #9aa0d8;
  --muted2: #8d93c9;
}

html { min-height: 100%; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07060f;
  color: var(--text);
  padding: 24px;
  overflow-x: hidden;
}

/* ===== Animated background scene ===== */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(122, 92, 255, 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 20% 110%, rgba(255, 59, 92, 0.18), transparent),
    #07060f;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb.o1 { width: 420px; height: 420px; top: -120px; left: -100px; background: radial-gradient(circle, #ff3b5c, transparent 70%); }
.orb.o2 { width: 500px; height: 500px; bottom: -180px; right: -120px; background: radial-gradient(circle, #7a5cff, transparent 70%); animation-delay: -6s; animation-duration: 22s; }
.orb.o3 { width: 320px; height: 320px; top: 40%; left: 60%; background: radial-gradient(circle, #2bd2ff, transparent 70%); opacity: 0.3; animation-delay: -12s; animation-duration: 26s; }
.orb.o4 { width: 260px; height: 260px; top: 55%; left: 5%; background: radial-gradient(circle, #ff7a3b, transparent 70%); opacity: 0.35; animation-delay: -3s; animation-duration: 20s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.15); }
  100% { transform: translate(-50px, 50px) scale(0.95); }
}

/* floating music notes */
.note {
  position: absolute;
  bottom: -60px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.18);
  animation: rise linear infinite;
  text-shadow: 0 0 18px rgba(255, 92, 122, 0.35);
}

.note:nth-child(5)  { left: 8%;  animation-duration: 16s; animation-delay: 0s;  font-size: 26px; }
.note:nth-child(6)  { left: 22%; animation-duration: 21s; animation-delay: 4s;  font-size: 18px; }
.note:nth-child(7)  { left: 38%; animation-duration: 18s; animation-delay: 9s;  font-size: 30px; }
.note:nth-child(8)  { left: 55%; animation-duration: 24s; animation-delay: 2s;  font-size: 20px; }
.note:nth-child(9)  { left: 70%; animation-duration: 17s; animation-delay: 7s;  font-size: 24px; }
.note:nth-child(10) { left: 86%; animation-duration: 22s; animation-delay: 12s; font-size: 19px; }

@keyframes rise {
  0%   { transform: translateY(0) rotate(0deg);        opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(40deg);  opacity: 0; }
}

/* ===== Floating + 3D tilting card ===== */
.floater {
  animation: floaty 7s ease-in-out infinite;
  width: 100%;
  max-width: 680px;
}

.floater.wide { max-width: 760px; }
.floater.narrow { max-width: 380px; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  backdrop-filter: blur(18px);
  padding: 42px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
  /* no transform transition: the clickable area must always match what you
     see, even while the tilt follows the mouse */
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 28px;
  background: conic-gradient(from var(--spin, 0deg), transparent 0%, rgba(255, 59, 92, 0.45) 12%, transparent 28%, transparent 55%, rgba(122, 92, 255, 0.45) 68%, transparent 85%);
  z-index: -1;
  filter: blur(10px);
  animation: borderspin 8s linear infinite;
}

@property --spin {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderspin {
  to { --spin: 360deg; }
}

.card.wide { text-align: left; }

.logo {
  margin-bottom: 8px;
  display: inline-block;
  animation: bob 3.5s ease-in-out infinite;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}

.logo img { display: block; width: 84px; height: 84px; }

/* small inline logo (admin header) */
.logo-sm {
  width: 30px; height: 30px;
  vertical-align: -7px;
  margin-right: 8px;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(4deg); }
}

h1 {
  font-size: 28px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #ffb1c1 45%, #c0b1ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
}

.tagline { color: #b8bce0; margin: 6px 0 18px; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 59, 92, 0.14);
  border: 1px solid rgba(255, 59, 92, 0.55);
  color: #ff5c7a;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: 0 0 22px rgba(255, 59, 92, 0.25), 0 0 50px rgba(255, 59, 92, 0.12);
  animation: badgeglow 2.6s ease-in-out infinite;
}

@keyframes badgeglow {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 59, 92, 0.2); }
  50%      { box-shadow: 0 0 34px rgba(255, 59, 92, 0.45); }
}

.dot {
  width: 9px; height: 9px;
  background: #ff3b5c;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

/* ===== Channel pills ===== */
.channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 22px;
}

.channel-pills.left { justify-content: flex-start; margin-bottom: 16px; }

.pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #cfd2f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s, background 0.18s;
}

.pill:hover {
  border-color: #ff5c7a;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 59, 92, 0.25);
}

.pill.off-air { opacity: 0.4; }

.pill.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 26px rgba(255, 59, 92, 0.45), 0 0 40px rgba(255, 122, 59, 0.2);
  transform: translateY(-2px) scale(1.05);
}

/* ===== Vinyl + now playing ===== */
.vinyl-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 26px;
  text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) , 0 1px 0 rgba(255,255,255,0.06) inset;
}

/* the disk holds the spinning vinyl with the play button as its center label */
.disk {
  position: relative;
  flex-shrink: 0;
  width: 84px; height: 84px;
}

.vinyl {
  width: 100%; height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ff5c7a 0 22px, #15131f 23px 24px, #221f31 24px),
    repeating-radial-gradient(circle at center, #1b1828 0 2px, #221f31 2px 4px);
  background-blend-mode: normal, normal;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
  position: relative;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}

.vinyl::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 40%);
}

body.playing .vinyl { animation-play-state: running; }

@keyframes spin { to { transform: rotate(360deg); } }

.np-text { flex: 1; min-width: 0; }

.np-text .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--muted2);
  margin-bottom: 4px;
}

.np-text .title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* equalizer bars */
.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  flex-shrink: 0;
}

.eq span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--accent1), var(--accent2));
  height: 20%;
  animation: eqbar 1s ease-in-out infinite;
  animation-play-state: paused;
  opacity: 0.35;
}

body.playing .eq span { animation-play-state: running; opacity: 1; }

/* when the analyser drives the bars, the fake animation must get out of the
   way — keyframes would override the live inline heights */
.eq.live span { animation: none; transition: height 0.05s linear; }

.eq span:nth-child(1) { animation-delay: 0s;    animation-duration: 0.9s; }
.eq span:nth-child(2) { animation-delay: 0.15s; animation-duration: 0.7s; }
.eq span:nth-child(3) { animation-delay: 0.3s;  animation-duration: 1.1s; }
.eq span:nth-child(4) { animation-delay: 0.1s;  animation-duration: 0.8s; }
.eq span:nth-child(5) { animation-delay: 0.25s; animation-duration: 1s; }

@keyframes eqbar {
  0%, 100% { height: 18%; }
  50%      { height: 100%; }
}

/* ===== Play button (center label of the vinyl) ===== */
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--accent1), var(--accent2));
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(255, 59, 92, 0.5),
    0 2px 0 rgba(150, 20, 40, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 4px 8px rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 1;
}

.play-btn svg {
  width: 16px; height: 16px;
  fill: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.play-btn .icon-play { margin-left: 1px; } /* triangles need a nudge to look centered */
.play-btn .icon-pause { display: none; }
body.playing .play-btn .icon-play { display: none; }
body.playing .play-btn .icon-pause { display: block; }

.play-btn:hover { transform: scale(1.12); }

.play-btn:active {
  transform: scale(0.94);
  box-shadow:
    0 4px 12px rgba(255, 59, 92, 0.4),
    0 1px 0 rgba(150, 20, 40, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* expanding pulse rings around the disk while playing */
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 92, 122, 0.5);
  opacity: 0;
  pointer-events: none;
}

@keyframes ripple {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

body.playing .ring { animation: ripple 2.2s ease-out infinite; }
body.playing .ring.r2 { animation-delay: 0.7s; }
body.playing .ring.r3 { animation-delay: 1.4s; }

.hint { color: var(--muted); font-size: 13px; margin: 14px 0 20px; transition: color 0.2s; }

.hint.warn {
  color: #ffb44d;
  font-size: 14px;
  font-weight: 600;
  animation: shake 0.4s ease;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.volume-row input { flex: 1; max-width: 200px; accent-color: #ff5c7a; transition: opacity 0.15s; }
.volume-row.muted input { opacity: 0.35; }

.mute-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: transform 0.15s ease, background 0.15s;
}

.mute-btn:hover { transform: scale(1.15); background: rgba(255, 255, 255, 0.08); }

.listeners { color: var(--muted2); font-size: 13px; }

.quality-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.qpill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.qpill:hover { color: #fff; border-color: rgba(43, 210, 255, 0.6); }

/* sleep timer + share */
.sleep-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.sleep-row select {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* the open dropdown list uses the OS's light background — the inherited
   light text color would be invisible on it */
.sleep-row select option {
  color: #111;
  background: #fff;
}

.sleep-left { font-size: 12px; color: var(--accent4); min-width: 0; }

.qpill.active {
  background: linear-gradient(135deg, var(--accent3), var(--accent4));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(43, 210, 255, 0.3);
}

.foot { margin-top: 14px; }
.foot a { color: var(--muted2); font-size: 12px; text-decoration: none; }
.foot a:hover { color: #fff; }

/* fixed page footer: copyright on the left, social buttons on the right.
   z-index sits below the chat panel/FAB (40) so it never covers the chat. */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  background: transparent;
  pointer-events: none; /* the bar itself is invisible; only its children react */
}

.site-copy,
.social-btn { pointer-events: auto; }

.site-copy { color: var(--muted2); font-size: 12px; }

.site-social { display: flex; align-items: center; gap: 10px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #cdd0ee;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.social-btn:hover { color: #fff; transform: translateY(-1px); }
.social-btn[aria-label*="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent;
}
.social-btn[aria-label*="Facebook"]:hover { background: #1877f2; border-color: transparent; }

/* on desktop the footer steps aside so it never slides under the chat column */
body.chat-open .site-footer { right: var(--chat-w); }

@media (max-width: 560px) {
  .site-footer { padding: 7px 12px; }
  .site-copy { font-size: 11px; }
  .social-btn { width: 30px; height: 30px; }
}

/* phones: chat is a bottom drawer + the FAB drops to the bottom corner,
   so hide the bar with the chat open and lift the FAB clear of it */
@media (max-width: 900px) {
  body.chat-open .site-footer { display: none; }
}

/* ===== Cookie consent banner ===== */
.consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(520px, calc(100vw - 32px));
  background: rgba(15, 12, 41, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.consent p { flex: 1; min-width: 220px; font-size: 13px; color: #cfd2f0; }
.consent a { color: #ff7a90; }
.consent-btns { display: flex; gap: 8px; }

/* ===== Upload progress ===== */
.progress {
  position: relative;
  margin-top: 12px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 18px rgba(255, 59, 92, 0.4);
  transition: width 0.2s ease;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ===== Privacy page prose ===== */
.prose ul { margin: 8px 0 0 20px; }
.prose li { margin-bottom: 8px; font-size: 14px; color: #c6c9e8; line-height: 1.5; }
.prose p { font-size: 14px; color: #c6c9e8; line-height: 1.5; }
.prose a { color: #ff7a90; }

/* ===== Forms & buttons ===== */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

input[type="text"], input[type="password"], input[type="email"] {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  border-color: #ff5c7a;
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18), 0 0 24px rgba(255, 59, 92, 0.15);
  transform: translateY(-1px);
}

.btn {
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 59, 92, 0.4), 0 2px 0 rgba(150, 20, 40, 0.7);
}

.btn.danger {
  background: rgba(255, 59, 92, 0.16);
  border: 1px solid rgba(255, 59, 92, 0.5);
  color: #ff7a90;
}

.btn.danger:hover { box-shadow: 0 8px 20px rgba(255, 59, 92, 0.25); }

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #cfd2f0;
}

.btn.small { padding: 6px 13px; font-size: 12px; }

.error {
  background: rgba(255, 59, 92, 0.15);
  border: 1px solid rgba(255, 59, 92, 0.5);
  color: #ff8298;
  border-radius: 12px;
  padding: 11px;
  margin-bottom: 12px;
  font-size: 14px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover { color: #fff; }

/* ===== Admin ===== */
body.admin { align-items: flex-start; padding-top: 48px; }
body.admin .floater { animation: none; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.admin-header h1 { font-size: 21px; }

/* section tabs */
.admin-nav {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.view { display: none; }
.view.active { display: block; animation: viewfade 0.25s ease; }

@keyframes viewfade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.panel:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 92, 122, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 59, 92, 0.07);
}

/* drag & drop target while files hover over it */
.panel.dragging {
  border-color: rgba(43, 210, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(43, 210, 255, 0.35), 0 0 40px rgba(43, 210, 255, 0.15);
}

.overview { width: 100%; border-collapse: collapse; font-size: 14px; }

.overview th {
  text-align: left;
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 10px;
}

.overview td { padding: 9px 10px; }
.overview tbody tr { transition: background 0.15s; }
.overview tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
.overview tbody tr:hover { background: rgba(255, 92, 122, 0.08); }

.onair-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.count { color: var(--muted2); font-weight: 400; }

#uploadForm { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
#fileInput { color: #b8bce0; font-size: 13px; }

.track-list { list-style: none; }

.track-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  transition: transform 0.15s ease, background 0.15s;
}

.track-list li > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
.track-list li:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(4px); }

.track-list li.playing {
  background: rgba(255, 122, 59, 0.12);
  border: 1px solid rgba(255, 122, 59, 0.4);
  box-shadow: 0 0 22px rgba(255, 122, 59, 0.12);
}

/* ===== Like button ===== */
.like-btn {
  flex-shrink: 0;
  border: 1px solid rgba(255, 59, 92, 0.5);
  background: rgba(255, 59, 92, 0.12);
  color: #ff7a90;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}

.like-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(255, 59, 92, 0.35);
}

.like-btn.liked, .like-btn:disabled {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  cursor: default;
}

/* ===== Recently played ===== */
.recent {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 16px;
  margin: -12px 0 24px;
  text-align: left;
}

.recent .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--muted2);
  margin-bottom: 6px;
}

.recent ul { list-style: none; }

.recent li {
  font-size: 13px;
  color: #b8bce0;
  padding: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent li::before { content: '↻ '; color: var(--muted2); }

/* ===== Schedule & password forms ===== */
.sched-form, .pass-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sched-form select, .pass-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
}

.sched-form select option { color: #111; background: #fff; }

.sched-form label { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.sched-form #schedFolder { flex: 1; min-width: 180px; }

.panel code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
}

/* ===== Stats chart ===== */
.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  margin: 14px 0;
}

.stats-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.stats-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(to top, var(--accent3), var(--accent4));
  box-shadow: 0 0 14px rgba(122, 92, 255, 0.3);
  transition: filter 0.15s;
}

.stats-bar:hover { filter: brightness(1.3); }

.stats-col span { font-size: 10px; color: var(--muted2); }

/* ===== Live chat: fixed sidebar on the right, like YouTube ===== */
:root { --chat-w: 340px; }

/* make room for the sidebar so the player stays centered in what's left */
body.chat-open { padding-right: calc(var(--chat-w) + 24px); }

.chat-side {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--chat-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgba(10, 8, 22, 0.55);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

#chatToggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

#chatToggle:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

#chatList {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#chatList:empty::after {
  content: 'No messages yet — say hi 👋';
  color: var(--muted2);
  font-size: 13px;
}

#chatList li {
  font-size: 13px;
  color: #d9dcf5;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#chatList li strong { margin-right: 7px; }

/* private moderator notices */
#chatList li.system {
  color: #ffb44d;
  font-size: 12px;
  background: rgba(255, 180, 77, 0.08);
  border-left: 2px solid rgba(255, 180, 77, 0.6);
  border-radius: 8px;
  padding: 5px 8px;
  margin: 0 -8px;
}

/* /help command card */
#chatList li.help-card { padding: 8px 10px; }

.help-title {
  font-weight: 700;
  font-size: 12px;
  color: #ffcf8a;
  margin-bottom: 6px;
}

.help-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 2px 0;
}

.help-row code {
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 11px;
  color: #ffd9a0;
}

.help-row span { color: #c6c9e8; font-size: 12px; }

.chat-name { cursor: pointer; }
.chat-name:hover { text-decoration: underline; }

/* @mentions inside messages */
.mention {
  color: var(--accent4);
  font-weight: 700;
  background: rgba(43, 210, 255, 0.12);
  border-radius: 6px;
  padding: 0 4px;
}

.mention.me { color: #ff8aa0; background: rgba(255, 92, 122, 0.18); }

/* a message that mentions you */
#chatList li.me-mention {
  background: rgba(255, 92, 122, 0.1);
  border-left: 2px solid rgba(255, 92, 122, 0.7);
  border-radius: 8px;
  padding: 4px 8px;
  margin: 0 -8px;
}

/* verified blue tick next to a name */
.verified-tick {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 5px;
  margin-left: -2px;
}

.verified-tick svg { display: block; }

/* membership badge next to a name */
.chat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #0c0e1f;
  background: linear-gradient(135deg, #2bd2ff, #8a7dff);
  border-radius: 999px;
  padding: 2px 7px;
  margin-right: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* popup shown when a name is clicked */
.user-card {
  position: absolute;
  z-index: 1200;
  min-width: 180px;
  max-width: 240px;
  background: #14162b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  padding: 12px;
  font-size: 13px;
  color: #d9dcf5;
}

.user-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.user-card-head strong { font-size: 15px; }

.user-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 12px;
}

.user-card-row .uc-label { color: #8b8fb5; }
.user-card-row .uc-val { color: #eef0ff; font-weight: 600; }

.user-card-btn {
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2bd2ff, #8a7dff);
  color: #0c0e1f;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.user-card-btn:hover { filter: brightness(1.08); }

/* @name suggestions above the input */
.mention-panel {
  position: absolute;
  bottom: 64px;
  left: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(15, 12, 41, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mention-panel button {
  background: none;
  border: none;
  color: #d9dcf5;
  text-align: left;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s;
}

.mention-panel button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

#chatForm {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#chatForm input { padding: 9px 12px; font-size: 13px; border-radius: 10px; }
#chatForm .btn { min-width: 58px; } /* "Send" and the countdown digits same width */
#chatForm .btn:disabled { opacity: 0.55; cursor: default; transform: none; }
#chatText { flex: 1; min-width: 0; }

#emoteBtn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  padding: 0 10px;
  transition: border-color 0.15s, transform 0.15s;
}

#emoteBtn:hover { border-color: #ff5c7a; transform: scale(1.08); }

.emote-panel {
  position: absolute;
  bottom: 64px;
  left: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(15, 12, 41, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.emote-panel button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  transition: background 0.12s, transform 0.12s;
}

.emote-panel button:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.18); }

.chat-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 0;
  font-size: 12px;
  color: var(--muted);
}

.chat-user-row strong { color: #fff; }

#chatLogout {
  background: none;
  border: none;
  color: var(--muted2);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

#chatLogout:hover { color: #fff; }

.chat-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-auth-title { font-size: 13px; font-weight: 600; color: #cfd2f0; }
.chat-auth input { padding: 9px 12px; font-size: 13px; border-radius: 10px; }
.chat-auth-btns { display: flex; gap: 8px; }

.chat-note { margin: 0; padding: 8px 16px 0; font-size: 12px; color: #ffb44d; }
.chat-note:empty { padding: 0; }

/* ===== Registration popup ===== */
.reg-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 4, 12, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reg-modal {
  position: relative;
  width: min(400px, 100%);
  background: linear-gradient(160deg, rgba(34, 28, 68, 0.97), rgba(12, 10, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  animation: viewfade 0.2s ease;
}

.reg-modal h2 {
  font-size: 17px;
  color: #fff;
  text-transform: none;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
}

.reg-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.reg-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.reg-field { position: relative; }
.reg-field input { width: 100%; padding-right: 110px; }

.reg-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.reg-status.ok { color: #7dffa8; }
.reg-status.bad { color: #ff7a90; }

.reg-rules {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  font-size: 11px;
  color: var(--muted2);
}

.reg-rules li::before { content: '✗ '; color: #ff7a90; font-weight: 700; }
.reg-rules li.ok { color: #cfd2f0; }
.reg-rules li.ok::before { content: '✓ '; color: #7dffa8; }

.reg-note { margin: 0; font-size: 12px; color: #ffb44d; min-height: 15px; }

/* floating button to reopen a hidden chat */
#chatFab {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  background: rgba(15, 12, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s, transform 0.15s;
}

#chatFab:hover { border-color: #ff5c7a; transform: translateY(-2px); }

/* the right ad rail steps aside when the chat is open */
body.chat-open .ad-rail.right { right: calc(var(--chat-w) + 18px); }

@media (max-width: 1500px) {
  body.chat-open .ad-rail { display: none; }
}

/* phones: the chat becomes a bottom drawer instead of a side column */
@media (max-width: 900px) {
  body.chat-open { padding-right: 24px; padding-bottom: 47vh; }

  .chat-side {
    top: auto;
    left: 0;
    width: 100%;
    height: 45vh;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px 18px 0 0;
  }

  #chatFab { top: 18px; bottom: auto; }
}

/* ===== Ads ===== */
.ad-slot {
  position: relative;
  margin-top: 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.ad-slot a { display: block; }

.ad-slot img {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}

/* side ad rails: pinned to the screen edges, hidden on narrow viewports */
.ad-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  z-index: 5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.ad-rail.left { left: 18px; }
.ad-rail.right { right: 18px; }
.ad-rail a { display: block; }

.ad-rail img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* not enough room next to the player card — keep only the bottom banner */
@media (max-width: 1100px) {
  .ad-rail { display: none; }
}

.ad-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  color: #cfd2f0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.verify-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.verify-form input {
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #eef0ff;
  font-size: 14px;
}

.ad-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ad-form #adImageInput { color: #b8bce0; font-size: 13px; }

/* one link input per selected banner image */
.ad-url-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ad-url-rows:empty { display: none; }
.ad-url-row { display: flex; gap: 10px; align-items: center; }

.ad-url-row span {
  flex-shrink: 0;
  max-width: 200px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-url-row input { flex: 1; min-width: 180px; }

.ad-list { list-style: none; margin-top: 14px; }

.ad-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
}

.ad-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }

.ad-list img {
  width: 110px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ad-list .ad-url {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* reduced motion: calm everything down */
@media (prefers-reduced-motion: reduce) {
  .floater, .logo, .orb, .note, .card::before, .live-badge { animation: none !important; }
  .card { transition: none; }
}
