/* ═══════════════════════════════════════════════════════════
   Shambhu Stats — Dark Gold Theme
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:         #080810;
  --bg-2:       #12121e;
  --bg-3:       #1a1a2e;
  --bg-4:       #22223a;
  --border:     rgba(255,255,255,0.07);
  --gold:       #c9a84c;
  --gold-light: #e8c76a;
  --purple:     #7c3aed;
  --purple-light:#9f67ff;
  --text:       #e2e8f0;
  --text-muted: #718096;
  --green:      #48bb78;
  --red:        #fc8181;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── Utilities ──────────────────────────────────────────── */
.gold      { color: var(--gold); }
.muted     { color: var(--text-muted); }
.warn      { color: var(--red); }
.hidden    { display: none !important; }
.empty-msg { color: var(--text-muted); font-size: 0.9rem; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 60px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.note-icon { font-size: 1.3rem; color: var(--gold); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}
.nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-3);
}
.nav-link.active { color: var(--gold); }

.btn-sync {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}
.btn-sync:hover { opacity: 0.85; }
.btn-sync:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinning { display: inline-block; animation: spin 1s linear infinite; }

/* ── Flash Messages ─────────────────────────────────────── */
.flash {
  margin: 1rem 2rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.flash-success { background: rgba(72,187,120,0.15); border: 1px solid rgba(72,187,120,0.3); color: var(--green); }
.flash-error   { background: rgba(252,129,129,0.12); border: 1px solid rgba(252,129,129,0.3); color: var(--red); }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ── Setup Page ─────────────────────────────────────────── */
.setup-body {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.setup-container {
  max-width: 640px;
  width: 100%;
}

.setup-header {
  text-align: center;
  margin-bottom: 2rem;
}
.setup-logo {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.setup-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.setup-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.setup-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.setup-card h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.setup-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }

.setup-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  min-width: 28px; height: 28px;
  background: var(--gold);
  color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.step-content { font-size: 0.875rem; color: var(--text-muted); padding-top: 3px; }
.step-content strong { color: var(--text); }
.step-content code {
  background: var(--bg-3);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--gold);
}

.setup-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form-group input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--gold); }

