/* ============================================================
   JAMNATION CHORD & SCALE GENERATOR
   ============================================================ */

.generator-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}


/* ============================================================
   HERO
   ============================================================ */

.generator-hero {
    text-align: center;
    margin-bottom: 30px;
}

.generator-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #157787;
}

.generator-hero p {
    margin: 0;
    font-size: 1.1rem;
    color: #777;
}


/* ============================================================
   TABS
   ============================================================ */

.generator-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.generator-tab {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: #e8e8e8;
    color: #555;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.generator-tab:hover {
    transform: translateY(-2px);
}

.generator-tab.active {
    background: #157787;
    color: #ffffff;
}


/* ============================================================
   CARD
   ============================================================ */

.generator-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* ============================================================
   PANELS
   ============================================================ */

.generator-panel {
    display: none;
}

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


/* ============================================================
   CONTROLS
   ============================================================ */

.generator-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 20px;
}

.scale-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1000px;
}

.generator-field {
    display: flex;
    flex-direction: column;
}

.generator-field label {
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.generator-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
}

.generator-field select:focus {
    outline: none;
    border-color: #157787;
    box-shadow: 0 0 0 3px rgba(21, 119, 135, 0.15);
}


/* ============================================================
   BUTTON
   ============================================================ */

.generator-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    background: #157787;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.generator-button:hover {
    background: #0f5f6c;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(21, 119, 135, 0.25);
}


/* ============================================================
   RESULTS
   ============================================================ */

.generator-result {
    max-width: 900px;
    margin: 35px auto 0;
    padding: 25px;
    text-align: center;
    background: #f7fafa;
    border: 1px solid rgba(21, 119, 135, 0.15);
    border-radius: 12px;
}

.generator-result h2 {
    margin: 0 0 25px;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: #157787;
}

.music-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.music-info-item {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
}

.music-info-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
}

.music-notes,
.music-formula {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
}


/* ============================================================
   FRETBOARD SECTION
   ============================================================ */

.fretboard-section {
    margin-top: 45px;
    padding-top: 35px;
    border-top: 1px solid #e5e5e5;
}

.fretboard-heading {
    margin-bottom: 25px;
    text-align: center;
}

.fretboard-heading h2 {
    margin: 0 0 8px;
    color: #333;
    font-size: 1.8rem;
}

.fretboard-heading p {
    margin: 0;
    color: #777;
}


/* ============================================================
   TUNING
   ============================================================ */

.tuning-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tuning-controls .generator-field {
    width: 100%;
    max-width: 500px;
}


/* ============================================================
   FRETBOARD
   ============================================================ */

.fretboard-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
}

#fretboard {
    min-width: 1150px;
    padding: 25px 20px 20px;
    background: #3b2518;
    border-radius: 10px;
    box-sizing: border-box;
}

.fretboard-string {
    display: grid;
    grid-template-columns: 55px repeat(25, minmax(35px, 1fr));
    min-width: 1100px;
    height: 52px;
    align-items: center;
}


/* ============================================================
   STRING LABEL
   ============================================================ */

.string-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #24160f;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
}


/* ============================================================
   FRETS / NUT
   ============================================================ */

.fret {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-left: 2px solid rgba(220, 220, 220, 0.75);
}

/*
   Open-string area:
   Fret 0 now has the normal fret line.

   Nut:
   The thick nut line is positioned at fret 1.
*/

.fret[data-fret="1"] {
    border-left: 5px solid #e8e8e8;
}

.fret::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(230, 230, 230, 0.75);
    z-index: 1;
}

.fretboard-string:nth-child(1) .fret::before,
.fretboard-string:nth-child(2) .fret::before {
    height: 1px;
}

.fretboard-string:nth-child(3) .fret::before,
.fretboard-string:nth-child(4) .fret::before {
    height: 2px;
}

.fretboard-string:nth-child(5) .fret::before {
    height: 3px;
}

.fretboard-string:nth-child(6) .fret::before {
    height: 4px;
}


/* ============================================================
   NOTES
   ============================================================ */

.fret-note {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #157787;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.fret-note.root {
    background: #ffffff;
    color: #157787;
    border: 3px solid #157787;
}

.fret-note:hover {
    transform: scale(1.18);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.5);
}

.fret-note.playing {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(21, 119, 135, 0.25);
}


/* ============================================================
   FRET MARKERS
   ============================================================ */

.fretboard-string:nth-child(3) .fret[data-fret="3"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="5"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="7"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="9"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="15"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="17"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="19"]::after,
.fretboard-string:nth-child(3) .fret[data-fret="21"]::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.fretboard-string:nth-child(2) .fret[data-fret="12"]::after,
.fretboard-string:nth-child(4) .fret[data-fret="12"]::after,
.fretboard-string:nth-child(2) .fret[data-fret="24"]::after,
.fretboard-string:nth-child(4) .fret[data-fret="24"]::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}


/* ============================================================
   LEGEND
   ============================================================ */

.fretboard-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 25px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
}

.legend-note {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.legend-root {
    background: #ffffff;
    color: #157787;
    border: 3px solid #157787;
}

.legend-scale {
    background: #157787;
    color: #ffffff;
}

.legend-play {
    background: #333333;
    color: #ffffff;
}


/* ============================================================
   GENERATOR ACTIONS
   ============================================================ */

.generator-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.generator-button-secondary {
    background: #333333;
}

.generator-button-secondary:hover {
    background: #111111;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 768px) {

    .generator-page {
        padding: 30px 15px 60px;
    }

    .generator-card {
        padding: 20px 15px;
    }

    .generator-controls,
    .scale-controls {
        grid-template-columns: 1fr;
    }

    .music-info {
        grid-template-columns: 1fr;
    }

    .generator-tab {
        flex: 1;
        padding: 12px 15px;
    }

}