/* ============================================
   音乐直链站 Design System v3
   极简 · 克制 · 品质
   ============================================ */

:root {
  /* Colors - Refined Dark Palette */
  --bg: #08080f;
  --bg-soft: #0d0d18;
  --bg2: #141428;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --surface-active: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.04);

  --text: #f0f0f5;
  --text-secondary: rgba(240,240,245,0.65);
  --text-muted: rgba(240,240,245,0.35);

  /* Accent - Warm Violet */
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-dim: rgba(167,139,250,0.12);
  --accent-glow: rgba(167,139,250,0.18);

  /* Backward compat aliases */
  --bg-secondary: var(--surface);
  --border-color: var(--border);
  --text-primary: var(--text);
  --text-secondary: var(--text-secondary);
}

/* Light Theme */
[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-soft: #ffffff;
  --bg2: #ffffff;
  --surface: rgba(0,0,0,0.02);
  --surface-hover: rgba(0,0,0,0.04);
  --surface-active: rgba(0,0,0,0.06);
  --border: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.04);

  --text: #1a1a2e;
  --text-secondary: rgba(26,26,46,0.6);
  --text-muted: rgba(26,26,46,0.35);

  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-dim: rgba(124,58,237,0.1);
  --accent-glow: rgba(124,58,237,0.15);

  --green: #059669;
  --green-dim: rgba(5,150,105,0.1);
  --red: #dc2626;
  --red-dim: rgba(220,38,38,0.1);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px var(--accent-glow);
}

:root {
  /* Semantic */
  --green: #34d399;
  --green-dim: rgba(52,211,153,0.12);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.12);
  --orange: #fbbf24;

  /* Spacing Scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radius */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-normal: 250ms ease;
  --t-slow: 400ms ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-size: 15px;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent-dim); color: var(--text); }

/* ============================================
   Typography
   ============================================ */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.text-gradient {
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 30%, #818cf8 70%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.section { padding: var(--s-8) 0; }
.section-sm { padding: var(--s-6) 0; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: 56px;
  background: var(--bg); opacity: 0.95;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 var(--s-5);
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  font-size: 1.05rem; font-weight: 700; color: var(--accent);
  display: flex; align-items: center; gap: var(--s-2);
  letter-spacing: -0.01em;
  text-shadow: 0 0 20px var(--accent-dim);
}

/* Hamburger menu button (mobile) */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text); font-size: 1.3rem;
  padding: 4px 10px; border-radius: var(--radius-sm);
  cursor: pointer; line-height: 1;
}
.nav-toggle:hover { background: var(--surface-hover); }

.nav-links {
  display: flex; align-items: center; gap: 2px;
}

.nav-links a,
.nav-links button {
  font-size: 0.875rem; padding: 8px 16px; border-radius: var(--radius-sm);
  color: var(--text-secondary); background: none; border: none; cursor: pointer;
  transition: all var(--t-fast); font-weight: 550; letter-spacing: -0.01em;
  position: relative;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--text); background: var(--surface-hover);
}

.nav-links a.active {
  color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 0 8px var(--accent-dim);
}
.nav-links a.active::after {
  content: "";
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px; border-radius: 2px;
  background: var(--accent);
}

.nav-user {
  font-size: 0.8rem; color: var(--text-secondary);
  padding: 0 var(--s-2);
  display: flex; align-items: center; gap: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2); padding: 10px 22px;
  border-radius: var(--radius-full); font-size: 0.875rem;
  font-weight: 550; cursor: pointer; border: none;
  transition: all var(--t-normal); letter-spacing: -0.01em;
  white-space: nowrap; position: relative; overflow: hidden;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.btn-primary {
  background: var(--accent); color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.12);
}

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: var(--surface-hover); color: var(--text);
}

.btn-danger {
  background: var(--red-dim); color: var(--red);
}

.btn-danger:hover { background: rgba(248,113,113,0.2); }

.btn:disabled {
  opacity: 0.35; cursor: not-allowed; transform: none;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  transition: all var(--t-normal);
}

.card:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--surface-hover);
}

.card-glass {
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

/* ============================================
   Forms
   ============================================ */
.input {
  width: 100%; padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 0.875rem;
  font-family: var(--font); outline: none;
  transition: all var(--t-fast);
}

.input:hover { border-color: rgba(255,255,255,0.1); }

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: rgba(255,255,255,0.06);
}

.input::placeholder { color: var(--text-muted); }

select.input { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}

textarea.input { resize: vertical; min-height: 80px; }

