/* ============================================
   SCALES PAGE SPECIFIC STYLES
   ============================================ */

/* Page Header */
.page-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.home-btn {
    background-color: var(--secondary-color);
    color: #000;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.home-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

/* Scale Hero */
.scale-hero {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.scale-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: 0;
}

.scale-heading {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
}

.scale-description {
    margin: 0;
    color: var(--text-dim);
    font-style: italic;
}

.scale-formula-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.label {
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.scale-formula {
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 1.1rem;
}

/* Controls */
.controls-wrapper {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

select,
button,
input[type=range] {
    padding: 10px 15px;
    background: #333;
    color: var(--text-color);
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

select:hover,
button:hover {
    background: #444;
    border-color: var(--accent-color);
}

.active-btn {
    background-color: var(--accent-color) !important;
    color: #000 !important;
    font-weight: bold;
    border-color: var(--accent-color) !important;
}

.play-btn {
    background-color: var(--secondary-color);
    color: #000;
    font-weight: bold;
    min-width: 100px;
}

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

.stop-btn {
    background-color: var(--highlight-color);
    color: white;
    font-weight: bold;
}

/* Fretboard Container */
.fretboard-container {
    position: relative;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 3px solid var(--border-color);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    margin-bottom: 15px;
    padding: 20px 10px;
    border-radius: 12px;
}

.fretboard {
    display: grid;
    grid-template-columns: 60px repeat(12, 65px);
    width: fit-content;
    margin: 0 auto;
}

.string {
    display: contents;
}

.fret-cell {
    position: relative;
    height: 45px;
    border-right: 3px solid var(--fret-wire, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.fret-cell:hover {
    background: rgba(187, 134, 252, 0.05);
}

.fret-cell:first-child {
    border-right: 6px solid #888;
    background: linear-gradient(90deg, #0a0a0a 0%, #181818 100%);
}

.string-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(119, 119, 119, 0.6) 0%,
            rgba(119, 119, 119, 1) 50%,
            rgba(119, 119, 119, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

.string:nth-child(1) .string-line {
    height: 4.5px;
}

.string:nth-child(2) .string-line {
    height: 4px;
}

.string:nth-child(3) .string-line {
    height: 3.5px;
}

.string:nth-child(4) .string-line {
    height: 3px;
}

.string:nth-child(5) .string-line {
    height: 2.5px;
}

.string:nth-child(6) .string-line {
    height: 2px;
}

/* Note Markers with Enhanced Styling */
.note-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #000;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow:
        0 0 10px var(--accent-color),
        0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.note-marker--two-line {
    width: 38px;
    height: 38px;
    flex-direction: column;
    line-height: 1;
    padding-top: 3px;
}

.marker-top {
    font-size: 0.65rem;
    font-weight: 900;
    opacity: 0.95;
}

.marker-bottom {
    font-size: 0.75rem;
    font-weight: 900;
    margin-top: 2px;
}

.note-marker:hover {
    transform: scale(1.15);
    box-shadow:
        0 0 20px var(--accent-color),
        0 6px 12px rgba(0, 0, 0, 0.4);
}

.note-marker:active {
    transform: scale(0.9);
    background: white;
    box-shadow: 0 0 25px white;
}

.root-note {
    background: linear-gradient(135deg, var(--highlight-color), #ff79a0);
    box-shadow:
        0 0 15px var(--highlight-color),
        0 4px 8px rgba(0, 0, 0, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.root-note:hover {
    box-shadow:
        0 0 25px var(--highlight-color),
        0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Fret Numbers */
.fret-numbers {
    display: grid;
    grid-template-columns: 60px repeat(12, 65px);
    width: fit-content;
    margin: 0 auto 20px auto;
}

.fret-num {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Score Panel */
#score-panel {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.score-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.score-title {
    margin: 4px 0 0 0;
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 800;
}

.score-prog {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.tempo-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.tempo-control input[type=range] {
    width: 100%;
}

.tempo-control span {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

.score-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.score-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.bar {
    background: rgba(34, 34, 34, 0.8);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px 10px;
    position: relative;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.bar.active {
    border-color: var(--secondary-color);
    background: rgba(42, 42, 42, 0.9);
    box-shadow: 0 0 20px rgba(3, 218, 198, 0.2);
    transform: translateY(-3px);
}

.bar-title {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 5px;
}

.chord-symbol {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 8px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.chord-notes {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.note-badge {
    background: #333;
    color: #ddd;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid #444;
}

.beat-indicators {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.beat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.beat-dot.active {
    background: var(--highlight-color);
    border-color: var(--highlight-color);
    box-shadow: 0 0 8px var(--highlight-color);
}

#info-panel {
    margin-top: 25px;
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
}

#scale-title {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 800;
}

#scale-desc {
    display: block;
    margin-bottom: 15px;
    font-style: italic;
    color: var(--text-dim);
}

#scale-formula {
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 1.15rem;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 968px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .fretboard {
        grid-template-columns: 50px repeat(12, 55px);
    }

    .fret-numbers {
        grid-template-columns: 50px repeat(12, 55px);
    }
}

@media (max-width: 600px) {
    .score-track {
        grid-template-columns: 1fr 1fr;
    }

    .fretboard {
        grid-template-columns: 40px repeat(12, 45px);
    }

    .fret-cell {
        height: 35px;
    }

    .note-marker {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .fret-numbers {
        grid-template-columns: 40px repeat(12, 45px);
    }

    .fret-num {
        font-size: 0.75rem;
    }
}