body {
    background-color: #000; color: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex; justify-content: center; align-items: center;
    height: 100vh; margin: 0; overflow: hidden; touch-action: none;
}

#game-container {
    position: relative; width: 800px; height: 600px; background-color: #2c2d30;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%),
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.02) 75%, rgba(255,255,255,0.02)),
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.02) 75%, rgba(255,255,255,0.02));
    background-size: 100% 100%, 20px 20px, 30px 30px;
    border: 4px solid #d4af37; border-radius: 8px; overflow: hidden;
}

.screen {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(20, 20, 20, 0.95); z-index: 20;
}

.hidden { display: none !important; }
h1 { color: #d4af37; font-size: 48px; margin-bottom: 25px; margin-top: 0;}

/* NOVOS CAMPOS DE NOME */
.name-inputs { display: flex; gap: 20px; margin-bottom: 25px; justify-content: center; align-items: center; }
.name-inputs input { 
    background: rgba(0,0,0,0.5); border: 2px solid #555; color: #fff;
    padding: 12px; border-radius: 4px; font-weight: bold; text-align: center;
    width: 200px; font-size: 16px; transition: 0.3s; font-family: inherit;
}
.name-inputs input:focus { border-color: #d4af37; outline: none; box-shadow: 0 0 10px rgba(212,175,55,0.3); }

#scoreboard {
    background: #1a1a1a; border: 2px solid #333; padding: 15px 30px;
    border-radius: 4px; margin-bottom: 20px; text-align: center; font-size: 20px; min-width: 300px;
}
#scoreboard p { margin: 5px 0; }
.instructions { display: flex; gap: 30px; margin-bottom: 20px; }
.card { background: #1a1a1a; border-left: 4px solid #d4af37; padding: 15px; border-radius: 4px; text-align: center; min-width: 200px; }
.card p { margin: 5px 0; font-size: 14px;}

button {
    background: transparent; color: #d4af37; border: 2px solid #d4af37;
    padding: 15px 25px; font-size: 16px; font-weight: bold; border-radius: 4px;
    cursor: pointer; transition: 0.3s; text-transform: uppercase;
}
button:hover { background: #d4af37; color: #121212; }
.small-btn { padding: 10px 15px; font-size: 14px; border-color: #555; color: #aaa; margin-top: 10px;}
.small-btn:hover { background: #555; color: #fff; }

canvas { position: absolute; top: 0; left: 0; z-index: 1; }

#sudden-death-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 0, 0, 0.15); z-index: 2; pointer-events: none;
    animation: pulse 1s infinite alternate;
}
@keyframes pulse { from { opacity: 0.2; } to { opacity: 0.6; } }

#hud {
    position: absolute; top: 15px; left: 15px; right: 15px;
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 5; pointer-events: none;
}
.health { font-size: 24px; background: rgba(0, 0, 0, 0.7); padding: 8px 15px; border-radius: 8px; }
#p1-health { border: 2px solid #4A90E2; }
#p2-health { border: 2px solid #D4AF37; }
#timer { font-family: monospace; font-size: 32px; font-weight: bold; background: rgba(0,0,0,0.8); padding: 5px 20px; border-radius: 8px; border: 2px solid #fff; }

#mobile-controls {
    position: absolute; bottom: 20px; left: 10px; right: 10px;
    display: flex; justify-content: space-between; align-items: flex-end; z-index: 10; pointer-events: none;
}
.dpad { display: grid; grid-template-columns: 50px 50px 50px; grid-gap: 5px; pointer-events: auto; }
.btn, .action-btn {
    background: rgba(255, 255, 255, 0.15); border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255,255,255,0.6); border-radius: 8px; display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 20px; user-select: none; height: 50px;
}
.btn:active, .action-btn:active { background: rgba(255, 255, 255, 0.4); }
.action-btn { width: 70px; height: 70px; font-size: 30px; pointer-events: auto; border-radius: 50%; border: 2px solid #ff4757;}
.action-btn.small { width: 50px; height: 50px; font-size: 20px; margin: 0 auto; border-color: #a0a0a0; }