/* Estilos HUD - Capa superior sutil y moderna */
.modal-hud-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    justify-content: center;
    align-items: center;
}

.modal-hud-overlay.modal-open {
    display: flex;
    animation: hudFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hudFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(12px); }
}

.modal-hud-container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    position: relative;
    box-sizing: border-box;
}

.modal-hud-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 200001;
}

.modal-hud-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.tuner-hud-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.tuner-hud-header {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
}

.tuner-icon svg {
    width: 24px;
    height: 24px;
    color: #4299e1;
}

.tuner-hud-header h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.tuner-main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.note-box {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.huge-note {
    font-size: 10rem;
    font-weight: 900;
    line-height: 0.8;
    color: #3182ce;
    text-shadow: 0 0 50px rgba(49, 130, 206, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tiny-octave {
    font-size: 3rem;
    font-weight: 300;
    opacity: 0.4;
}

.freq-text {
    font-size: 1.2rem;
    opacity: 0.5;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 10px;
}

.tuner-meter-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.modern-meter {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    position: relative;
    overflow: visible;
}

.meter-center-line {
    position: absolute;
    left: 50%;
    top: -10px;
    bottom: -10px;
    width: 2px;
    background: #38a169;
    box-shadow: 0 0 10px rgba(56, 161, 105, 0.5);
    z-index: 1;
}

.meter-pointer {
    position: absolute;
    left: 50%;
    top: -8px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.cents-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.status-message {
    font-size: 1rem;
    opacity: 0.6;
    font-style: italic;
}

.tuner-visualizer {
    width: 100%;
    height: 80px;
    opacity: 0.3;
}

#visualizer {
    width: 100%;
    height: 100%;
}

.hud-action-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(49, 130, 206, 0.3);
}

.hud-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(49, 130, 206, 0.4);
    background: #4299e1;
}

.hud-action-btn.active {
    background: #e53e3e;
    box-shadow: 0 10px 20px rgba(229, 62, 62, 0.3);
}

/* Colores de afinación */
.in-tune { color: #38a169 !important; text-shadow: 0 0 50px rgba(56, 161, 105, 0.5) !important; }
.slightly-off { color: #ecc94b !important; }
.out-of-tune { color: #e53e3e !important; }

@media (max-width: 600px) {
    .huge-note { font-size: 7rem; }
    .modal-hud-container { padding: 20px; }
    .modal-hud-close { top: 20px; right: 20px; width: 40px; height: 40px; }
}
