/* Intervals Page Specific Styles */

.pattern-display-card {
    margin: 8px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.pattern-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60px;
    padding: 16px;
    font-size: 1.4rem;
}

.pattern-desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

.pattern-degrees {
    color: #86efac;
    font-weight: 700;
    font-size: 1.6rem;
}

.pattern-notes {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-left: 8px;
}

.history-text.history-desc {
    color: rgba(255, 255, 255, 0.5);
    min-width: 100px;
}

.history-text.history-degrees {
    color: #86efac;
    font-weight: 600;
}

.history-text.history-notes {
    color: rgba(255, 255, 255, 0.5);
}

/* Voice row layout and transport button looks come from
   practice-controls.css (shared vocabulary). */

/* Interval Display */
.interval-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.interval-prompt {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.interval-notes {
    font-size: 2rem;
    font-weight: 700;
    color: #4ade80;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    letter-spacing: 2px;
}

.interval-feedback {
    font-size: 1rem;
    min-height: 1.5em;
}

.interval-feedback.correct {
    color: #4ade80;
}

.interval-feedback.incorrect {
    color: #f87171;
}

.interval-feedback.info {
    color: rgba(255, 255, 255, 0.7);
}

/* Answer Grid */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.answer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn.correct {
    background: rgba(74, 222, 128, 0.3);
    border-color: #4ade80;
    animation: flash-correct 0.5s ease;
}

.answer-btn.incorrect {
    background: rgba(248, 113, 113, 0.3);
    border-color: #f87171;
    animation: flash-incorrect 0.5s ease;
}

.answer-btn.revealed {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
}

.answer-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.answer-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    text-transform: lowercase;
}

@keyframes flash-correct {
    0%, 100% { background: rgba(74, 222, 128, 0.3); }
    50% { background: rgba(74, 222, 128, 0.6); }
}

@keyframes flash-incorrect {
    0%, 100% { background: rgba(248, 113, 113, 0.3); }
    50% { background: rgba(248, 113, 113, 0.6); }
}

/* Sing Mode Target */
.sing-target {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.sing-prompt {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.pitch-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

.pitch-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4ade80;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    min-width: 100px;
}

.pitch-target {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.pitch-accuracy {
    font-size: 0.9rem;
    min-height: 1.3em;
}

.pitch-accuracy.good {
    color: #4ade80;
}

.pitch-accuracy.close {
    color: #fbbf24;
}

.pitch-accuracy.off {
    color: #f87171;
}

#pitchMeter {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin: 0 auto;
}

.sing-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* Drone Test Panel */
.drone-panel {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px dashed rgba(139, 92, 246, 0.3);
}

.drone-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.drone-header h3 {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.drone-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.drone-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.drone-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.drone-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.drone-stop-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.drone-stop-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.drone-display {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

.drone-target, .drone-current {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.drone-target span, .drone-current span {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 700;
    color: #4ade80;
}

.drone-cents {
    font-size: 0.9rem;
    min-height: 1.5em;
    margin-bottom: 8px;
}

.drone-cents.good { color: #4ade80; }
.drone-cents.close { color: #fbbf24; }
.drone-cents.off { color: #f87171; }

#droneMeter {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

/* Settings Panel */
.ear-settings {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

/* Interval Toggles */
.interval-toggles {
    gap: 4px;
}

.interval-toggle {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.7rem;
    padding: 5px 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.interval-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.interval-toggle.selected {
    background: rgba(74, 222, 128, 0.25);
    border-color: rgba(74, 222, 128, 0.5);
    color: #fff;
}

/* Preset Buttons */
/* Range Slider */
.range-options {
    flex: 1;
    justify-content: space-between;
}

.range-value {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 30px;
}

/* Toggle Switch */
/* Stats Panel */
.stats-panel {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stats-header h3 {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.stats-summary {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

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

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.stats-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.breakdown-interval {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.breakdown-percent {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.breakdown-item.weak {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.breakdown-item.strong {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* History Panel */
.history-panel {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Ears history is a compact chip flow (page modifier on the shared list) */
.history-list-chips {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
}

.history-list-chips .history-item {
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
}

.history-list-chips .history-item.correct {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.history-list-chips .history-item.incorrect {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.history-icon {
    font-size: 0.8rem;
}

/* Voice Commands Reference */
.voice-control-commands {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.voice-control-commands .vcc-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.voice-control-commands code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .answer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-breakdown {
        grid-template-columns: repeat(3, 1fr);
    }


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

@media (max-width: 400px) {
    .answer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }

}

.intervals-mode-switch {
    margin: 8px 0 12px;
}
