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

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #000;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px #FFD700;
    letter-spacing: 2px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 1.3em;
    font-weight: bold;
}

.score, .lives {
    color: #FFD700;
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

#soundToggle {
    min-height: 44px;
    min-width: 120px;
    border: 3px solid #FFD700;
    border-radius: 10px;
    background: #1a1a1a;
    color: #FFD700;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px 18px;
}

#soundToggle[aria-pressed="true"] {
    background: #FFD700;
    color: #111;
}

#soundToggle:focus-visible {
    outline: 3px solid #CC0000;
    outline-offset: 3px;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 4px solid #FFD700;
    border-radius: 15px;
    cursor: pointer;
    touch-action: none;
    width: 100%;
    height: auto;
    max-width: 800px;
}

.instructions {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
    color: #333;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 10px;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over.hidden {
    display: none;
}

.game-over-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-over h2 {
    color: #CC0000;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.game-over p {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #333;
}

.game-over button {
    background: #000;
    color: #FFD700;
    border: 3px solid #FFD700;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.game-over button:hover {
    background: #FFD700;
    color: #000;
    transform: scale(1.05);
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }

    .stats {
        gap: 20px;
        font-size: 1em;
    }

    #soundToggle {
        min-height: 44px;
        width: 100%;
        max-width: 220px;
    }

    .instructions {
        font-size: 0.9em;
    }
}
