/* ══════════════════════════════════════════════════════════════
   繁星 DJ Medley v5.0 — Design System
   深空蓝紫渐变 + 暖橘点缀 · 高级质感
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  height: 100%; overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
input { font-family: inherit; }

:root {
  --bg-base: #0f0a1a;
  --bg-surface: #1a1128;
  --bg-elevated: #221835;
  --bg-highlight: #2d1f4a;
  --bg-press: #3a2a5c;
  --color-primary: #8b5cf6;
  --color-primary-hover: #a78bfa;
  --color-primary-dim: rgba(139, 92, 246, 0.12);
  --color-accent: #f97316;
  --color-accent-hover: #fb923c;
  --color-accent-dim: rgba(249, 115, 22, 0.10);
  --text-primary: #ede9f6;
  --text-secondary: rgba(237, 233, 246, 0.7);
  --text-tertiary: rgba(237, 233, 246, 0.45);
  --text-disabled: rgba(237, 233, 246, 0.25);
  --border-subtle: rgba(168, 140, 220, 0.10);
  --border-default: rgba(168, 140, 220, 0.16);
  --border-strong: rgba(168, 140, 220, 0.24);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px;
  --radius-lg: 12px; --radius-xl: 16px; --radius-full: 9999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --text-xs: 0.6875rem; --text-sm: 0.75rem; --text-base: 0.875rem;
  --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.375rem;
  --text-2xl: 1.75rem; --text-3xl: 2.25rem;
  --weight-normal: 400; --weight-medium: 500;
  --weight-semibold: 600; --weight-bold: 700; --weight-black: 900;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms; --duration-normal: 250ms; --duration-slow: 400ms;
  --z-base: 1; --z-sticky: 10; --z-overlay: 100;
  --z-modal: 1000; --z-toast: 2000;
}


[data-theme="light"] {
  --bg-base: #f8f6fc;
  --bg-surface: #ede9f6;
  --bg-elevated: #e2ddf0;
  --bg-highlight: #d5cee6;
  --bg-press: #c5bcd8;
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-dim: rgba(124, 58, 237, 0.10);
  --color-accent: #ea580c;
  --color-accent-hover: #c2410c;
  --color-accent-dim: rgba(234, 88, 12, 0.08);
  --text-primary: #1a1028;
  --text-secondary: rgba(26, 16, 40, 0.65);
  --text-tertiary: rgba(26, 16, 40, 0.45);
  --text-disabled: rgba(26, 16, 40, 0.25);
  --border-subtle: rgba(124, 58, 237, 0.12);
  --border-default: rgba(124, 58, 237, 0.18);
  --border-strong: rgba(124, 58, 237, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.14);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168, 140, 220, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 140, 220, 0.25); }

.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.015); opacity: 0.85; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.3); } 50% { box-shadow: 0 0 24px rgba(249, 115, 22, 0.3); } }
@keyframes ripple { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.loading-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg-highlight);
  border-top-color: var(--color-primary);
  animation: breathe 1.5s ease-in-out infinite;
}

button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-xs); }

.modal {
  position: fixed; inset: 0; background: rgba(15, 10, 26, 0.7);
  display: none; align-items: center; justify-content: center;
  z-index: var(--z-modal); backdrop-filter: blur(12px);
}
.modal.active { display: flex; }
.modal-content {
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle); width: 90%; max-width: 420px;
  max-height: 85vh; overflow-y: auto;
  animation: fadeInScale var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-xl);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; background: var(--bg-elevated); z-index: 1;
}
.modal-header h3 { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); color: var(--text-secondary);
  transition: background var(--duration-fast) var(--ease-in-out);
}
.modal-close:hover { background: var(--bg-highlight); color: var(--text-primary); }
.modal-body { padding: var(--space-5); }
.modal-body p { margin-bottom: var(--space-2); color: var(--text-secondary); font-size: var(--text-base); line-height: 1.7; }
.modal-body li { color: var(--text-secondary); font-size: var(--text-base); margin-bottom: var(--space-1); margin-left: var(--space-4); line-height: 1.7; }

.loading-toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--bg-elevated); padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full); border: 1px solid var(--border-default);
  display: none; align-items: center; gap: var(--space-2);
  z-index: var(--z-toast); font-size: var(--text-base); font-weight: var(--weight-medium);
  backdrop-filter: blur(16px); box-shadow: var(--shadow-lg);
  color: var(--text-primary); white-space: nowrap;
}
.loading-toast.active { display: flex; animation: fadeIn var(--duration-fast) var(--ease-out); }

.footer-brand {
  font-weight: var(--weight-bold); letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

