[hidden] { display: none !important; }
:root {
  --bg: #0d0b14; --panel: #17141f; --panel-2: #1f1b2a; --line: #2c2639;
  --text: #ece9f3; --muted: #9a93ab; --accent: #8b5cf6; --accent-2: #a78bfa; --danger: #ef4444; --ok: #22c55e;
  --radius: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4fb; --panel: #ffffff; --panel-2: #f1eef8; --line: #e2dcef;
    --text: #1b1626; --muted: #6b6380; --accent: #7c3aed; --accent-2: #6d28d9;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand img, .brand .logo { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.icon { padding: 8px 11px; min-width: 40px; }
.btn:disabled { opacity: .5; cursor: default; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.muted { color: var(--muted); }
input, select {
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
footer { padding: 32px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* landing */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 520px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.player-art { aspect-ratio: 1; border-radius: 24px; background: radial-gradient(circle at 30% 30%, var(--accent), transparent 60%), radial-gradient(circle at 70% 70%, #ec4899, transparent 55%), var(--panel); display: grid; place-items: center; border: 1px solid var(--line); }
.player-art img { width: 44%; border-radius: 50%; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.features h3 { margin: 8px 0 4px; font-size: 16px; }
.features p { margin: 0; color: var(--muted); font-size: 14px; }
.cmds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.cmd code { color: var(--accent-2); font-weight: 600; }
.cmd { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
h2 { font-size: 22px; margin: 32px 0 12px; }

/* dashboard */
.login { max-width: 380px; margin: 12vh auto; display: grid; gap: 12px; text-align: center; }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding-bottom: 24px; }
.servers { display: grid; gap: 6px; align-content: start; }
.server { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; color: var(--text); background: none; font: inherit; text-align: left; width: 100%; }
.server:hover { background: var(--panel); }
.server.active { background: var(--panel); border-color: var(--line); }
.server .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); flex: none; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.server .ico img { width: 100%; height: 100%; }
.server .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; }
.np img.art { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; background: var(--panel-2); }
.np .title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.25; word-break: break-word; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 14px 0 4px; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .9s linear; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.controls input[type=range] { padding: 0; width: 120px; accent-color: var(--accent); }
.add { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.add input[type=text] { flex: 1 1 260px; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.queue li:last-child { border-bottom: 0; }
.queue .n { color: var(--muted); font-size: 13px; text-align: right; }
.queue .t { min-width: 0; }
.queue .t div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .acts { display: flex; gap: 4px; opacity: .6; }
.queue li:hover .acts { opacity: 1; }
.queue .acts button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 14px; }
.queue .acts button:hover { background: var(--panel-2); color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.err { border-color: var(--danger); }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.section-h h3 { margin: 0; font-size: 16px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .player-art { max-width: 280px; }
  .features { grid-template-columns: 1fr; }
  .cmds { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .servers { grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); overflow-x: auto; }
  .np { grid-template-columns: 96px 1fr; }
  .np img.art { width: 96px; height: 96px; }
  .np .title { font-size: 18px; }
}
.np .art-empty { width: 160px; height: 160px; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; font-size: 48px; }
@media (max-width: 820px) { .np .art-empty { width: 96px; height: 96px; font-size: 32px; } }

/* ---------- header actions + settings ---------- */
.top-acts { display: flex; gap: 8px; }
.top-acts form { margin: 0; }
.settings { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.form { display: grid; gap: 12px; }
.form h3 { margin: 0; }
.form p { margin: 0; }
.field { display: grid; gap: 6px; }
.field .lbl { font-weight: 600; font-size: 14px; }
.field input { width: 100%; box-sizing: border-box; }
.hint { font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status.bad { color: #f87171; }
.status.bad .dot { background: #f87171; }
.field textarea { width: 100%; box-sizing: border-box; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); resize: vertical; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
