/* ==========================================================================
   Immersive Pitch Coach - Real-Time In-Pitch HUD Overlay Styles
   ========================================================================== */

.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
}

/* ==========================================================================
   Top HUD Bar & Status Pills
   ========================================================================== */
.hud-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    pointer-events: auto;
    position: relative;
    z-index: 30;
}

.hud-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

/* Microphone Pill */
.mic-pill {
    color: var(--text-primary);
}

.audio-wave-meter {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.audio-wave-meter .bar {
    width: 3px;
    height: 14px;
    background-color: var(--accent-emerald);
    border-radius: 2px;
    transform: scaleY(0.3);
    transition: transform 0.08s ease;
}

/* Timer Pill & Threshold Morphing Colors (Section 13) */
.timer-pill {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 10px 24px;
}

/* 0–45s Normal (Green/Cyan Glow) */
.timer-pill.status-normal {
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

/* 45–55s Warning (Amber/Yellow Glow) */
.timer-pill.status-warning {
    border-color: rgba(245, 158, 11, 0.6);
    color: #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    animation: warningPulse 1.2s infinite ease-in-out;
}

/* 55–60s Critical (Rose/Red Glow) */
.timer-pill.status-critical {
    border-color: rgba(244, 63, 94, 0.8);
    color: #f43f5e;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.6);
    animation: criticalFlash 0.6s infinite alternate;
}

/* >60s Overtime (Violent Red) */
.timer-pill.status-overtime {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.8);
}

/* Top Right Controls */
.hud-top-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.btn-icon.active-dimmed {
    opacity: 0.5;
}

/* ==========================================================================
   Real-Time Subtitles & Transcript Bar (Section 12)
   ========================================================================== */
.hud-subtitles-bar {
    width: 100%;
    max-width: 860px;
    margin: 0 auto 10px;
    padding: 16px 24px;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.hud-subtitles-bar.hidden-subtitles {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
}

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

.subtitles-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitles-title-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stt-status-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.subtitles-wpm {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.subtitles-content {
    max-height: 80px;
    overflow-y: auto;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.subtitles-content .placeholder-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}

.subtitles-content .interim {
    color: var(--accent-blue);
    font-style: italic;
    opacity: 0.9;
}

/* Inline Quick Test Input */
.subtitles-input-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-quick-input {
    width: 100%;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.hud-quick-input:focus {
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Timer Keyframes
   ========================================================================== */
@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes criticalFlash {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.85; transform: scale(1.08); }
}
