:root {
  --bg: #0f1020;
  --panel: #1a1b33;
  --panel2: #232544;
  --accent: #7c5cff;
  --accent2: #ff5c8a;
  --text: #eef0ff;
  --muted: #9aa0c8;
  --line: #2c2e50;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #23244a 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }
.brand { text-align: center; padding: 24px 0 8px; }
.brand h1 { font-size: 30px; letter-spacing: -1px; }
.brand h1 span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { color: var(--muted); margin-top: 6px; font-size: 14px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 16px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }

input, button { font: inherit; }
input[type=text], input[type=search] {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); outline: none;
}
input::placeholder { color: var(--muted); }
button {
  cursor: pointer; border: none; border-radius: 12px; padding: 13px 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700;
  transition: transform .05s ease, opacity .2s;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: var(--panel2); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.mt { margin-top: 12px; }

.qrbox { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qrbox #qr { background: #fff; padding: 12px; border-radius: 12px; }
.code { font-size: 26px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.hint { color: var(--muted); font-size: 13px; text-align: center; }

#player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
#player-wrap iframe { width: 100%; height: 100%; border: 0; }
.nowplaying { display: flex; align-items: center; gap: 12px; }
.nowplaying img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.np-meta { min-width: 0; }
.np-meta .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta .c { color: var(--muted); font-size: 13px; }

ul.list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
ul.list li {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  background: var(--panel2); border-radius: 12px; border: 1px solid var(--line);
}
ul.list li img { width: 56px; height: 42px; object-fit: cover; border-radius: 7px; flex: none; }
ul.list li .meta { min-width: 0; flex: 1; }
ul.list li .meta .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.list li .meta .c { color: var(--muted); font-size: 12px; }
ul.list li .dur { color: var(--muted); font-size: 12px; flex: none; }
ul.list li button { padding: 8px 12px; font-size: 13px; flex: none; }
ul.list li button.del { padding: 6px 10px; font-size: 14px; line-height: 1; color: var(--muted); }
ul.list li button.del:hover { color: #ff6b6b; border-color: #ff6b6b; }
ul.list li.now { border-color: var(--accent); background: linear-gradient(90deg, rgba(124,92,255,0.16), var(--panel2)); }
ul.list li.now .meta .c { color: var(--accent); font-weight: 600; }

.empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; color: var(--muted); background: var(--panel2); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff5c5c; margin-right: 5px; }
.status-dot.on { background: #43e08a; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #000c; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.toast.show { opacity: 1; }
