/* ── DASHBOARD LAYOUT ── */
.dash-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* ── AI INSIGHT BOX ── */
.insight-box {
  background: linear-gradient(135deg, rgba(228, 13, 238, 0.08) 0%, rgba(228, 13, 238, 0.02) 100%);
  border: 1px solid rgba(228, 13, 238, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.insight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.insight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.insight-icon { color: var(--accent); display: flex; }
.insight-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.insight-status {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.insight-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--fg);
}

/* ── ARTIST HEADER ── */
.artist-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.dash-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dash-sub {
  color: var(--fg-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}
.trend-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 24px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trend-up {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.trend-stable {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.trend-down {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── SCORECARD GRID ── */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.score-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.score-card-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  text-align: left;
}
.score-ring {
  width: 80px;
  height: 80px;
  position: relative;
  flex-shrink: 0;
}
.score-ring svg { width: 100%; height: 100%; }
.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--fg);
}
.score-meta { display: flex; flex-direction: column; gap: 2px; }
.score-icon { display: flex; margin-bottom: 4px; }
.score-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--fg);
}
.score-num small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg-dim);
}
.score-label {
  font-size: 0.72rem;
  color: var(--fg-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.score-desc {
  font-size: 0.75rem;
  color: var(--fg-dim);
}

/* ── PLATFORM CARDS ── */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.platform-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.platform-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.platform-icon { display: flex; }
.platform-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(242, 237, 230, 0.03);
}
.stat-row:last-of-type { border-bottom: none; }
.stat-label {
  font-size: 0.82rem;
  color: var(--fg-dim);
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--fg);
}

/* ── SPOTIFY TRACKS ── */
.tracks-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tracks-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  font-weight: 600;
  margin-bottom: 12px;
}
.track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.track-info {
  flex: 1;
  min-width: 0;
}
.track-name {
  font-size: 0.82rem;
  color: var(--fg);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-album {
  font-size: 0.7rem;
  color: var(--fg-dim);
}
.track-bar-wrap {
  width: 60px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  flex-shrink: 0;
}
.track-bar {
  height: 100%;
  background: #1DB954;
  border-radius: 2px;
}
.track-pop {
  font-size: 0.72rem;
  color: var(--fg-dim);
  font-weight: 600;
  width: 24px;
  text-align: right;
}

/* ── REDDIT SUBREDDITS ── */
.subreddit-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sub-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--fg);
  margin-bottom: 8px;
}
.sub-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.sub-stat {
  font-size: 0.72rem;
  color: var(--fg-dim);
  font-weight: 500;
}
.post-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.post-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.post-link:hover { background: rgba(242, 237, 230, 0.04); }
.post-score {
  font-size: 0.72rem;
  color: #FF4500;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 36px;
}
.post-title {
  font-size: 0.78rem;
  color: var(--fg-dim);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── FOOTER ── */
.dash-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s;
}
.refresh-btn:hover { border-color: var(--accent); }
.fetch-time {
  font-size: 0.75rem;
  color: var(--fg-dim);
}

/* ── EMPTY STATE ── */
.dash-empty {
  text-align: center;
  padding: 120px 24px;
}
.dash-empty h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.dash-empty p {
  color: var(--fg-dim);
  font-size: 0.95rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .dash-wrap { padding: 90px 16px 40px; }
  .scorecard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .score-card-main {
    grid-column: span 2;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .artist-header-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .scorecard-grid {
    grid-template-columns: 1fr;
  }
  .score-card-main {
    grid-column: span 1;
  }
  .dash-title { font-size: 1.5rem; }
  .dash-footer { flex-direction: column; align-items: flex-start; }
}