/* ============================================
   Stats Row
   ============================================ */
.stats-row {
  display: flex; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.stat-item {
  flex: 1; padding: var(--s-5);
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background var(--t-fast);
}

.stat-item:last-child { border-right: none; }

.stat-item:hover { background: var(--surface-hover); }

.stat-value {
  font-size: 1.75rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: var(--s-1); text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 500;
}

/* ============================================
   Song Card
   ============================================ */
.song-card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border-radius: var(--radius);
  cursor: pointer; transition: all var(--t-normal);
  border: 1px solid transparent;
}

.song-card:hover {
  background: var(--surface);
  border-color: var(--border);
  transform: translateY(-1px);
}

.song-card-art {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0; color: var(--accent);
}

.song-card-body { flex: 1; min-width: 0; }

.song-card-title {
  font-size: 0.9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}

.song-card-meta {
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: 2px;
}

.song-card-rank {
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
  margin-right: var(--s-1);
}

/* ============================================
   Upload Zone
   ============================================ */
.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-5);
  text-align: center; cursor: pointer;
  transition: all var(--t-normal);
  background: var(--surface);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone-icon { font-size: 2.5rem; margin-bottom: var(--s-3); opacity: 0.6; }

/* ============================================
   Table
   ============================================ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  font-size: 0.7rem; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: var(--s-3) var(--s-4);
  text-align: left; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--surface-hover); }

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.01em;
}

.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }

/* ============================================
   Toast
   ============================================ */
.toast-container {
  position: fixed; top: var(--s-5); right: var(--s-5);
  z-index: 9999; display: flex; flex-direction: column;
  gap: var(--s-2); pointer-events: none;
}

.toast {
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 0.85rem; pointer-events: auto;
  animation: toastIn 0.35s ease;
  box-shadow: var(--shadow-lg);
  max-width: 380px; backdrop-filter: blur(12px);
}

.toast-ok { background: var(--green-dim); border: 1px solid rgba(52,211,153,0.3); color: var(--green); }
.toast-err { background: var(--red-dim); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }
.toast-info { background: var(--accent-dim); border: 1px solid rgba(167,139,250,0.3); color: var(--accent); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   Player Bar
   ============================================ */
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg-soft);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: var(--s-2) var(--s-5);
  display: none; align-items: center; gap: var(--s-4);
  height: 60px;
}

.player-bar.active { display: flex; }
.player-bar { flex-wrap: nowrap; overflow: hidden; height: 60px; }

.player-cover {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #818cf8);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

.player-info { flex: 1; min-width: 0; }

.player-title {
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-artist { font-size: 0.72rem; color: var(--text-muted); }

.player-controls { display: flex; align-items: center; gap: var(--s-3); }

.player-btn {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 1.1rem; padding: 6px;
  border-radius: 50%; transition: all var(--t-fast);
}

.player-btn:hover { color: var(--text); background: var(--surface-hover); }

.player-btn-play {
  width: 36px; height: 36px; background: var(--accent);
  border-radius: 50%; color: #fff; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}

.player-btn-play:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  color: #fff;
}

.player-progress { flex: 1; max-width: 280px; display: flex; align-items: center; }

.player-time {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-mono); min-width: 100px;
  text-align: right; font-variant-numeric: tabular-nums;
}

.player-volume {
  display: flex; align-items: center; gap: var(--s-2);
  min-width: 100px; flex-shrink: 0;
}
.player-volume input[type="range"] {
  width: 70px; flex-shrink: 0;
}

.player-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: var(--s-2); font-size: 1rem;
  transition: color var(--t-fast);
}

.player-close:hover { color: var(--red); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--surface-hover);
  border-radius: 2px; outline: none; cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent);
  cursor: pointer; border: none;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  text-align: center; padding: var(--s-9) var(--s-5) var(--s-7);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute; top: -40%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  transform: translate(-50%, 0);
  pointer-events: none;
}

.hero h1 {
  margin-bottom: var(--s-4);
  position: relative;
}

.hero p {
  color: var(--text-secondary); font-size: 1.1rem;
  max-width: 520px; margin: 0 auto var(--s-6);
  line-height: 1.7;
}

.hero-actions {
  display: flex; gap: var(--s-3); justify-content: center;
  flex-wrap: wrap; position: relative;
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}

.feature-card {
  text-align: center; padding: var(--s-5) var(--s-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--surface);
  transition: all var(--t-normal);
}

.feature-card:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem; margin-bottom: var(--s-3);
  opacity: 0.8;
}

.feature-card h3 {
  margin-bottom: var(--s-2);
  font-size: 1rem;
}

