/* Pitch Meter Styles */

/* Mode Selection Row */
.mode-settings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    padding: 10px 16px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.2);
    flex-wrap: wrap;
}

.mode-settings .setting-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-group .vf-label {
    margin-bottom: 0;
}

.pitch-settings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    flex-wrap: wrap;
}

.pitch-settings .setting-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Control buttons: same layout as the shared voice row; button looks
   come from the shared transport set (listen/stop/play). */
.pitch-controls {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
}

.pitch-controls .listen-button {
    flex: 1;
}

/* Real-time Pitch Display */
.pitch-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    flex-wrap: wrap;
}

.current-pitch {
    text-align: center;
}

.pitch-note {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    margin-bottom: 4px;
    transition: color 0.1s ease;
}

.pitch-cents {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.pitch-freq {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Cents Indicator Bar */
.pitch-indicator {
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

.indicator-bar {
    position: relative;
    height: 20px;
    background: linear-gradient(to right,
            #f87171 0%,
            #facc15 35%,
            #4ade80 45%,
            #4ade80 55%,
            #facc15 65%,
            #f87171 100%);
    border-radius: 10px;
    overflow: visible;
}

.indicator-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 28px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: left 0.05s ease-out, background 0.1s ease;
}

.indicator-center {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 26px;
    background: rgba(255, 255, 255, 0.6);
}

.indicator-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Chart Container */
.chart-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

#pitchChart {
    display: block;
    width: 100%;
}

/* Results Panel */
.results-panel {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.results-panel h3 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    color: #a7f3d0;
}

.results-summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.result-item {
    text-align: center;
}

.result-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e8f5e9;
}

/* Note Breakdown */
.note-breakdown h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.note-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 6px;
}

.note-result .note-name {
    font-weight: 600;
    min-width: 40px;
    color: #a7f3d0;
}

.note-result .note-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.note-status.note-good {
    background: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.note-status.note-ok {
    background: rgba(250, 204, 21, 0.3);
    color: #facc15;
}

.note-status.note-poor {
    background: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.note-status.note-missed {
    background: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.4);
}

.note-result .note-deviation {
    flex: 1;
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .pitch-settings {
        gap: 12px;
    }

    .pitch-controls {
        flex-wrap: wrap;
    }

    .pitch-display {
        flex-direction: column;
        gap: 20px;
    }

    .pitch-note {
        font-size: 2.5rem;
    }

    .results-summary {
        flex-direction: column;
        gap: 15px;
    }

    .result-value {
        font-size: 1.5rem;
    }
}