.btn-primary {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-full { width: 100%; }

.setup-platforms { text-align: center; }
.setup-platforms h3 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.platform-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.pill { padding: 0.35rem 0.9rem; border-radius: 20px; font-size: 0.8rem; border: 1px solid var(--border); color: var(--text-muted); }
.pill-spotify { border-color: #1db954; color: #1db954; }
.setup-note { font-size: 0.8rem; color: var(--text-muted); max-width: 480px; margin: 0 auto; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-img-wrap { flex-shrink: 0; }
.hero-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.hero-name { font-size: 1.6rem; font-weight: 700; }
.hero-genres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0; }
.genre-pill {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.hero-sync { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.hero-info { flex: 1; }
.btn-spotify {
  background: #1db954;
  color: #000;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── KPI Grid ────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.kpi-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kpi-unit { font-size: 0.9rem; color: var(--text-muted); }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Charts ─────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.chart-wrap {
  position: relative;
  height: 170px;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.spotlight-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.spotlight-img { width: 100px; height: 100px; border-radius: var(--radius-sm); margin-bottom: 0.75rem; }
.spotlight-name { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
.spotlight-album { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.popularity-bar-wrap { width: 100%; background: var(--bg-4); border-radius: 4px; height: 8px; margin-bottom: 0.5rem; }
.popularity-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--purple)); }
.spotlight-pop { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.btn-small-spotify {
  background: #1db954;
  color: #000;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Section ─────────────────────────────────────────────── */
.section { margin-bottom: 2rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-title { font-size: 1.4rem; font-weight: 700; }
.page-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; max-width: 640px; }
.see-all { font-size: 0.85rem; color: var(--gold); }

/* ── Tracks Table ────────────────────────────────────────── */
.tracks-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tracks-table { width: 100%; border-collapse: collapse; }
.tracks-table th {
  background: var(--bg-3);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.tracks-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}
.rank { color: var(--text-muted); font-weight: 600; width: 36px; }
.track-cell { display: flex; align-items: center; gap: 0.75rem; }
.track-thumb { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.track-name { font-weight: 500; }
.track-type { font-size: 0.72rem; color: var(--text-muted); text-transform: capitalize; }
.track-link { color: var(--text); }
.track-link:hover { color: var(--gold); }

.pop-wrap { display: flex; align-items: center; gap: 0.5rem; }
.pop-bar-sm { width: 60px; height: 5px; background: var(--gold); border-radius: 3px; }
.pop-num { font-size: 0.85rem; color: var(--text-muted); min-width: 28px; }

/* ── Import Section ─────────────────────────────────────── */
.import-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; }
.import-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.import-logo { font-size: 1.8rem; margin-bottom: 0.4rem; }
.import-platform { font-weight: 600; margin-bottom: 0.4rem; }
.import-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.file-input { display: none; }
.btn-upload {
  display: inline-block;
  background: var(--bg-4);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.btn-import {
  display: block;
  background: var(--gold);
  color: #000;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
}

/* ── Track Cards (Tracks page) ───────────────────────────── */
.sort-controls { display: flex; align-items: center; gap: 0.75rem; }
.sort-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.track-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.track-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.track-card:hover { border-color: rgba(201,168,76,0.3); }

.tc-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.tc-img { width: 54px; height: 54px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.tc-img-placeholder {
  width: 54px; height: 54px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--gold);
  flex-shrink: 0;
}
.tc-meta { flex: 1; min-width: 0; }
.tc-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-album { font-size: 0.78rem; color: var(--text-muted); margin: 0.15rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-sub { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pill-sm { background: var(--bg-3); border: 1px solid var(--border); padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }

.tc-pop-badge {
  font-size: 1.3rem; font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0; min-width: 36px; text-align: right;
}
.badge-gold { color: var(--gold); }
.badge-silver { color: #a0aec0; }

.tc-features { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.9rem; }
.feat-row { display: flex; align-items: center; gap: 0.5rem; }
.feat-label { font-size: 0.72rem; color: var(--text-muted); width: 52px; flex-shrink: 0; }
.feat-bar { flex: 1; background: var(--bg-4); border-radius: 3px; height: 5px; }
.feat-fill { height: 5px; border-radius: 3px; }
.feat-val { font-size: 0.72rem; color: var(--text-muted); width: 32px; text-align: right; }

.tc-footer { display: flex; align-items: center; justify-content: space-between; }
.tempo-badge { font-size: 0.75rem; color: var(--text-muted); }
.btn-history {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-history:hover { color: var(--gold); border-color: var(--gold); }

/* ── Modal ───────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1rem; cursor: pointer; padding: 0.25rem;
}

/* ── Recommendations ─────────────────────────────────────── */
.filter-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.filter-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

.recs-list { display: flex; flex-direction: column; gap: 1.25rem; }

.rec-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.rec-track-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.rec-img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.rec-img-placeholder {
  width: 64px; height: 64px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--gold); flex-shrink: 0;
}
.rec-track-info { flex: 1; }
.rec-track-name { font-weight: 600; font-size: 1rem; margin-bottom: 0.2rem; }
.rec-track-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.rec-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.badge-pop { background: var(--bg-4); padding: 0.2rem 0.6rem; border-radius: 10px; font-size: 0.75rem; color: var(--gold); }
.badge-trend { padding: 0.2rem 0.6rem; border-radius: 10px; font-size: 0.75rem; }
.trend-rising  { background: rgba(72,187,120,0.12); color: var(--green); }
.trend-falling { background: rgba(252,129,129,0.12); color: var(--red); }
.trend-stable  { background: var(--bg-4); color: var(--text-muted); }
.badge-bpm { background: var(--bg-4); padding: 0.2rem 0.6rem; border-radius: 10px; font-size: 0.75rem; color: var(--text-muted); }

.rec-sparkbars { width: 140px; flex-shrink: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.sbar-row { display: flex; align-items: center; gap: 0.4rem; }
.sbar-row span { font-size: 0.7rem; color: var(--text-muted); width: 45px; flex-shrink: 0; }
.sbar { flex: 1; background: var(--bg-4); border-radius: 3px; height: 4px; }
.sbar > div { height: 4px; border-radius: 3px; }

.rec-actions { display: flex; flex-direction: column; gap: 0.75rem; }

.action-item {
  border-left: 3px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-3);
}
.action-item.priority-high   { border-left-color: var(--red); }
.action-item.priority-medium { border-left-color: var(--gold); }
.action-item.priority-low    { border-left-color: var(--purple); }

.action-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.action-detail { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── View Toggle ─────────────────────────────────────────── */
.view-toggle { display: flex; gap: 0.25rem; }
.view-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.view-btn:hover { color: var(--gold); border-color: var(--gold); }
.view-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ── Track Stats Row (streams / listeners / saves) ──────── */
.tc-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0.4rem 0;
}
.stat-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  white-space: nowrap;
}
.stat-chip-saves { color: #e88; }

/* ── Action Group View ───────────────────────────────────── */
.action-group {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.priority-group-high   { border-left: 3px solid #fc8181; }
.priority-group-medium { border-left: 3px solid #c9a84c; }
.priority-group-low    { border-left: 3px solid #48bb78; }

.action-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.action-group-label  { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.action-group-detail { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; max-width: 700px; }
.action-group-count  { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; background: var(--bg-4); padding: 0.25rem 0.6rem; border-radius: 20px; margin-top: 0.2rem; }

.action-group-tracks  { padding: 0.25rem 0; }
.ag-track-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  border-top: 1px solid var(--border);
}
.ag-track-row:first-child { border-top: none; }
.ag-track-row:hover { background: rgba(255,255,255,0.02); }
.ag-thumb { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.ag-thumb-placeholder { width: 36px; height: 36px; border-radius: 4px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 0.9rem; flex-shrink: 0; }
.ag-track-name { flex: 1; font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ag-album { font-size: 0.78rem; font-weight: 400; }
.ag-stats  { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── Recommendation badge extras ────────────────────────── */
.badge-saves { background: rgba(238,136,136,0.15); color: #e88; border: 1px solid rgba(238,136,136,0.3); }
.badge-rate  { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.badge-rate-mid  { background: rgba(201,168,76,0.15); color: var(--gold); border-color: rgba(201,168,76,0.3); }
.badge-rate-high { background: rgba(72,187,120,0.15); color: #48bb78; border-color: rgba(72,187,120,0.3); }

/* ── Stats Modal Snapshot ────────────────────────────────── */
.stats-snapshot { margin-bottom: 1rem; }
.snap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.snap-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.snap-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}
.snap-saves { color: #e88; }
.snap-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.snap-note  { font-size: 0.75rem; text-align: center; margin-top: 0.25rem; }

/* ── Playlists Page ──────────────────────────────────────── */
.pl-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pl-summary-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.pl-summary-card .pl-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}
.pl-summary-card .pl-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.pl-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
}
.pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.pl-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-3);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 60px;
  z-index: 10;
}
.pl-table th:hover { color: var(--gold); }
.pl-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.pl-table tr:hover td { background: rgba(255,255,255,0.02); }
.pl-rank {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 2rem;
}
.pl-title { font-weight: 500; }
.pl-author { color: var(--text-muted); font-size: 0.8rem; }
.pl-streams { color: var(--gold); font-weight: 600; }
.pl-date { color: var(--text-muted); font-size: 0.8rem; }
.bar-cell { min-width: 80px; }
.pl-bar-wrap { background: rgba(255,255,255,0.06); border-radius: 3px; height: 6px; overflow: hidden; }
.pl-bar-fill { height: 6px; border-radius: 3px; background: var(--gold); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; gap: 1rem; }
  .nav-links { display: none; }
  .main-content { padding: 1rem; }
  .charts-row { grid-template-columns: 1fr; }
  .hero { flex-wrap: wrap; }
  .rec-track-header { flex-wrap: wrap; }
  .rec-sparkbars { width: 100%; }
}
