* { box-sizing: border-box; }
:root {
  --bg: #141518; --panel: #1d2024; --panel2: #24282e;
  --text: #e6e8ec; --muted: #8b929c; --accent: #f7971e; --border: #2c313a;
}
html, body { height: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 16px; }
.brand span { color: var(--muted); font-weight: 400; }
.proj { display: flex; gap: 8px; align-items: center; }
.btn-upload { background: var(--accent); color: #141518; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.on { background: var(--accent); color: #141518; border-color: var(--accent); }
.main { flex: 1; display: flex; min-height: 0; }
.setlist { width: 240px; flex: none; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
.setlist-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); }
.setlist ul { list-style: none; margin: 0; padding: 0; }
.song { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.song:hover { background: var(--panel2); }
.song.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.song-num { color: var(--muted); font-size: 12px; width: 18px; text-align: right; }
.song-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-count { color: var(--muted); font-size: 12px; }
.song-move { display: flex; gap: 3px; }
.mv { padding: 2px 6px; font-size: 11px; }
.setlist-empty { padding: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.player { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.transport { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.trow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time { font-variant-numeric: tabular-nums; }
.ab { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.speed { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.tracks { flex: 1; overflow-y: auto; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.track { border-bottom: 1px solid var(--border); }
.thead { display: flex; align-items: center; gap: 10px; padding: 6px 16px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tname { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.c { background: var(--panel2); color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; cursor: pointer; font-size: 12px; text-decoration: none; line-height: 1.4; display: inline-block; }
.c.on { color: #141518; }
.c.solo.on { background: #ffd23e; border-color: #ffd23e; }
.c.mute.on { background: #ff5c5c; border-color: #ff5c5c; color: #fff; }
.vol { width: 80px; }
.wave { height: 70px; position: relative; }
.wave canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.wave .wf { cursor: crosshair; }
.wave .ov { pointer-events: none; }

.song-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.song-edit { color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 2px; }
.song-edit:hover { color: var(--accent); }

.sectionbar { display: flex; gap: 8px; padding: 6px 16px; background: var(--panel); border-bottom: 1px solid var(--border); overflow-x: auto; }
.sec-chip { background: var(--panel2); color: #4da6ff; border: 1px solid var(--border); border-radius: 5px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; flex: none; }
.sec-chip:hover { border-color: #4da6ff; }

.song.hidden { opacity: 0.45; }
.song-hidden-badge { font-size: 10px; color: #ffb84d; background: rgba(255,184,77,0.12); border-radius: 3px; padding: 1px 5px; flex: none; }
.song-hide { cursor: pointer; font-size: 13px; margin-left: 4px; opacity: 0.85; flex: none; }
.song-hide:hover { opacity: 1; }

.topbar select.setlist-sel { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 14px; cursor: pointer; max-width: 200px; }

.topbar .unlock { display:flex; align-items:center; gap:8px; margin-left:auto; }
.topbar .unlock input { background:var(--panel2); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:6px 10px; font-size:14px; width:150px; }
.topbar .unlock #setlistName { color:var(--accent); font-size:13px; }

/* ===== 移动端适配 ===== */
.menu-btn { display: none; }
.backdrop { display: none; }

@media (max-width: 768px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0; font-size: 20px; flex: none;
  }
  .topbar { flex-wrap: wrap; row-gap: 8px; padding: 8px 12px; }
  .brand { flex: 1; }
  .admin-link { order: 2; margin-left: 0; }
  .unlock { order: 3; width: 100%; margin-left: 0; }
  .brand { font-size: 15px; }
  .unlock { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .unlock input { width: 120px; flex: 1; min-width: 90px; }
  .setlist {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 280px; max-width: 84vw; z-index: 200;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 3px 0 18px rgba(0,0,0,0.55);
    border-right: 1px solid var(--border);
  }
  .setlist.open { transform: translateX(0); }
  .backdrop.show {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 150;
  }
  .transport { padding: 8px 10px; gap: 6px; }
  .transport .btn { padding: 8px 11px; font-size: 13px; }
  .speed { gap: 4px; }
  .vol { width: 70px; }
  .wave { height: 60px; }
  .thead { padding: 6px 10px; gap: 8px; }
  .tctrl .c { padding: 6px 9px; font-size: 12px; }
}

/* ===== 传送栏两行 + 管理入口 ===== */
.transport .big { font-size: 16px; padding: 8px 16px; }
#playBtn { background: var(--accent); color: #141518; border-color: var(--accent); font-weight: 700; }
#playBtn:hover { filter: brightness(1.08); }
.admin-link { color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 12px; line-height: 1; border: 1px solid var(--border); border-radius: 6px; flex: none; }
.admin-link:hover { color: var(--accent); border-color: var(--accent); }
