:root {
  --bg: #0b1020;
  --panel: rgba(255,255,255,.08);
  --panel-strong: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.14);
  --text: #f8fafc;
  --muted: #aeb9ca;
  --primary: #8b5cf6;
  --primary-2: #22d3ee;
  --danger: #fb7185;
  --ok: #34d399;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(139,92,246,.35), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(34,211,238,.22), transparent 28rem),
    linear-gradient(135deg, #070b17, #111827 52%, #090d18);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }
a { color: #93c5fd; }
.app-shell { max-width: 1240px; margin: 0 auto; padding: 20px; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0 22px;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: var(--shadow); font-weight: 900; }
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.06); }
.nav button, .ghost, .small, .secondary, .primary {
  color: var(--text); border-radius: 14px; padding: 10px 14px; background: transparent;
}
.nav button.active, .primary { background: linear-gradient(135deg, var(--primary), #6366f1); box-shadow: 0 12px 30px rgba(99,102,241,.25); }
.secondary { background: rgba(255,255,255,.1); border: 1px solid var(--line); }
.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.small { padding: 7px 10px; font-size: 12px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.small.liked { background: rgba(139,92,246,.22); border-color: rgba(139,92,246,.55); }
.danger { color: #fecdd3; border-color: rgba(251,113,133,.45); }
.full { width: 100%; margin-top: 8px; }
.hidden { display: none !important; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.055));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.big-card { min-height: 520px; display: flex; flex-direction: column; justify-content: center; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .7fr); gap: 22px; align-items: stretch; }
.hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: .96; margin: 10px 0 18px; letter-spacing: -0.06em; }
.eyebrow { color: #c4b5fd; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.muted { color: var(--muted); line-height: 1.55; }
.feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.feature-row span { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--line); }
.auth-card h2, .card h2 { margin: 0 0 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
label { display: block; color: var(--muted); font-size: 13px; margin: 12px 0; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 12px 13px;
  color: var(--text); background: rgba(5,8,18,.7); border: 1px solid var(--line); border-radius: 14px;
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
.room-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.room-hero h1 { margin: 6px 0; font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.05em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-width: 320px; }
.stats div { padding: 18px; border-radius: 22px; background: rgba(255,255,255,.07); border: 1px solid var(--line); text-align: center; }
.stats strong { display: block; font-size: 30px; }
.stats span { color: var(--muted); font-size: 12px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 18px 0; }
.section-head h2 { margin: 0 0 5px; }
.section-head.tight { margin-top: 0; align-items: center; }
.controls { display: grid; grid-template-columns: minmax(220px, 1.2fr) 130px 150px; gap: 10px; align-items: end; min-width: 520px; }
.track-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.track-card { overflow: hidden; border-radius: 26px; border: 1px solid var(--line); background: rgba(255,255,255,.07); box-shadow: var(--shadow); }
.cover { position: relative; aspect-ratio: 1.35; background-size: cover; background-position: center; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(0,0,0,.5)); }
.cover span { position: absolute; z-index: 1; left: 12px; bottom: 12px; padding: 6px 9px; border-radius: 999px; background: rgba(0,0,0,.45); font-size: 12px; }
.track-body { padding: 16px; }
.track-body h3 { margin: 0; font-size: 18px; }
.artist { margin: 4px 0 10px; color: #cbd5e1; }
.desc { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 38px; }
a.external-link { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.07); text-decoration: none; }
audio { width: 100%; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.track-actions, .item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.two-col { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 18px; }
.list { display: grid; gap: 10px; }
.spaced { margin-top: 16px; }
.request-item, .member-row, .playlist-item, .mini-track {
  display: grid; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.055);
}
.request-item { grid-template-columns: minmax(0, 1fr) auto; }
.request-item .item-actions { grid-column: 1 / -1; }
.request-item p { margin: 4px 0; color: var(--muted); }
.status { padding: 6px 10px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.status.pending { color: #fde68a; }
.status.approved, .status.uploaded { color: #bbf7d0; }
.status.rejected { color: #fecdd3; }
.admin-note { color: #d8b4fe !important; }
.member-row { grid-template-columns: 1fr auto; }
.playlist-item { grid-template-columns: 1fr auto; }
.playlist-open { text-align: left; color: var(--text); background: transparent; padding: 0; display: grid; gap: 2px; }
.playlist-open span { color: var(--muted); font-size: 12px; }
.mini-track { grid-template-columns: 52px 1fr auto; }
.mini-track img { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; }
.mini-track p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.empty { grid-column: 1 / -1; padding: 42px; border: 1px dashed var(--line); border-radius: 24px; text-align: center; color: var(--muted); background: rgba(255,255,255,.04); }
.empty.compact { padding: 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 360px; padding: 14px 16px; border-radius: 18px; background: rgba(15,23,42,.94); border: 1px solid var(--line); box-shadow: var(--shadow); }
.toast.error { border-color: rgba(251,113,133,.55); color: #fecdd3; }
@media (max-width: 980px) {
  .auth-grid, .two-col, .track-grid { grid-template-columns: 1fr; }
  .room-hero, .section-head { align-items: stretch; flex-direction: column; }
  .stats, .controls { min-width: 0; grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; }
  .nav { overflow-x: auto; }
}

.upload-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 20px;
  background: rgba(15, 23, 42, .035);
}
.upload-box.subtle { background: rgba(255,255,255,.55); }
.upload-box h3 { margin: 0 0 12px; font-size: 1rem; }
.small-text { font-size: .84rem; }
input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(100,116,139,.45);
  background: rgba(255,255,255,.8);
}
.label-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.single-room-auth .auth-card { align-self: center; }
.upload-box.subtle { background: rgba(255,255,255,.055); }
input[type="file"] { color: var(--text); background: rgba(5,8,18,.55); }
.role-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
button.small.active { border-color: rgba(167, 139, 250, .7); background: rgba(124, 58, 237, .28); color: #ede9fe; }
.badge { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.08); font-size: 12px; color: var(--muted); }
.badge.owner { color: #fde68a; border-color: rgba(253, 230, 138, .4); background: rgba(253, 230, 138, .08); }
.member-row p { margin: 4px 0 0; }
.self-label {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .35);
  color: #a5f3fc;
  background: rgba(34, 211, 238, .08);
  font-size: 11px;
  font-weight: 800;
}
