* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', cursive;
}

body {
    background-color: #202020;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    display: inline-block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.start-screen {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(190, 25, 25, 0.32), rgba(0, 0, 0, 0.95));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    flex-direction: column;
    pointer-events: auto;
    gap: 14px;
    padding: 20px;
}

.start-title {
    color: #fff;
    font-size: clamp(30px, 6vw, 64px);
    text-shadow: 4px 4px 0 #c00;
    letter-spacing: 2px;
}

.start-subtitle {
    color: #facd09;
    text-shadow: 2px 2px 0 #000;
    font-size: 14px;
    margin-bottom: 8px;
}

.login-card,
.controls-card {
    width: min(90vw, 540px);
    background: rgba(0, 0, 0, 0.75);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #000;
    padding: 14px;
}

.login-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-card label {
    color: #fff;
    font-size: 12px;
}

.arcade-input {
    border: 3px solid #fff;
    background: #151515;
    color: #fff;
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
}

.arcade-input:focus {
    border-color: #facd09;
}

.start-help,
.controls-card p {
    color: #fff;
    font-size: 10px;
    line-height: 1.6;
}

.start-help {
    text-align: center;
    opacity: 0.85;
}

.start-error {
    min-height: 12px;
    color: #ff4f4f;
    font-size: 10px;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed */
    display: flex;
    flex-direction: column;
}

#health-bars {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 100%;
}

#health-bars,
#display-text,
.arcade-btn {
    pointer-events: auto;
}

#music-toggle {
    position: absolute;
    top: 92px;
    right: 20px;
    z-index: 6;
    pointer-events: auto;
}

.player-health,
.enemy-health {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: white;
    text-shadow: 2px 2px 0 #000;
}

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

.round-indicator {
    color: #ffe36e;
    font-size: 12px;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
}

.score-label {
    font-size: 10px;
    color: #f1f1f1;
    opacity: 0.95;
}

.player-health {
    align-items: flex-start;
}

.enemy-health {
    align-items: flex-end;
}

.health-bar-container {
    width: 100%;
    height: 30px;
    background-color: #c00;
    /* Damage color (red background) */
    border: 3px solid white;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.health-fill {
    background-color: #0c0;
    /* Health color (green) */
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
    /* Optional: gradient for arcade look */
    background: linear-gradient(to bottom, #86e01e 0%, #86e01e 50%, #72d00b 51%, #72d00b 100%);
}

#timer {
    background-color: #facd09;
    color: #000;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: 3px solid white;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

#display-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 48px;
    text-shadow: 4px 4px 0 #000;
    display: flex;
    /* Hidden by default via inline style */
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border: 4px solid white;
    z-index: 10;
}

.combo-announcer {
    position: absolute;
    left: 50%;
    top: 140px;
    transform: translateX(-50%);
    color: #ffcf33;
    text-shadow: 3px 3px 0 #000;
    font-size: 18px;
    min-height: 26px;
    pointer-events: none;
    z-index: 7;
}

canvas {
    background-color: #000;
    /* Fallback */
    display: block;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.arcade-btn {
    background-color: #c00;
    color: white;
    border: 4px solid white;
    padding: 15px 30px;
    font-size: 24px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.arcade-btn:hover {
    background-color: #f00;
    transform: scale(1.05);
}

.arcade-btn:active {
    transform: scale(0.95);
}

.arcade-mini-btn {
    background-color: #0f3250;
    color: #fff;
    border: 3px solid #fff;
    padding: 10px 12px;
    font-size: 10px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.arcade-mini-btn:hover {
    background-color: #19507f;
}
