/* ====================================================================
   MusicSchool App CSS
   ==================================================================== */

/* ---- Base ---- */
:root {
    --harp-blow-color: #0d6efd;
    --harp-draw-color: #dc3545;
    --harp-bend-color: #fd7e14;
    --harp-active-glow: rgba(255, 193, 7, 0.6);
    --beat-active-color: #ffc107;
    --beat-accent-color: #dc3545;
    --practice-bg: #1a1a2e;
    --practice-sidebar: #16213e;
    --card-border-radius: 12px;
}

/* ---- Cards ---- */
.card {
    border-radius: var(--card-border-radius);
}

.hover-lift {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.12) !important;
}

/* ---- Avatar ---- */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 700;
}

/* ---- Song Key Badge ---- */
.song-key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}
.song-key-badge-lg {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* ---- Stat Icons ---- */
.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ====================================================================
   HARMONICA TAB NOTATION
   ==================================================================== */
.harmonica-tab {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', Courier, monospace;
}

.harmonica-tab-large .tab-note {
    min-width: 52px;
    min-height: 52px;
    font-size: 1.1rem;
}

.tab-note {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    border: 2px solid;
    padding: 2px 6px;
    font-weight: 700;
    cursor: default;
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
}

.tab-blow {
    background: #dbeafe;
    border-color: var(--harp-blow-color);
    color: var(--harp-blow-color);
}

.tab-draw {
    background: #fee2e2;
    border-color: var(--harp-draw-color);
    color: var(--harp-draw-color);
}

.tab-bend {
    background: #fff3cd;
    border-color: var(--harp-bend-color);
    color: var(--harp-bend-color);
}

.tab-note-active {
    transform: scale(1.2);
    box-shadow: 0 0 12px 3px var(--harp-active-glow);
    z-index: 2;
}

.tab-hole {
    font-size: 1.1em;
    line-height: 1;
}

.tab-bend-mark {
    font-size: .65em;
    line-height: 1;
    opacity: .7;
}

.tab-dir {
    font-size: .75em;
    line-height: 1;
}

.tab-separator {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: .9rem;
    padding: 0 4px;
}

/* ---- Harmonica Layout Grid ---- */
.harmonica-hole {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 6px 4px;
    font-size: .8rem;
}

.blow-hole {
    background: #dbeafe;
    border-color: #93c5fd;
}

.draw-hole {
    background: #fee2e2;
    border-color: #fca5a5;
}

.bend-hole {
    background: #fff3cd;
    border-color: #fcd34d;
    min-height: 48px;
}

.hole-note {
    font-weight: 600;
    font-size: .8rem;
}

.hole-tab {
    font-size: .7rem;
    font-weight: 700;
}


/* ====================================================================
   DRUM NOTATION
   ==================================================================== */
.drum-tab {
    font-family: 'Courier New', Courier, monospace;
    font-size: .9rem;
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
    border-radius: 10px;
}

.notation-pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: .9rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 16px;
    overflow-x: auto;
    white-space: pre-wrap;
}


/* ====================================================================
   OSMD / SHEET MUSIC
   ==================================================================== */
.osmd-wrapper {
    min-height: 200px;
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
}

.osmd-wrapper-practice {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    min-height: 300px;
}


/* ====================================================================
   PRACTICE MODE
   ==================================================================== */
.practice-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
}

.practice-header {
    flex-shrink: 0;
    height: 56px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.practice-content {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.practice-notation {
    overflow-y: auto;
    background: var(--practice-bg);
    color: #fff;
}

.practice-sidebar {
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,.1);
}

/* ---- Beat Dots ---- */
.beat-row {
    padding: 8px 0;
}

.beat-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.3);
    transition: background .05s, transform .05s, border-color .05s;
}

.beat-dot-active {
    background: var(--beat-active-color);
    border-color: var(--beat-active-color);
    transform: scale(1.4);
}

.beat-dot-accent {
    background: var(--beat-accent-color) !important;
    border-color: var(--beat-accent-color) !important;
}

/* ---- Metro Pulse Circle ---- */
.metro-pulse-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 3px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .08s, border-color .08s, transform .08s;
    color: #fff;
}

.metro-pulse-circle.active {
    background: var(--beat-active-color);
    border-color: var(--beat-active-color);
    transform: scale(1.12);
    color: #000;
}

/* ---- Practice harmonica view ---- */
.harmonica-practice-view .harmonica-tab {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.1);
}

.harmonica-practice-view .tab-blow {
    background: rgba(13, 110, 253, 0.2);
}
.harmonica-practice-view .tab-draw {
    background: rgba(220, 53, 69, 0.2);
}

/* ---- Drum practice ---- */
.drums-practice-view .drum-tab {
    font-size: 1.1rem;
}


/* ====================================================================
   LYRICS
   ==================================================================== */
.lyrics-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.9;
    white-space: pre-wrap;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
}


/* ====================================================================
   AUTH PAGE
   ==================================================================== */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-page .card {
    border-radius: 16px;
}

.auth-page nav.navbar {
    display: none;
}

.auth-page footer {
    display: none;
}

.auth-page #flash-container {
    display: none;
}


/* ====================================================================
   DARK MODE SUPPORT
   ==================================================================== */
@media (prefers-color-scheme: dark) {
    .harmonica-tab {
        background: #1e293b;
        border-color: #334155;
    }
    .notation-pre {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }
}


/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 768px) {
    .practice-content {
        flex-direction: column;
    }
    .practice-sidebar {
        flex-shrink: 0;
        width: 100% !important;
        min-width: 0 !important;
        order: -1;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,.1);
        padding: 12px;
    }

    .practice-sidebar .d-flex {
        flex-wrap: wrap;
    }

    .harmonica-tab {
        gap: 4px;
        padding: 10px;
    }

    .tab-note {
        min-width: 34px;
        min-height: 34px;
    }

    .song-key-badge {
        width: 30px;
        height: 30px;
        font-size: .75rem;
    }
}

/* ====================================================================
   ANIMATIONS
   ==================================================================== */
@keyframes noteHighlight {
    0%   { box-shadow: 0 0 0 0 var(--harp-active-glow); }
    50%  { box-shadow: 0 0 16px 6px var(--harp-active-glow); }
    100% { box-shadow: 0 0 0 0 var(--harp-active-glow); }
}

.tab-note-active {
    animation: noteHighlight .3s ease;
}

@keyframes beatPulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.beat-dot-active {
    animation: beatPulse .15s ease;
}

/* ====================================================================
   VEXFLOW CONTAINER
   ==================================================================== */
.vexflow-wrapper {
    overflow-x: auto;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    min-height: 120px;
}

/* ====================================================================
   MISCELLANEOUS
   ==================================================================== */
.min-width-0 { min-width: 0; }

.font-monospace { font-family: 'Courier New', Courier, monospace; }

/* Skill level stars */
.skill-stars .filled { color: #ffc107; }
.skill-stars .empty  { color: #dee2e6; }

/* Tab buttons in create form */
.tab-btn-blow:active, .tab-btn-blow.active { background: var(--harp-blow-color); color: #fff; }
.tab-btn-draw:active, .tab-btn-draw.active { background: var(--harp-draw-color); color: #fff; }
.tab-btn-bend:active, .tab-btn-bend.active { background: var(--harp-bend-color); color: #fff; }
