@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Lato:wght@300;400;600&display=swap');

body {
    margin: 0;
    background: #47432E;
    font-family: "Lato", sans-serif;
}

#page-title {
    margin: 18px 0 0;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #F0ECD8;
    padding: 2px;
    background-color: #47432E;
    font-family: "Playfair Display", serif;
    letter-spacing: 0.02em;
}

#subtitle {
    color: rgba(236, 233, 218, 0.38);
    font-size: 12px;
    font-family: "Lato", sans-serif;
    text-align: center;
    padding: 2px;
    line-height: 1.5;
    font-style: italic;
}
#citations{
    color: rgba(236, 233, 218, 0.38);
    font-size: 12px;
    font-family: "Lato", sans-serif;
    text-align: center;
    padding: 2px;
    line-height: 1.5;
    font-style: italic;
}


.container {
    height: 100vh;        /* put this back */
    min-height: 100vh;
    overflow: hidden;
    align-items: stretch;
    display: flex;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    color: #F0ECD8;
    background: #47432E;

    #controls {
        flex: 0 0 320px;
        width: 320px;
        display: flex;
        padding: 10px;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
    }

    #chart-wrap {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-height: 0;
        height: 100%
    }


    }

#filters-card {
    background: #47432E;
    border: 1px solid rgba(240, 236, 216, 0.08);
    border-radius: 16px;
    flex: 0 0 auto;
    width: 360px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.55);
    overflow-y: auto;
}


#chart svg {
    display: block; 
}

#chart .zoom-overlay {
    cursor: grab;
}

#chart .zoom-overlay:active {
    cursor: grabbing;
}

/* ─── Section  ─── */
#chart{
    background: #47432E;
    border: 1px solid rgba(240, 236, 216, 0.08);
    border-radius: 16px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    flex: 1;
    max-height: 500px;
    height: 100%; 

}

#learned-bottom{
    background: #47432E;
    border: 1px solid rgba(240, 236, 216, 0.08);
    border-radius: 16px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.55);
    flex: 0 0 180px;
    overflow: auto;
}

/* ─── Learned  ─── */
#learned-bottom {
    padding: 14px 16px;
}

#learned-bottom h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    color: #C9A84C;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ─── Filters ──── */
#filters-card {
    padding: 0;
}

#controls-inner {
    padding: 16px 16px 0;
}

#filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 16px 16px;
    max-height: 380px;
    overflow-y: auto;
}


#filters::-webkit-scrollbar {
    width: 4px;
}
#filters::-webkit-scrollbar-track {
    background: transparent;
}
#filters::-webkit-scrollbar-thumb {
    background: rgba(240, 236, 216, 0.2);
    border-radius: 2px;
}

.filter-section {
    padding: 14px 0;
    border-bottom: 1px solid rgba(240, 236, 216, 0.08);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3,

.filter-section > h3 {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    color: #C9A84C;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── Search  ─ */
#controls input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(240, 236, 216, 0.15);
    background: rgba(240, 236, 216, 0.06);
    color: #F0ECD8;
    font-family: "Lato", sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

#controls input[type="text"]:focus {
    border-color: rgba(201, 168, 76, 0.5);
    background: rgba(240, 236, 216, 0.09);
}

#controls input[type="text"]::placeholder {
    color: rgba(240, 236, 216, 0.4);
}

/* ─── Button Row─── */
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* ─── Buttons── */
.btn {
    appearance: none;
    border: 1px solid rgba(240, 236, 216, 0.2);
    background: rgba(240, 236, 216, 0.06);
    color: #D4CEB8;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-family: "Lato", sans-serif;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    letter-spacing: 0.03em;
}

.btn:hover {
    background: rgba(240, 236, 216, 0.12);
    border-color: rgba(240, 236, 216, 0.3);
    color: #F0ECD8;
}

/* Difficulty buttons get a tinted active state */
.btn.diff[aria-pressed="true"] {
    background: rgba(201, 168, 76, 0.18);
    border-color: rgba(201, 168, 76, 0.55);
    color: #C9A84C;
}

.btn.key[aria-pressed="true"] {
    background: rgba(201, 168, 76, 0.18);
    border-color: rgba(201, 168, 76, 0.55);
    color: #C9A84C;
}
.btn.capo[aria-pressed="true"] {
    background: rgba(201, 168, 76, 0.18);
    border-color: rgba(201, 168, 76, 0.55);
    color: #C9A84C;
}

/* ─── Checkbox Filter Items ─────────────────────────────── */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #D4CEB8;
    font-family: "Lato", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    transition: color 0.15s;
}

.filter-item:hover {
    color: #F0ECD8;
}

.filter-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: #C9A84C;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ─── Tooltip ───────────────────────────────────────────── */
#tooltip {
    position: absolute;
    background: #2C2A1E;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: "Lato", sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.6);
    min-width: 165px;
    line-height: 1.6;
    color: #D4CEB8;
    z-index: 100;
}

#tooltip strong {
    font-size: 14px;
    font-family: "Playfair Display", serif;
    color: #F0ECD8;
    font-weight: 700;
}

#tooltip hr {
    border: none;
    border-top: 1px solid rgba(240, 236, 216, 0.12);
    margin: 6px 0;
}

/* ─── SVG / Axes ────────────────────────────────────────── */
svg text {
    font-family: "Lato", sans-serif;
    fill: rgba(240, 236, 216, 0.65);
    font-size: 11px;
}

svg .domain,
svg .tick line {
    stroke: rgba(240, 236, 216, 0.15);
}

/* ─── Sidebar Lists ─────────────────────────────────────── */
#side-lists {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-section h3 {
    margin: 0 0 8px 0;
    font-size: 11px;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    color: #C9A84C;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.side-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 170px;
    overflow-y: auto;
    padding-right: 4px;
}

#learned-bottom .side-list {
    max-height: 240px;
}

.side-list-empty {
    color: rgba(240, 236, 216, 0.38);
    font-size: 12px;
    font-family: "Lato", sans-serif;
    padding: 6px 2px;
    line-height: 1.5;
    font-style: italic;
}

/* ─── Search Result Items ───────────────────────────────── */
.search-result-item {
    border: 1px solid rgba(240, 236, 216, 0.1);
    background: rgba(240, 236, 216, 0.04);
    border-radius: 8px;
    padding: 8px 10px;
}

.search-result-song {
    font-size: 12px;
    font-weight: 600;
    font-family: "Lato", sans-serif;
    color: #F0ECD8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    margin-top: 2px;
    font-size: 11px;
    font-family: "Lato", sans-serif;
    color: rgba(240, 236, 216, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Learned Items ─────────────────────────────────────── */
.learned-item {
    border: 1px solid rgba(201, 168, 76, 0.35);
    background: rgba(201, 168, 76, 0.1);
    color: #F0ECD8;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
    font-family: "Lato", sans-serif;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.learned-item:hover {
    background: rgba(201, 168, 76, 0.22);
    border-color: rgba(201, 168, 76, 0.55);
}

.learned-item:focus {
    outline: 2px solid rgba(201, 168, 76, 0.5);
    outline-offset: 1px;
}

.learned-item-song {
    font-size: 12px;
    font-weight: 700;
    color: #F0ECD8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.learned-item-artist {
    margin-top: 2px;
    font-size: 11px;
    color: rgba(240, 236, 216, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Data point colour reference (used in JS) ──────────── */
/*
    Novice:       #4f7942  → brighter: #5A9E4A  (green)
    Intermediate: #C9A84C              (gold/amber)
    Advanced:     #C0392B  → brighter: #D94F3D  (red)
    Learned:      #F0ECD8              (cream — stands out from all three)
*/