/* ================================================================
   DUA2 — AI Song & Guitar Chord Analyzer
   Stijlblad voor de interactieve Song Analyzer pagina
   Thema: Sulawesi Regenwoud • Bio-luminescente Akkoorden • Glassmorphism
   ================================================================ */

:root {
    --analyzer-bg:         #020612;
    --analyzer-surface:    rgba(15, 23, 42, 0.75);
    --analyzer-surface-hi: rgba(30, 41, 59, 0.85);
    --analyzer-border:     rgba(255, 255, 255, 0.08);
    --analyzer-border-hi:  rgba(74, 222, 128, 0.35);
    --analyzer-emerald:    #22c55e;
    --analyzer-emerald-lt: #4ade80;
    --analyzer-gold:       #facc15;
    --analyzer-cyan:       #38bdf8;
    --analyzer-rose:       #f43f5e;
    --analyzer-purple:     #a855f7;
    --analyzer-chord:      #facc15;
    --analyzer-chord-bg:   rgba(250, 204, 21, 0.12);
    --analyzer-chord-act:  #22c55e;
    --analyzer-text:       #f8fafc;
    --analyzer-muted:      #94a3b8;
    --analyzer-dim:        #64748b;
    --analyzer-font:       'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --analyzer-mono:       'JetBrains Mono', monospace, Consolas, Courier;
}

/* ── Hoofdcontainer & Achtergrond ───────────────────────────────── */
.analyzer-page {
    position: relative;
    min-height: 100vh;
    padding-top: calc(var(--nav-h, 80px) + 2rem);
    padding-bottom: 7rem;
    color: var(--analyzer-text);
    font-family: var(--analyzer-font);
    overflow-x: hidden;
}

.analyzer-bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle 650px at 15% 20%, rgba(34, 197, 94, 0.09), transparent 70%),
        radial-gradient(circle 600px at 85% 60%, rgba(56, 189, 248, 0.07), transparent 70%),
        radial-gradient(circle 500px at 50% 90%, rgba(250, 204, 21, 0.06), transparent 70%);
}

.analyzer-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Hero Header van de Analyzer ────────────────────────────────── */
.analyzer-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 3rem auto;
}

.analyzer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: var(--analyzer-emerald-lt);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.analyzer-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--analyzer-emerald-lt);
    box-shadow: 0 0 10px var(--analyzer-emerald-lt);
    animation: dotPulse 2s infinite ease-in-out;
}

.analyzer-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .analyzer-title {
        font-size: 2rem;
    }
}

.analyzer-title .gradient-text {
    background: linear-gradient(135deg, #facc15 0%, #4ade80 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analyzer-subtitle {
    font-size: 1.12rem;
    color: var(--analyzer-muted);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Input Card (YouTube & Audio Upload) ────────────────────────── */
.analyzer-card {
    background: var(--analyzer-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--analyzer-border);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    margin-bottom: 2.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.analyzer-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.input-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--analyzer-border);
    padding-bottom: 1rem;
}

.input-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--analyzer-muted);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--analyzer-font);
    cursor: pointer;
    transition: all 0.25s ease;
}

.input-tab-btn:hover {
    color: var(--analyzer-text);
    background: rgba(255, 255, 255, 0.05);
}

.input-tab-btn.active {
    color: #ffffff;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

/* Tab Panels */
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* YouTube Input Form */
.url-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .url-input-group {
        flex-direction: column;
    }
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--analyzer-dim);
    pointer-events: none;
}

.text-input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3rem;
    background: rgba(2, 6, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--analyzer-text);
    font-size: 0.95rem;
    font-family: var(--analyzer-font);
    transition: all 0.25s ease;
    outline: none;
}

.text-input:focus {
    border-color: var(--analyzer-emerald-lt);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.25);
    background: rgba(2, 6, 18, 0.9);
}

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

/* Buttons */
.btn-analyze {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.95rem 1.8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--analyzer-font);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.5);
    border-color: #86efac;
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* YouTube Video Preview Card */
.yt-preview-card {
    display: none;
    background: rgba(2, 6, 18, 0.6);
    border: 1px solid var(--analyzer-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1rem;
    gap: 1.25rem;
    align-items: center;
}

.yt-preview-card.show {
    display: flex;
}

@media (max-width: 600px) {
    .yt-preview-card.show {
        flex-direction: column;
        align-items: flex-start;
    }
}

.yt-thumb-wrap {
    width: 140px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: #000;
}

.yt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-info {
    flex: 1;
}

.yt-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.yt-meta {
    font-size: 0.82rem;
    color: var(--analyzer-muted);
}

/* Audio Drop Zone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 2.75rem 2rem;
    text-align: center;
    background: rgba(2, 6, 18, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--analyzer-emerald-lt);
    background: rgba(34, 197, 94, 0.06);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15);
}

.dropzone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem auto;
    border-radius: 16px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analyzer-emerald-lt);
}

.dropzone-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.dropzone-sub {
    font-size: 0.85rem;
    color: var(--analyzer-muted);
}

.dropzone-file-info {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    border-radius: 12px;
    color: var(--analyzer-emerald-lt);
    font-weight: 600;
    font-size: 0.9rem;
    align-items: center;
    justify-content: space-between;
}

.dropzone-file-info.show {
    display: flex;
}

/* Notice & Copyright Disclaimer */
.copyright-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--analyzer-dim);
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--analyzer-gold);
}

