:root {
    --do: #d41e1e; --re: #f18c4d; --mi: #ffda43; 
    --fa: #10ad54; --sol: #38b6ff; --la: #004aad; --si: #7c45e8;
}

body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000; font-family: 'Montserrat', sans-serif; touch-action: none; user-select: none; }

#cinema-stage {
    width: 100vw; height: 100vh;
    background: radial-gradient(circle, #4fb3ff 0%, #1a73e8 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative;
}

#performance-screen {
    width: 90%; aspect-ratio: 16/9; max-height: 60vh;
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    position: relative; overflow: hidden;
    cursor: pointer; z-index: 10;
    margin-top: 50px; 
    /* NOVA PARTE: Faixas horizontais alternadas (branco e cinza muito claro) */
    background: repeating-linear-gradient(
        0deg,
        #ffffff,
        #ffffff 20%,
        #f2f5f8 20%,
        #f2f5f8 40%
    );
}

#controles-canto { position: absolute; top: 15px; right: 20px; display: flex; gap: 12px; z-index: 150; align-items: center; }
.btn-icone { font-size: 1.4rem; color: rgba(0,0,0,0.5); cursor: pointer; transition: 0.2s; background: rgba(255,255,255,0.95); border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-icone:hover { color: rgba(0,0,0,0.9); transform: scale(1.1); background: #fff; }

.estilo-velocidade { font-size: 1rem; color: rgba(0,0,0,0.7); cursor: pointer; transition: 0.2s; background: rgba(255,255,255,0.95); border-radius: 25px; height: 45px; padding: 0 15px; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-family: 'Montserrat', sans-serif; font-weight: 900; outline: none; }
.estilo-velocidade:hover { color: rgba(0,0,0,0.9); transform: scale(1.05); }

#playhead { position: absolute; left: 20%; top: 0; width: 8px; height: 100%; background: #10ad54; z-index: 20; box-shadow: 0 0 30px #10ad54, 0 0 15px rgba(16, 173, 84, 0.8); }
#scrolling-track { position: absolute; top: 0; left: 0; width: 10000px; height: 100%; will-change: transform; }

#notes-layer { position: absolute; width: 100%; height: 100%; z-index: 5; }

.note-ball {
    position: absolute; width: 7vw; height: 7vw; max-width: 80px; max-height: 80px; min-width: 50px; min-height: 50px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: clamp(1.2rem, 3vw, 2rem); transform: translateY(-50%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3), inset 0 -8px 15px rgba(0,0,0,0.4);
    transition: transform 0.1s, opacity 0.5s ease-out;
}
.note-ball.hit { transform: translateY(-50%) scale(1.3); filter: brightness(1.3); }
.note-ball.played { opacity: 0; transform: translateY(-50%) scale(0.5); } 

#progress-container { position: absolute; bottom: 0; left: 0; width: 100%; height: 8px; background: rgba(0,0,0,0.1); z-index: 30; }
#progress-bar { width: 0%; height: 100%; background: var(--sol); transition: width 0.1s linear; }

.logo-overlay { position: absolute; top: 20px; left: 30px; width: 90px; z-index: 50; }
.mascote { position: absolute; bottom: 30px; width: 130px; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3)); z-index: 5; }
.left-side { left: 30px; } .right-side { right: 30px; }

#bell-guide { display: flex; gap: 1%; justify-content: center; margin-top: 10px; height: 18vh; align-items: flex-end; width: 95%; z-index: 20; }
.bell-img { width: 11%; max-width: 130px; min-width: 70px; transition: transform 0.1s, filter 0.1s; cursor: pointer; }
.bell-img.hit-bell { transform: translateY(-20px) scale(1.15); filter: drop-shadow(0px 0px 25px rgba(255, 255, 255, 0.9)) brightness(1.3); }

