* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 2px solid #00ffff;
    border-radius: 10px;
    background: #000011;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ui-overlay > * {
    pointer-events: auto;
}

.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.score-display > div {
    margin-bottom: 5px;
}

.health-bar-container {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: center;
}

.health-bar-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.health-bar {
    width: 150px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.health-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000 0%, #ffff00 50%, #00ff00 100%);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.game-menu, .game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.game-menu h1, .game-over h2 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.game-menu p {
    margin-bottom: 15px;
    color: #cccccc;
    font-size: 1.1em;
}

.game-button {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border: none;
    color: #000;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
    background: linear-gradient(45deg, #00ffff, #00aaff);
}

.game-button:active {
    transform: translateY(0);
}

#pauseButton {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1em;
}

/* Responsive design */
@media (max-width: 900px) {
    #gameCanvas {
        width: 90vw;
        height: 67.5vw; /* 4:3 aspect ratio */
        max-height: 90vh;
    }
    
    .game-menu, .game-over {
        padding: 20px;
        margin: 20px;
    }
    
    .game-menu h1, .game-over h2 {
        font-size: 2em;
    }
}

/* Animation for score updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #00ffff; }
    100% { transform: scale(1); }
}

.score-update {
    animation: scoreUpdate 0.3s ease;
}