/* Demo Songs Bar */
.demo-bar {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--analyzer-border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.demo-bar-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--analyzer-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-chip {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-chip:hover {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.4);
    color: var(--analyzer-gold);
    transform: translateY(-1px);
}

.demo-badge-tag {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(250, 204, 21, 0.2);
    color: var(--analyzer-gold);
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* ── Processing Pipeline UI ─────────────────────────────────────── */
.processing-card {
    display: none;
    background: var(--analyzer-surface);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.15);
}

.processing-card.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.processing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.processing-title-group h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.processing-sub {
    font-size: 0.88rem;
    color: var(--analyzer-muted);
    margin-top: 0.25rem;
}

.pipeline-stepper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    background: rgba(2, 6, 18, 0.5);
    border: 1px solid var(--analyzer-border);
    transition: all 0.3s ease;
}

.pipeline-step.completed {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(34, 197, 94, 0.08);
}

.pipeline-step.current {
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.08);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.15);
}

.step-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pipeline-step.pending .step-status-icon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--analyzer-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pipeline-step.completed .step-status-icon {
    background: rgba(34, 197, 94, 0.2);
    color: var(--analyzer-emerald-lt);
    border: 1px solid var(--analyzer-emerald-lt);
}

.pipeline-step.current .step-status-icon {
    background: rgba(250, 204, 21, 0.2);
    color: var(--analyzer-gold);
    border: 1px solid var(--analyzer-gold);
    animation: pulseRing 1.5s infinite;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
    100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

.step-content {
    flex: 1;
}

.step-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--analyzer-text);
}

.step-desc {
    font-size: 0.8rem;
    color: var(--analyzer-muted);
}

.step-tech-badge {
    font-size: 0.72rem;
    font-family: var(--analyzer-mono);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--analyzer-muted);
}

/* ── Resultaten Sectie ───────────────────────────────────────────── */
.results-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.results-container.show {
    display: block;
}

/* Song Header Card */
.song-header-card {
    background: var(--analyzer-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--analyzer-border);
    border-radius: 24px;
    padding: 2.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.song-main-meta {
    flex: 1;
    min-width: 280px;
}

.song-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.35rem;
}

.song-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.song-artist {
    font-size: 1.15rem;
    color: var(--analyzer-emerald-lt);
    font-weight: 600;
}

.song-metrics-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metric-pill {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    background: rgba(2, 6, 18, 0.65);
    border: 1px solid var(--analyzer-border);
    min-width: 90px;
}

.metric-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--analyzer-dim);
    font-weight: 700;
}

.metric-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--analyzer-text);
    font-family: var(--analyzer-mono);
}

.metric-value.accent-key {
    color: var(--analyzer-gold);
}

.metric-value.accent-bpm {
    color: var(--analyzer-cyan);
}

.confidence-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: var(--analyzer-emerald-lt);
}

/* ── Toolbar: Transpose, Capo, Voicing, Auto-scroll, Player ─────── */
.controls-toolbar {
    position: sticky;
    top: calc(var(--nav-h, 80px) + 10px);
    z-index: 40;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.toolbar-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--analyzer-dim);
    margin-right: 2px;
}

/* Transpose Controls */
.transpose-box {
    display: inline-flex;
    align-items: center;
    background: rgba(2, 6, 18, 0.8);
    border: 1px solid var(--analyzer-border);
    border-radius: 12px;
    padding: 3px;
}

.transpose-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--analyzer-text);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.transpose-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--analyzer-emerald-lt);
}

.transpose-value {
    font-family: var(--analyzer-mono);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0 10px;
    min-width: 44px;
    text-align: center;
    color: var(--analyzer-gold);
}

/* Capo Selector */
.capo-select {
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    background: rgba(2, 6, 18, 0.8);
    border: 1px solid var(--analyzer-border);
    color: var(--analyzer-text);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--analyzer-font);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.capo-select:focus {
    border-color: var(--analyzer-emerald-lt);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

.capo-suggestion-tag {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--analyzer-emerald-lt);
    font-weight: 700;
}

/* Auto-Scroll Toggle & Speed */
.autoscroll-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(2, 6, 18, 0.8);
    border: 1px solid var(--analyzer-border);
    color: var(--analyzer-muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.autoscroll-toggle-btn.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
    color: var(--analyzer-emerald-lt);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.25);
}

