/* ==============================
   V2 COMPONENTS
   ============================== */

/* ==============================
   SIDEBAR
   ============================== */
.v2-sidebar {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.v2-sidebar::-webkit-scrollbar {
  width: 4px;
}

.v2-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.v2-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 2px;
}

.v2-sidebar-brand {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--fs-md);
  color: var(--green-500);
  padding: 0 var(--space-md) var(--space-md);
  text-decoration: none;
  display: block;
}

.v2-sidebar-brand:hover {
  color: var(--green-500);
}

.v2-sidebar-section {
  margin-bottom: var(--space-md);
}

.v2-sidebar-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0 var(--space-md);
  margin-bottom: var(--space-xs);
}

.v2-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: all 0.15s;
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.v2-sidebar-link.active {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  border-left-color: var(--green-500);
}

.v2-sidebar-link i {
  width: 18px;
  text-align: center;
  font-size: var(--fs-sm);
  flex-shrink: 0;
}

.v2-sidebar-spacer {
  flex: 1;
}

.v2-sidebar-user {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.v2-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.v2-sidebar-avatar--initials {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: white;
}

.v2-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-sidebar-user-name {
  font-size: var(--fs-xs);
  font-weight: 500;
}

.v2-sidebar-user-tier {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}


/* Sidebar offset for main content */
.v2-app--sidebar .v2-main {
  margin-left: 240px;
}

/* Mobile sidebar */
.v2-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.v2-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.v2-mobile-header-brand {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--fs-md);
  color: var(--green-500);
  text-decoration: none;
}

.v2-mobile-menu-btn {
  background: none;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .v2-sidebar {
    transform: translateX(-100%);
  }

  .v2-sidebar.open {
    transform: translateX(0);
  }

  .v2-sidebar-overlay.open {
    display: block;
  }

  .v2-app--sidebar .v2-main {
    margin-left: 0;
  }

  .v2-mobile-header {
    display: flex;
  }
}

/* ==============================
   SCORE RING
   ============================== */
.v2-score-ring {
  position: relative;
  flex-shrink: 0;
}

.v2-score-ring svg {
  transform: rotate(-90deg);
}

.v2-score-ring-bg {
  fill: none;
  stroke: var(--border-default);
}

.v2-score-ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-score-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Score ring sizes — fluid */
.v2-score-ring--sm { width: clamp(80px, 6vw, 100px); height: clamp(80px, 6vw, 100px); }
.v2-score-ring--sm svg { width: 100%; height: 100%; }
.v2-score-ring--sm .v2-score-ring-bg,
.v2-score-ring--sm .v2-score-ring-fill { stroke-width: 5; }

.v2-score-ring--lg { width: clamp(120px, 10vw, 160px); height: clamp(120px, 10vw, 160px); }
.v2-score-ring--lg svg { width: 100%; height: 100%; }
.v2-score-ring--lg .v2-score-ring-bg,
.v2-score-ring--lg .v2-score-ring-fill { stroke-width: 8; }

/* ==============================
   TIER COLORS
   ============================== */
.v2-tier-listen { color: var(--tier-listen); }
.v2-tier-discern { color: var(--tier-discern); }
.v2-tier-caution { color: var(--tier-caution); }
.v2-tier-avoid { color: var(--tier-avoid); }

.v2-ring-listen { stroke: var(--tier-listen); }
.v2-ring-discern { stroke: var(--tier-discern); }
.v2-ring-caution { stroke: var(--tier-caution); }
.v2-ring-avoid { stroke: var(--tier-avoid); }

.v2-bg-listen { background: var(--tier-listen); }
.v2-bg-discern { background: var(--tier-discern); }
.v2-bg-caution { background: var(--tier-caution); }
.v2-bg-avoid { background: var(--tier-avoid); }

/* ==============================
   CARDS
   ============================== */
.v2-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.2s;
}