.feature-card p {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   Loading / Skeleton
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center; padding: var(--s-8) var(--s-5);
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: var(--s-4); opacity: 0.5; }

.empty-state p { font-size: 0.9rem; }

/* ============================================
   Utility Classes
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }

.text-center { text-align: center; }
.text-dim { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }

.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--s-7) var(--s-4) var(--s-6); }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .stats-row { flex-wrap: wrap; }
  .stat-item { flex-basis: 50%; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
  .player-progress, .player-time, .player-volume { display: none; }
  .container { padding: 0 var(--s-4); }

  /* Mobile nav: hamburger menu */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button {
    padding: 12px 20px; font-size: 0.9rem;
    border-radius: 0; width: 100%; text-align: left;
  }
  .nav-links a.active::after { display: none; }
  .nav-links .nav-user { padding: 12px 20px; font-size: 0.9rem; border-top: 1px solid var(--border); }
}

@media (max-width: 480px) {
  .stat-item { flex-basis: 50%; padding: var(--s-3); }
  .stat-value { font-size: 1.3rem; }
  .player-bar { padding: var(--s-2) var(--s-3); gap: var(--s-2); }
}

/* ============================================
   Back-compat: v2 page classes
   ============================================ */
.stat-card { flex: 1; min-width: 120px; padding: var(--s-4); text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.tab-row { display: flex; gap: 4px; margin-bottom: var(--s-4); }
.tab-btn {
  padding: 8px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer;
  font-size: 0.8rem; transition: all var(--t-fast);
}
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-btn:hover:not(.active) { background: var(--surface-hover); color: var(--text); }

.filter-bar, .action-bar { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); flex-wrap: wrap; }
.filter-bar select, .filter-bar input { max-width: 200px; }

.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 8px; }

/* pool / song detail pages */
.comment-box { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.comment-box textarea { flex: 1; }
.comment-item { padding: var(--s-3) 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-user { font-size: 0.8rem; font-weight: 600; }
.comment-text { font-size: 0.85rem; margin-top: 4px; line-height: 1.5; }
.comment-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

.player-hero { padding: var(--s-6) var(--s-4); text-align: center; background: linear-gradient(180deg, var(--accent-dim), transparent); }
.player-hero-art { width: 120px; height: 120px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent), var(--accent2, #6366f1)); display: flex; align-items: center; justify-content: center; font-size: 3rem; margin: 0 auto var(--s-4); box-shadow: 0 8px 32px var(--accent-glow); }

/* upload */
.upload-options { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-4); }
.type-selector { display: flex; gap: var(--s-2); margin-top: var(--s-4); align-items: center; }
.type-option { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); color: var(--text-secondary); font-size: 0.85rem; transition: all var(--t-fast); }
.type-option.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.type-option:hover { background: var(--surface-hover); }
.pool-selector { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
.file-list { margin-top: var(--s-4); }
.file-item { display: flex; align-items: center; gap: var(--s-3); padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.file-item-name { flex: 1; min-width: 0; }
.file-item-size { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.file-item-status { font-size: 0.8rem; }
.progress-bar { height: 4px; background: var(--surface-hover); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #6366f1); width: 0%; transition: width 0.3s; }

/* library */
.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-3); }
.view-toggle { display: flex; gap: 4px; }
.view-btn { padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); }
.view-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }


/* Custom Modal System */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; backdrop-filter: blur(2px);
}
.modal-overlay.show, .modal-overlay[style*="flex"] { display: flex; }
.modal-box {
  background: var(--bg-soft); border-radius: 12px; padding: 24px;
  min-width: 320px; max-width: 440px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(-16px) scale(.97) } to { opacity:1; transform:translateY(0) scale(1) } }
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.modal-msg { font-size: 14px; color: var(--text2); margin-bottom: 16px; white-space: pre-wrap; }
.modal-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--accent);
  border-radius: 8px; background: var(--bg); color: var(--text);
  font-size: 14px; margin-bottom: 16px; outline: none;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-btn {
  padding: 8px 20px; border-radius: 8px; font-size: 14px;
  cursor: pointer; border: none; transition: .2s;
}
.modal-btn-primary { background: var(--accent); color: #fff; }
.modal-btn-primary:hover { opacity: .85; }
.modal-btn-cancel { background: var(--border); color: var(--text); }
.modal-btn-cancel:hover { opacity: .7; }
.modal-btn-danger { background: var(--red); color: #fff; }
.modal-btn-danger:hover { opacity: .85; }
