/* --- RESET E ESTILO BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    background-color: #000;
    color: #eee;
    font-family: 'Cinzel', serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- HUD (Interface de Jogo) --- */
#hud {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-container, .stamina-container {
    width: 300px;
    height: 15px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#healthBar {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #600, #b00, #f22);
    transition: width 0.3s ease-out;
}

#staminaBar {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #052, #184, #2c6);
    transition: width 0.15s ease-out;
}

.souls-container {
    font-size: 1.2rem;
    color: #daa520;
    text-shadow: 2px 2px 4px #000;
}

#lowerHud {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 10;
}

.item-count {
    width: 50px; height: 50px;
    border: 2px solid #daa520;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: bold; background: rgba(0,0,0,0.6);
}

/* --- TÍTULO DE NOVA ÁREA (CENTRALIZADO) --- */
#phaseTitle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%); /* Centro vertical exato */
    text-align: center;
    font-size: 60px;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 10px #000;
    pointer-events: none;
    z-index: 50;
    letter-spacing: 10px;
    text-transform: uppercase;
}

.fade-in-out {
    animation: areaIntro 4s forwards;
}

@keyframes areaIntro {
    0% { opacity: 0; transform: translateY(-50%) scale(0.9); filter: blur(10px); }
    20% { opacity: 1; transform: translateY(-50%) scale(1); filter: blur(0); }
    80% { opacity: 1; transform: translateY(-50%) scale(1.05); filter: blur(0); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.1); filter: blur(5px); }
}

/* --- MENUS E OVERLAYS --- */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    z-index: 100;
}

.hidden { 
    display: none !important; 
}

#deathMenu { 
    background: radial-gradient(circle, #200 0%, #000 100%); 
}

.death-text { 
    font-size: 85px; 
    color: #8b0000; 
    letter-spacing: 15px; 
    margin-bottom: 40px; 
    animation: bloodDrip 3s ease-in-out; 
}

@keyframes bloodDrip {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

button {
    background: none; 
    border: 1px solid #daa520; 
    color: #daa520;
    padding: 12px 40px; 
    font-family: 'Cinzel', serif; 
    cursor: pointer;
    transition: 0.3s; 
    margin: 10px; 
    letter-spacing: 2px;
}

button:hover { 
    background: rgba(218, 165, 32, 0.2); 
    color: #fff; 
}