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

body {
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

header {
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #FFCC00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
    margin-bottom: 10px;
}

.score-board {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    font-weight: bold;
}

.score-board div {
    background-color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 0 5px;
}

.game-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

#gameCanvas {
    background-color: #000;
    border: 2px solid #333;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
}

.overlay h2 {
    font-size: 2.5em;
    color: #FFCC00;
    margin-bottom: 20px;
}

.overlay p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

#restartButton, #playAgainButton {
    background-color: #FFCC00;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#restartButton:hover, #playAgainButton:hover {
    background-color: #FFDD33;
}

.controls {
    margin-top: 20px;
    font-size: 1.1em;
    color: #CCC;
}

.hidden {
    display: none;
}

@media (max-width: 650px) {
    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    
    header h1 {
        font-size: 2em;
    }
}