.v2-card--hover:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.v2-card--xl {
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

/* ==============================
   BADGES
   ============================== */
.v2-badge {
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.v2-badge--listen {
  background: rgba(16, 185, 129, 0.1);
  color: var(--tier-listen);
}

.v2-badge--discern {
  background: rgba(6, 182, 212, 0.1);
  color: var(--tier-discern);
}

.v2-badge--caution {
  background: rgba(217, 119, 6, 0.1);
  color: var(--tier-caution);
}

.v2-badge--avoid {
  background: rgba(239, 68, 68, 0.1);
  color: var(--tier-avoid);
}

/* ==============================
   STAT CARDS
   ============================== */
.v2-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
}

.v2-stat-card-label {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xs);
}

.v2-stat-card-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
}

.v2-stat-card-change {
  font-size: var(--fs-xs);
  color: var(--tier-listen);
  margin-top: var(--space-xs);
}

.v2-stat-card-change.negative {
  color: var(--tier-avoid);
}

/* ==============================
   SONG HERO
   ============================== */
.v2-song-hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-lg);
  overflow: hidden;
}

.v2-song-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, var(--album-glow) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, var(--album-glow) 0%, transparent 50%);
  pointer-events: none;
}

.v2-song-hero-inner {
  position: relative;
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.v2-album-art {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 40px var(--album-glow);
}

.v2-album-art-placeholder {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: 3rem;
}

.v2-song-meta {
  flex: 1;
  padding-top: 8px;
}

.v2-song-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 4px;
}

.v2-song-artist {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.v2-song-album {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

/* Verdict Hero */
.v2-verdict-hero {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.v2-verdict-label {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 2px;
}

.v2-verdict-tagline {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

/* ==============================
   KEY FINDING
   ============================== */
.v2-key-finding {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text-secondary);
}

.v2-key-finding strong {
  color: var(--text-primary);
}

/* ==============================
   CONCERNS & THEMES
   ============================== */
.v2-analysis-section {
  margin-bottom: var(--space-lg);
}

.v2-concern-item,
.v2-theme-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  transition: background 0.2s;
}

.v2-concern-item:hover,
.v2-theme-item:hover {
  background: var(--bg-surface-hover);
}

.v2-concern-icon,
.v2-theme-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--fs-sm);
}

.v2-concern-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--tier-avoid);
}

.v2-concern-icon.medium {
  background: rgba(217, 119, 6, 0.2);
  color: var(--tier-caution);
}

.v2-theme-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--tier-listen);
}

.v2-concern-title {
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: 2px;
  color: var(--tier-avoid);
}

.v2-theme-title {
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: 2px;
  color: var(--tier-listen);
}

.v2-concern-desc,
.v2-theme-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==============================
   SCRIPTURE REFERENCES
   ============================== */
.v2-scripture-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold-400);
  border-radius: 2px var(--radius-md) var(--radius-md) 2px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
}

.v2-scripture-ref {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--fs-base);
  color: var(--gold-400);
  margin-bottom: 6px;
}

.v2-scripture-text {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
}

.v2-scripture-relevance {
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  font-style: normal;
}

/* Scripture type color-coding: visually links scripture to themes */
.v2-scripture-card--positive {
  border-left-color: var(--tier-listen);
}

.v2-scripture-card--positive .v2-scripture-ref {
  color: var(--tier-listen);
}

.v2-scripture-card--concern {
  border-left-color: var(--tier-avoid);
}

.v2-scripture-card--concern .v2-scripture-ref {
  color: var(--tier-avoid);
}

/* ==============================
   LYRICS
   ============================== */
.v2-lyrics-section {
  margin-bottom: var(--space-xl);
}

.v2-lyrics-toggle {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  font-family: inherit;
}

.v2-lyrics-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.v2-lyrics-body {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-md);
  display: none;
}

.v2-lyrics-body.open {
  display: block;
}