.scroll-speed-select {
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: rgba(2, 6, 18, 0.8);
    border: 1px solid var(--analyzer-border);
    color: var(--analyzer-text);
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
}

/* ── Audio Player Bar ────────────────────────────────────────────── */
.audio-player-card {
    background: rgba(2, 6, 18, 0.75);
    border: 1px solid var(--analyzer-border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.player-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.4);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.player-play-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.6);
}

.player-timeline-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-time {
    font-size: 0.82rem;
    font-family: var(--analyzer-mono);
    color: var(--analyzer-muted);
    min-width: 44px;
}

.player-scrubber {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.player-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--analyzer-emerald-lt);
    box-shadow: 0 0 10px var(--analyzer-emerald-lt);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.player-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.player-speed-pills {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 10px;
}

.speed-pill-btn {
    padding: 0.25rem 0.55rem;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--analyzer-dim);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-pill-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.player-loop-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--analyzer-border);
    color: var(--analyzer-dim);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.player-loop-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--analyzer-cyan);
}

/* ── Split Layout: Chord Sheet (Links/Centraal) & Diagram Panel ─── */
.sheet-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 960px) {
    .sheet-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Chord Sheet Wrapper */
.chord-sheet-card {
    background: var(--analyzer-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--analyzer-border);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chord-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--analyzer-border);
}

.chord-sheet-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sections (Intro, Verse, Chorus, etc.) */
.song-section {
    margin-bottom: 2.25rem;
    scroll-margin-top: calc(var(--nav-h, 80px) + 90px);
    position: relative;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--analyzer-cyan);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.section-badge.chorus {
    color: var(--analyzer-gold);
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

.section-badge.bridge {
    color: var(--analyzer-purple);
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
}

/* Lyric Lines & Chord Placement */
.sheet-line {
    position: relative;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.sheet-line:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sheet-line.active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.18);
}

.sheet-line.active .chord-token {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--analyzer-emerald-lt);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
    transform: scale(1.05);
}

.line-chords-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 0.35rem;
    min-height: 28px;
}

.chord-token {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--analyzer-mono);
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--analyzer-chord);
    background: var(--analyzer-chord-bg);
    border: 1px solid rgba(250, 204, 21, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.chord-token:hover {
    transform: translateY(-2px);
    background: rgba(250, 204, 21, 0.3);
    border-color: var(--analyzer-gold);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
}

.chord-uncertain-mark {
    font-size: 0.65rem;
    color: var(--analyzer-rose);
    opacity: 0.85;
}

.line-lyrics-text {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--analyzer-text);
    font-weight: 500;
}

/* ── Interactive Fretboard Diagram Sidebar / Card ─────────────────── */
.fretboard-card {
    background: var(--analyzer-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--analyzer-border);
    border-radius: 24px;
    padding: 1.75rem;
    position: sticky;
    top: calc(var(--nav-h, 80px) + 90px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.fretboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.fretboard-chord-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--analyzer-gold);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.fretboard-chord-name {
    font-size: 0.85rem;
    color: var(--analyzer-muted);
    font-weight: 600;
}

.fretboard-svg-container {
    background: rgba(2, 6, 18, 0.85);
    border: 1px solid var(--analyzer-border);
    border-radius: 16px;
    padding: 1.25rem 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.25rem;
}

.fretboard-svg {
    max-width: 220px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.tab-text-preview {
    font-family: var(--analyzer-mono);
    font-size: 0.78rem;
    background: rgba(2, 6, 18, 0.7);
    border: 1px solid var(--analyzer-border);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
    white-space: pre;
    line-height: 1.4;
}

.voicing-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.voicing-btn {
    flex: 1;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--analyzer-border);
    color: var(--analyzer-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voicing-btn.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
    color: var(--analyzer-emerald-lt);
}

.chord-bank-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--analyzer-border);
}

.chord-bank-label {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--analyzer-dim);
    margin-bottom: 2px;
}

/* ── Mobile Sticky Mini-Player ──────────────────────────────────── */
.mobile-mini-player {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(2, 6, 18, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 1rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .mobile-mini-player {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
}

.mini-player-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-chord-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.4);
    color: var(--analyzer-gold);
    font-family: var(--analyzer-mono);
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

.mini-player-title {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

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

/* ── Chord Diagram Modal / Bottom Sheet (Mobile) ─────────────────── */
.chord-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(2, 6, 18, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.chord-modal-backdrop.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.chord-modal-dialog {
    background: #0b1329;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.chord-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analyzer-muted);
    cursor: pointer;
}

.chord-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

/* ── Demo Mode Indicator Ribbon ─────────────────────────────────── */
.demo-mode-ribbon {
    display: none;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.25), rgba(250, 204, 21, 0.15));
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    margin-bottom: 1.5rem;
    color: var(--analyzer-gold);
    font-size: 0.85rem;
    font-weight: 700;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.demo-mode-ribbon.show {
    display: flex;
}
