:root {
  --bg: #f7f4ff;
  --card: rgba(255, 255, 255, 0.88);
  --text: #21182f;
  --muted: #746985;
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --line: rgba(94, 65, 145, 0.16);
  --danger: #e11d48;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 18px 45px rgba(66, 35, 120, 0.14);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .20), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(244, 114, 182, .16), transparent 28rem),
    var(--bg);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 18px; }
.brand span { color: var(--muted); font-size: 13px; }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero { padding: 34px 0 22px; }
.hero-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(248,245,255,.88));
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 52px); line-height: 1.05; }
.hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.announcement { margin-top: 16px; padding: 13px 15px; background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.12); border-radius: 14px; color: #4c1d95; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 8px 22px rgba(70, 45, 120, .08); }
.stat b { font-size: 30px; display: block; }
.stat span { color: var(--muted); font-size: 13px; }
.main { padding-bottom: 54px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.tools { display: grid; grid-template-columns: 1.5fr .8fr .8fr auto auto; gap: 10px; align-items: center; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: white; padding: 12px 13px; outline: none; color: var(--text); }
.field:focus { border-color: rgba(124,58,237,.55); box-shadow: 0 0 0 4px rgba(124,58,237,.10); }
.btn { border: 0; border-radius: 13px; padding: 12px 15px; background: #fff; color: var(--text); border: 1px solid var(--line); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; white-space: nowrap; }
.btn.primary { background: linear-gradient(135deg, var(--primary), #a855f7); color: white; border-color: transparent; box-shadow: 0 9px 18px rgba(124,58,237,.22); }
.btn.primary:hover { background: linear-gradient(135deg, var(--primary-dark), #9333ea); }
.btn.danger { background: var(--danger); color: white; border-color: transparent; }
.btn.ghost { background: rgba(255,255,255,.55); }
.btn.small { padding: 8px 10px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.chip.active { color: white; background: var(--primary); border-color: transparent; }
.table-wrap { overflow: auto; border-radius: 16px; border: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; background: #faf7ff; color: #4c1d95; font-size: 13px; z-index: 1; }
tr { transition: .16s; }
tbody tr:hover { background: #faf5ff; }
tbody tr.copied { background: rgba(22, 163, 74, .12); }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: #f3e8ff; color: #6d28d9; font-size: 12px; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.song-title { font-weight: 700; }
.song-note { color: var(--muted); font-size: 13px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 10px; }
.recent-item { border: 1px solid var(--line); background: white; border-radius: 13px; padding: 10px 12px; min-width: 130px; }
.recent-item b { display: block; }
.recent-item span { color: var(--muted); font-size: 12px; }
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%) translateY(-15px); opacity: 0; background: #111827; color: white; border-radius: 13px; padding: 12px 16px; z-index: 99; box-shadow: 0 16px 30px rgba(0,0,0,.2); transition: .22s; max-width: min(90vw, 520px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 0; }
.admin-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 10px; }
textarea.field { min-height: 120px; resize: vertical; }
.login { max-width: 430px; margin: 70px auto; }
.admin-table input, .admin-table select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.admin-table td { padding: 8px; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #f4f1fb; padding: 2px 6px; border-radius: 6px; }
.help { color: var(--muted); font-size: 13px; line-height: 1.65; }
.progress-line { height: 10px; background: #eee7fa; border-radius: 999px; overflow: hidden; }
.progress-line > i { display:block; height:100%; background: var(--primary); width:0%; transition: width .2s; }
@media (max-width: 900px) {
  .hero-card, .admin-grid { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: 100%; }
  .nav-actions .btn { width: auto; }
}
@media (max-width: 520px) {
  .hero-card { padding: 18px; border-radius: 22px; }
  .panel { padding: 14px; }
  th, td { padding: 10px; }
  .stat b { font-size: 24px; }
}