.v2-lyrics-body p {
  font-size: var(--fs-sm);
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.v2-lyrics-body p:last-child {
  margin-bottom: 0;
}

/* Lyric highlights */
.v2-lyric-highlight-positive {
  background: rgba(34, 197, 94, 0.1);
  border-bottom: 2px solid rgba(34, 197, 94, 0.4);
  padding: 2px 0;
  cursor: help;
}

.v2-lyric-highlight-concern {
  background: rgba(239, 68, 68, 0.08);
  border-bottom: 2px solid rgba(239, 68, 68, 0.3);
  padding: 2px 0;
  cursor: help;
}

.v2-lyric-highlight-scripture {
  background: rgba(212, 168, 75, 0.08);
  border-bottom: 2px solid rgba(212, 168, 75, 0.3);
  padding: 2px 0;
  cursor: help;
}

/* ==============================
   METADATA FOOTER
   ============================== */
.v2-meta-footer {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xl);
}

.v2-meta-item {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

.v2-meta-item span {
  color: var(--text-secondary);
}

/* ==============================
   HEALTH HERO (Dashboard)
   ============================== */
.v2-health-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.v2-health-details {
  flex: 1;
}

.v2-health-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.v2-health-desc {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  max-width: 520px;
}

.v2-health-breakdown {
  display: flex;
  gap: var(--space-md);
}

.v2-breakdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.v2-breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.v2-breakdown-count {
  font-weight: 700;
  font-size: var(--fs-base);
}

.v2-breakdown-label {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

/* ==============================
   STATS ROW (Dashboard)
   ============================== */
.v2-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* ==============================
   NEEDS ATTENTION (Dashboard)
   ============================== */
.v2-attention-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.v2-attention-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}

.v2-attention-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-default);
  color: inherit;
}

.v2-attention-art {
  width: clamp(48px, 4vw, 64px);
  height: clamp(48px, 4vw, 64px);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-raised);
  object-fit: cover;
  flex-shrink: 0;
}

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

.v2-attention-title {
  font-weight: 600;
  font-size: var(--fs-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-attention-artist {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

.v2-attention-hidden {
  display: none;
}

.v2-attention-list.expanded .v2-attention-hidden {
  display: flex;
}

/* ==============================
   RECENTLY ANALYZED (horizontal scroll)
   ============================== */
.v2-recent-scroll {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-lg);
  scrollbar-width: none;
}

.v2-recent-scroll::-webkit-scrollbar { display: none; }

.v2-recent-item {
  flex-shrink: 0;
  width: clamp(160px, 13vw, 220px);
  text-decoration: none;
  color: inherit;
}

.v2-recent-item:hover {
  color: inherit;
}

.v2-recent-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  object-fit: cover;
  margin-bottom: var(--space-xs);
  transition: transform 0.2s;
}

.v2-recent-item:hover .v2-recent-art {
  transform: scale(1.03);
}

.v2-recent-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-recent-artist {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

.v2-recent-verdict {
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ==============================
   PLAYLIST GRID
   ============================== */
.v2-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(160px, 10vw + 40px, 240px), 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.v2-playlist-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.v2-playlist-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: inherit;
}

.v2-playlist-cover {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-surface-raised);
  object-fit: cover;
}

.v2-playlist-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.v2-playlist-body-text {
  flex: 1;
  min-width: 0;
}

.v2-playlist-name {
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-playlist-meta {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

/* Mini score ring for playlist cards */
.v2-playlist-ring {
  position: relative;
  width: clamp(44px, 3.5vw, 56px);
  height: clamp(44px, 3.5vw, 56px);
  flex-shrink: 0;
}

.v2-playlist-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.v2-playlist-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.v2-playlist-score {
  font-weight: 700;
  font-size: var(--fs-sm);
}

/* ==============================
   PLAYLIST DETAIL - SONG CARDS
   ============================== */
.v2-song-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
@media (max-width: 1100px) { .v2-song-list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px)  { .v2-song-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .v2-song-list { grid-template-columns: repeat(2, 1fr); } }

.v2-song-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
/* Verdict color strip on left border */
.v2-song-card[data-tier="listen"]  { border-left-color: var(--tier-listen); }
.v2-song-card[data-tier="discern"] { border-left-color: var(--tier-discern); }
.v2-song-card[data-tier="caution"] { border-left-color: var(--tier-caution); }
.v2-song-card[data-tier="avoid"]   { border-left-color: var(--tier-avoid); }

.v2-song-card:hover {
  border-color: var(--md-gold-border);
  border-left-color: var(--md-gold-border);
  transform: translateY(-3px);
  box-shadow: var(--md-shadow-md);
  color: inherit;
}
.v2-song-card[data-tier="listen"]:hover  { border-left-color: var(--tier-listen); }
.v2-song-card[data-tier="discern"]:hover { border-left-color: var(--tier-discern); }
.v2-song-card[data-tier="caution"]:hover { border-left-color: var(--tier-caution); }
.v2-song-card[data-tier="avoid"]:hover   { border-left-color: var(--tier-avoid); }

.v2-song-card-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-surface-raised);
  display: block;
}

.v2-song-card-art-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--md-surface), var(--md-surface-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-text-muted);
  font-size: var(--fs-xl);
}

