/* ============================================
   SETLIST COACH — Minimal, Clear, Professional
   ============================================ */

:root {
    /* Colors - Calm, professional palette */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-subtle: rgba(245, 158, 11, 0.1);

    --success: #22c55e;
    --warning: #f59e0b;
    --border: #27272a;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Layout */
.app {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.brand {
    margin-bottom: var(--space-md);
}

.brand-logo {
    height: 100px;
    width: auto;
}

.brand-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
}

.tool-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tool-icon {
    font-size: 1.25rem;
    color: var(--accent);
}

.tool-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Sections */
.section {
    flex: 1;
}

.hidden {
    display: none !important;
}

/* Upload Section */
.upload-container {
    margin-bottom: var(--space-2xl);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.upload-icon {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

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

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.upload-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.upload-btn:hover {
    background: var(--accent-hover);
}

/* Instructions */
.instructions-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--border);
}

.instructions-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.instructions-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

/* Software Tabs */
.software-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.software-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.software-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.software-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Instructions Panels */
.instructions-panel {
    display: none;
}

.instructions-panel.active {
    display: block;
}

.instructions-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.instructions-panel ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.instructions-panel li {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.instructions-panel li strong {
    color: var(--text-primary);
}

.format-note {
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
}

.format-note code {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Processing Section */
.processing-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.processing-container {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.processing-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.processing-icon-pulse {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }
}

.processing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.processing-progress-container {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.processing-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #22c55e);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.processing-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.processing-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
}

.processing-tracks {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}

.processing-track-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.processing-track-item:last-child {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.processing-track-status {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.processing-track-status.loading {
    color: var(--accent);
    animation: spin 1s linear infinite;
}

.processing-track-status.success {
    color: #22c55e;
}

.processing-track-status.error {
    color: #ef4444;
}

.processing-track-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.processing-track-data {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.processing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.processing-stat {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    text-align: center;
}

.processing-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.processing-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.processing-current {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.processing-current-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.processing-current-track {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto var(--space-lg);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Review Section */
.review-container {
    padding-bottom: var(--space-2xl);
}

.review-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.review-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.review-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Review Cards */
.review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.summary-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Scores Grid */
.scores-grid {
    display: grid;
    gap: var(--space-md);
}

.score-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.score-label {
    width: 140px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.score-bar-container {
    flex: 1;
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.score-bar.high {
    background: var(--success);
}

.score-bar.medium {
    background: var(--accent);
}

.score-bar.low {
    background: var(--warning);
}

.score-value {
    width: 36px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    color: var(--text-primary);
}

.score-item-wrapper {
    margin-bottom: var(--space-sm);
}

.score-item-wrapper:last-child {
    margin-bottom: 0;
}

.score-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    padding-left: 0;
    font-style: italic;
    line-height: 1.5;
}

/* Feedback Lists */
.feedback-list {
    list-style: none;
}

.feedback-list li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.7;
}

.feedback-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.feedback-list li:last-child {
    margin-bottom: 0;
}

.feedback-list li strong {
    color: var(--text-primary);
}

/* Tips List */
.tips-list {
    counter-reset: tips;
    list-style: none;
}

.tips-list li {
    position: relative;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.7;
}

.tips-list li::before {
    counter-increment: tips;
    content: counter(tips);
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 2px;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

.tips-list li strong {
    color: var(--text-primary);
}

/* ============================================
   EXPANDED COACHING SECTIONS
   ============================================ */

/* Coaching Summary */
.coaching-summary-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border-color: rgba(245, 158, 11, 0.3);
}

.coaching-summary-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Crowned Moments */
.crowned-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.3);
}

.crowned-content .strongest-run {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.crowned-content .run-positions {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.crowned-content .run-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.crowned-content .standout-moments {
    list-style: none;
}

.crowned-content .standout-moments li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.crowned-content .standout-moments li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: #22c55e;
}

/* Dip / Least Engaging Windows */
.dip-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.01));
    border-color: rgba(239, 68, 68, 0.2);
}

.dip-content .dip-window {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border-left: 3px solid rgba(239, 68, 68, 0.5);
}

.dip-content .dip-window:last-child {
    margin-bottom: 0;
}

.dip-content .dip-positions {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.dip-content .dip-reason {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.dip-content .dip-suggestion {
    font-size: 0.9rem;
    color: var(--accent);
    font-style: italic;
}

/* Track Insights */
.track-insights-card {
    background: var(--bg-secondary);
}

.track-insights-content .insight-category {
    margin-bottom: var(--space-lg);
}

.track-insights-content .insight-category:last-child {
    margin-bottom: 0;
}

.track-insights-content .insight-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.track-insights-content .insight-items {
    list-style: none;
}

.track-insights-content .insight-items li {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Style Fingerprint */
.fingerprint-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-color: rgba(139, 92, 246, 0.3);
}

.fingerprint-content .fingerprint-item {
    margin-bottom: var(--space-md);
}

.fingerprint-content .fingerprint-item:last-child {
    margin-bottom: 0;
}

.fingerprint-content .fingerprint-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(139, 92, 246, 0.8);
    margin-bottom: var(--space-xs);
}

.fingerprint-content .fingerprint-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Energy Management */
.energy-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border-color: rgba(59, 130, 246, 0.3);
}

.energy-content .energy-item {
    margin-bottom: var(--space-md);
}

.energy-content .energy-item:last-child {
    margin-bottom: 0;
}

.energy-content .energy-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(59, 130, 246, 0.8);
    margin-bottom: var(--space-xs);
}

.energy-content .energy-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Forward Looking */
.forward-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border-color: rgba(245, 158, 11, 0.3);
}

.forward-content .forward-section {
    margin-bottom: var(--space-lg);
}

.forward-content .forward-section:last-child {
    margin-bottom: 0;
}

.forward-content .forward-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.forward-content .forward-items {
    list-style: none;
}

.forward-content .forward-items li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.forward-content .forward-items.rotate-out li::before {
    content: "−";
    position: absolute;
    left: 0;
    color: rgba(239, 68, 68, 0.8);
    font-weight: bold;
}

.forward-content .forward-items.rotate-in li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: rgba(34, 197, 94, 0.8);
    font-weight: bold;
}

.forward-content .forward-items.reposition li::before {
    content: "↔";
    position: absolute;
    left: 0;
    color: rgba(59, 130, 246, 0.8);
}

.forward-content .experiment-text {
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 3px solid var(--accent);
}

/* Focus Goal */
.focus-goal-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.03));
    border-color: rgba(34, 197, 94, 0.4);
}

