* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

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

.game-container {
    position: relative;
    width: 800px;
    height: 600px;
    border: 4px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    text-align: center;
}

.hidden {
    display: none;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
}

p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.instructions {
    text-align: left;
    margin: 20px 0;
    list-style-type: none;
}

.instructions li {
    margin-bottom: 10px;
    font-size: 16px;
}

.power-up {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
}

.power-up.water {
    background-color: rgba(0, 100, 255, 0.3);
}

.power-up.fire {
    background-color: rgba(255, 50, 0, 0.3);
}

.power-up.earth {
    background-color: rgba(0, 150, 0, 0.3);
}

.power-up.air {
    background-color: rgba(200, 200, 255, 0.3);
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#game-canvas {
    background-color: #87CEEB;
    width: 100%;
    height: 100%;
}

.hud {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    gap: 20px;
}

.score, .active-power {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 18px;
}

/* Element-specific effects */
.water-active {
    background: linear-gradient(to bottom, #87CEEB, #1E90FF);
}

.fire-active {
    background: linear-gradient(to bottom, #87CEEB, #FF4500);
}

.earth-active {
    background: linear-gradient(to bottom, #87CEEB, #228B22);
}

.air-active {
    background: linear-gradient(to bottom, #87CEEB, #E6E6FA);
}

/* Sound control */
.sound-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.sound-toggle-game {
    margin-left: auto;
}

#sound-toggle, #sound-toggle-game, #sound-toggle-gameover {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
    font-size: 20px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sound-toggle:hover, #sound-toggle-game:hover, #sound-toggle-gameover:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive design for smaller screens */
@media (max-width: 820px) {
    .game-container {
        width: 100%;
        height: 100vh;
        border: none;
        border-radius: 0;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .instructions li {
        font-size: 14px;
    }
}