.v2-song-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.v2-song-card-title {
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-song-card-artist {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-song-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* Legacy row support (for locked songs) */
.v2-song-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.v2-song-row:hover {
  background: var(--bg-surface-hover);
  color: inherit;
}

.v2-song-row-art {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-surface-raised);
}

.v2-song-row-info {
  flex: 1;
  min-width: 0;
}

.v2-song-row-title {
  font-weight: 500;
  font-size: var(--fs-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-song-row-artist {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

.v2-song-row-score {
  flex-shrink: 0;
}

/* ==============================
   PLAYLIST DETAIL HEADER
   ============================== */
.v2-playlist-header {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-lg);
}

.v2-playlist-header-art {
  width: clamp(160px, 20vw, 220px);
  height: clamp(160px, 20vw, 220px);
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.v2-playlist-header-art-placeholder {
  width: clamp(160px, 20vw, 220px);
  height: clamp(160px, 20vw, 220px);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: 3rem;
}

.v2-playlist-header-info {
  flex: 1;
}

.v2-playlist-header-name {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-xs);
}

.v2-playlist-header-meta {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* Verdict breakdown bar */
.v2-verdict-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  max-width: 360px;
}

.v2-verdict-bar-segment {
  transition: width 0.6s ease;
}

/* Search bar */
.v2-search-bar {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.v2-search-bar-form {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.v2-search-bar input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: var(--space-sm);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-family: inherit;
}

.v2-search-bar select {
  padding: var(--space-sm);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-family: inherit;
}

@media (max-width: 768px) {
  .v2-search-bar-form {
    flex-direction: column;
  }

  .v2-search-bar input[type="text"],
  .v2-search-bar select {
    width: 100%;
    min-width: 0;
  }

  .v2-search-bar .v2-filter-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Filter buttons */
.v2-filter-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.v2-filter-btn {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.v2-filter-btn:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.v2-filter-btn.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

/* ==============================
   THEME TOGGLE (float)
   ============================== */
.v2-theme-toggle {
  background: none;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.v2-theme-toggle:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.v2-theme-toggle-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.v2-theme-toggle-float:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

/* ==============================
   ONBOARDING
   ============================== */
.v2-onboarding-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl, 16px);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.v2-onboarding-card--ready {
  border-left: 4px solid var(--tier-listen, #22c55e);
}

.v2-onboarding-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.v2-onboarding-icon {
  width: clamp(40px, 3vw, 48px);
  height: clamp(40px, 3vw, 48px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.v2-onboarding-icon--syncing { background: var(--tier-discern, #3b82f6); }
.v2-onboarding-icon--analyzing { background: var(--tier-discern, #3b82f6); }
.v2-onboarding-icon--ready { background: var(--tier-listen, #22c55e); }

.v2-onboarding-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.v2-onboarding-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2xs, 4px);
}

.v2-onboarding-guide {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-default);
}

.v2-onboarding-guide-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-secondary);
  width: 100%;
  margin-bottom: var(--space-2xs, 4px);
}

.v2-onboarding-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.v2-onboarding-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--tier-listen, #22c55e);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.v2-onboarding-cta:hover {
  opacity: 0.9;
  color: #fff;
}

@media (max-width: 768px) {
  .v2-onboarding-card { padding: var(--space-md); }
  .v2-onboarding-guide { flex-direction: column; }
  .v2-onboarding-header { flex-wrap: wrap; }
  .v2-onboarding-actions { margin-left: 0; margin-top: var(--space-sm); width: 100%; }
  .v2-onboarding-cta { width: 100%; justify-content: center; }
}

/* ==============================
   EMPTY STATES
   ============================== */
.v2-empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-tertiary);
}

.v2-empty-state-icon {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-sm);
  opacity: 0.5;
}

.v2-empty-state-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.v2-empty-state-desc {
  font-size: var(--fs-sm);
  max-width: 400px;
  margin: 0 auto;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
  .v2-health-hero {
    flex-direction: column;
    text-align: center;
    padding: var(--space-md);
  }

  .v2-health-breakdown {
    justify-content: center;
    flex-wrap: wrap;
  }

  .v2-stats-row {
    grid-template-columns: 1fr;
  }

  .v2-playlists-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .v2-song-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .v2-album-art,
  .v2-album-art-placeholder {
    width: 160px;
    height: 160px;
  }

  .v2-verdict-hero {
    justify-content: center;
  }

  .v2-song-meta {
    padding-top: 0;
  }

  .v2-playlist-header {
    flex-direction: column;
    text-align: center;
  }

  .v2-playlist-header-art,
  .v2-playlist-header-art-placeholder {
    width: 120px;
    height: 120px;
  }

  .v2-verdict-bar {
    margin: 0 auto 12px;
  }
}

@media (max-width: 480px) {
  .v2-playlists-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   LOCKED / FREEMIUM STATES
   ============================== */

/* Locked playlist card on dashboard */
.v2-playlist-card--locked {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.v2-playlist-card--locked .v2-playlist-cover,
.v2-playlist-card--locked .v2-playlist-cover img {
  filter: blur(4px) grayscale(0.3);
}

.v2-playlist-cover-wrap {
  position: relative;
  overflow: hidden;
}

.v2-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: var(--fs-xl);
}

/* Locked song row in playlist detail */
.v2-song-row--locked {
  opacity: 0.45;
  pointer-events: none;
  filter: blur(2px);
}

/* Upgrade banner */
.v2-upgrade-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.v2-upgrade-banner i {
  color: var(--gold-400);
  flex-shrink: 0;
}

.v2-upgrade-banner a {
  color: var(--green-500);
  font-weight: 600;
  text-decoration: none;
}

.v2-upgrade-banner a:hover {
  text-decoration: underline;
}

/* ==============================
   PAGINATION (numbered)
   ============================== */
.v2-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin: var(--space-lg) 0;
}

.v2-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

/* Override .v2-layout a color for pagination links */
.v2-layout a.v2-pagination-btn {
  color: var(--text-secondary);
}

.v2-pagination-btn:hover,
.v2-layout a.v2-pagination-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.v2-pagination-btn i {
  font-size: var(--fs-sm);
}

.v2-pagination-btn--active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
  cursor: default;
}

.v2-pagination-btn--active:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

.v2-pagination-btn--disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.v2-pagination-ellipsis {
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  padding: 0 var(--space-xs);
}

/* ==============================
   PROVIDER ATTRIBUTION
   ============================== */

.v2-provider-attribution {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  padding: var(--space-md) 0;
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

.v2-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.v2-sidebar-attribution {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  padding: var(--space-xs) var(--space-sm);
  text-align: center;
}