.focus-goal-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
    text-align: center;
    padding: var(--space-md) 0;
}

/* Data Note */
.data-note-card {
    background: rgba(113, 113, 122, 0.05);
    border-color: rgba(113, 113, 122, 0.2);
}

.data-note-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.6;
}

/* No Data Placeholder */
.no-data {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

/* Item Reason (for track recommendations with explanations) */
.item-reason {
    color: var(--text-muted);
    font-size: 0.85em;
    font-style: italic;
}

/* BPM Roller Coaster Card - Premium Visual */
.bpm-curve-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.4);
    border-width: 2px;
}

.bpm-curve-card .card-title {
    color: #f59e0b;
}

.bpm-chart-container {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

#bpm-chart {
    width: 100%;
    height: 320px;
    max-width: 100%;
    display: block;
}

.bpm-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-md);
}

.bpm-stat-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.bpm-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
}

.bpm-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bpm-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.bpm-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.bpm-legend-color.bpm {
    background: #3b82f6;
}

.bpm-legend-color.energy {
    background: #f59e0b;
}

/* Spotify Stats Card */
.spotify-stats-card {
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.1), rgba(30, 215, 96, 0.02));
    border-color: rgba(30, 215, 96, 0.3);
}

.spotify-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.spotify-stat-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.spotify-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1ed760;
    display: block;
}

.spotify-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spotify-top-tracks {
    margin-top: var(--space-md);
}

.spotify-top-tracks h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spotify-track-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
}