#play-overlay, #pause-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; z-index: 100; }
.play-circle, .pause-icon { font-size: clamp(4rem, 10vw, 7rem); color: #fff; margin-bottom: 10px; text-shadow: 0 10px 20px rgba(0,0,0,0.5); }
#pause-overlay { background: rgba(0,0,0,0.5); }

#countdown-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.85); display: flex; align-items: center; justify-content: center; z-index: 95; }
#countdown-text { font-size: clamp(6rem, 15vw, 10rem); color: var(--sol); text-shadow: 0 10px 20px rgba(0,0,0,0.2); animation: pulse 0.6s infinite alternate; margin: 0; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.1); } }

#lock-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.1); display: flex; align-items: flex-start; justify-content: center; z-index: 300; padding-top: 25px; }
.btn-desbloquear { background: rgba(0,0,0,0.6); color: white; padding: 15px 30px; border-radius: 30px; font-weight: bold; font-size: 1.2rem; cursor: pointer; backdrop-filter: blur(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: 0.2s; }
.btn-desbloquear:hover { background: rgba(0,0,0,0.8); transform: scale(1.05); }

#config-modal, #cast-modal { position: absolute; inset: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 200; cursor: default; }
.cast-box { background: white; padding: 30px; border-radius: 20px; width: 80%; max-width: 400px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.cast-box h2 { margin-top: 0; color: #333; }
.estilo-select { width: 100%; padding: 12px; border-radius: 10px; border: 2px solid #ddd; font-size: 1rem; font-family: 'Montserrat'; font-weight: bold; color: #555; margin-top: 5px; }

.game-screen { position: absolute; inset: 0; background: rgba(255,255,255,0.95); z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; }
.titulo-padrao { font-size: clamp(2.5rem, 6vw, 4rem); color: #333; margin-bottom: 5px; text-align: center; }
.subtitulo-padrao { font-size: clamp(1.2rem, 3vw, 1.5rem); color: #666; margin-bottom: 25px; text-align: center; }
.btn-main { border: none; padding: 15px 40px; border-radius: 30px; font-size: clamp(1.1rem, 2.5vw, 1.3rem); font-weight: bold; cursor: pointer; background: #27ae60; color: white; box-shadow: 0 10px 20px rgba(39, 174, 96, 0.4); transition: transform 0.2s; }
.btn-main:hover { transform: scale(1.05); }

@media (max-height: 600px) and (orientation: landscape) {
    #performance-screen { width: 96%; max-height: 52vh; border-radius: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.5); margin-top: 45px; }
    .logo-overlay { width: 60px; top: 10px; left: 20px; }
    .mascote { width: 90px; bottom: 10px; }
    .left-side { left: 10px; } .right-side { right: 10px; }
    #bell-guide { margin-top: 5px; height: 28vh; }
    .bell-img { max-width: 90px; } 
    .staff-lines { top: 20%; height: 60%; } 
    #controles-canto { top: 10px; right: 15px; }
    .btn-icone { width: 35px; height: 35px; font-size: 1.1rem; }
    .estilo-velocidade { height: 35px; font-size: 0.85rem; }
    #lock-overlay { padding-top: 10px; } 
    .btn-desbloquear { font-size: 0.9rem; padding: 10px 20px; } 
}
/* =========================================
   MELHORIAS: EFEITOS E MODO TREINO
   ========================================= */

/* 1. MODO TREINO (Esconde as letras suavemente) */
#notes-layer.ocultar-letras .note-ball span {
    opacity: 0 !important; /* Deixa o texto invisível */
    transition: opacity 0.3s; /* Faz sumir com estilo */
}

/* =========================================
   EFEITO CONFETES (Ao acertar a nota)
   ========================================= */
.confeti-particula {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px; /* Deixe 50% se preferir confetes redondos */
    pointer-events: none;
    z-index: 100;
    animation: explosaoConfete 0.5s ease-out forwards;
}

@keyframes explosaoConfete {
    0% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1; 
    }
    100% { 
        /* As variáveis --tx, --ty e --rot são injetadas pelo JavaScript! */
        transform: translate(var(--tx), var(--ty)) scale(0.2) rotate(var(--rot)); 
        opacity: 0; 
    }
}