.spotify-track-rank {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1ed760;
    width: 24px;
}

.spotify-track-info {
    flex: 1;
}

.spotify-track-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.spotify-track-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spotify-track-popularity {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1ed760;
    background: rgba(30, 215, 96, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.spotify-track-year {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Recommendations Card */
.recommendations-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02));
    border-color: rgba(251, 191, 36, 0.3);
}

.recommendations-section {
    margin-bottom: var(--space-lg);
}

.recommendations-section:last-child {
    margin-bottom: 0;
}

.recommendations-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.recommendations-section.keep h4 {
    color: #22c55e;
}

.recommendations-section.kick h4 {
    color: #ef4444;
}

.recommendations-section.add h4 {
    color: #fbbf24;
}

.recommendation-item {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    border-left: 3px solid transparent;
}

.recommendations-section.keep .recommendation-item {
    border-left-color: #22c55e;
}

.recommendations-section.kick .recommendation-item {
    border-left-color: #ef4444;
}

.recommendations-section.add .recommendation-item {
    border-left-color: #fbbf24;
}

.recommendation-track {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.recommendation-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Review Actions */
.review-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
}

.btn {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

/* Tracklist Section */
.tracklist-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-top: var(--space-lg);
}

.tracklist-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.tracklist-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-lg);
}

.tracklist {
    max-height: 300px;
    overflow-y: auto;
}

.track-item {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.track-item:last-child {
    border-bottom: none;
}

.track-position {
    width: 28px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
}

.track-info {
    flex: 1;
}

.track-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

/* Footer */
.footer {
    text-align: center;
    padding: var(--space-xl) 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.footer-icon {
    height: 24px;
    width: auto;
}

.footer-brand {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--accent);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
    .app {
        padding: var(--space-md);
    }

    .header {
        padding: var(--space-xl) 0;
    }

    .upload-zone {
        padding: var(--space-xl);
    }

    .instructions-container {
        padding: var(--space-lg);
    }

    .software-tabs {
        justify-content: center;
    }

    .review-card {
        padding: var(--space-lg);
    }

    .score-item {
        flex-wrap: wrap;
    }

    .score-label {
        width: 100%;
        margin-bottom: var(--space-xs);
    }

    .score-note {
        padding-left: 0;
    }
}

/* ============================================
   CONFIDENCE INDICATORS
   ============================================ */

/* Track confidence levels */
.track-item.confidence-high {
    border-left: 3px solid var(--success);
}

.track-item.confidence-medium {
    border-left: 3px solid var(--accent);
}

.track-item.confidence-low {
    border-left: 3px solid #ef4444;
    opacity: 0.7;
}

/* Mix version display */
.track-mix-version {
    font-size: 0.8em;
    color: var(--text-muted);
    font-style: italic;
    margin-left: var(--space-xs);
}

/* Processing warning for flagged tracks */
.processing-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.85rem;
    color: #fca5a5;
    text-align: center;
}

/* Source app badge */
.source-app-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: var(--space-sm);
}

.source-app-badge.rekordbox {
    border-color: #0088cc;
    color: #5bbcea;
}

.source-app-badge.serato {
    border-color: #00c65e;
    color: #4ade80;
}

.source-app-badge.virtualdj {
    border-color: #ff6600;
    color: #fb923c;
}

/* ============================================
   ADDITIVE: EVENT CONTEXT SECTION (FEATURE 2)
   ============================================ */

.context-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.context-container {
    max-width: 600px;
    width: 100%;
    padding: var(--space-xl);
}

.context-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.context-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.context-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.context-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.context-field {
    margin-bottom: var(--space-lg);
}

.context-field:last-child {
    margin-bottom: 0;
}

.context-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.context-label .required {
    color: #ef4444;
}

.context-label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.context-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.context-option {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.context-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.context-option.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.context-notes {
    width: 100%;
    min-height: 80px;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    resize: vertical;
}

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

.context-notes:focus {
    outline: none;
    border-color: var(--accent);
}

.context-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Context Badge on Review Page */
.context-badge-container {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.context-badge.primary {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}