/* Global Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', monospace; /* Retro pixel font */
}

/* Body Styling */
body {
    background: #000; /* Black background for space theme */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    flex-direction: column;
}

/* Main Game Container */
#gameContainer {
    text-align: center;
    position: relative;
}

/* Canvas Styling */
#gameCanvas {
    border: 3px solid #fff; /* White border for the canvas */
    background: #1a1a1a; /* Slightly lighter black for the game background */
    display: block;
    margin: 0 auto;
}

/* Start Button Styling */
.start-button {
    background: #4CAF50; /* Green for Start Button */
    color: #fff;
    border: none;
    padding: 20px 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

/* Hover effect for the start button */
.start-button:hover {
    background: #45a049;
}

/* Score Display Section */
.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

#scoreText,
#highScoreText {
    display: block;
}

/* Pause Overlay Styling */
.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Dark overlay */
    color: #fff;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    text-align: center;
}

.pause-overlay h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.pause-button {
    background: #f39c12; /* Yellow for the pause button */
    color: #fff;
    border: none;
    padding: 20px 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pause-button:hover {
    background: #e67e22;
}

/* Responsive Design */
@media (max-width: 600px) {
    /* Adjust canvas size and score layout for smaller screens */
    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .score-display {
        top: 10px;
        left: 10px;
    }

    .start-button {
        padding: 15px 30px;
        font-size: 18px;
    }
}

.game-over {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 24px;
            text-align: center;
            display: none;
            background: rgba(0, 0, 0, 0.9);
            padding: 30px;
            border-radius: 15px;
            border: 2px solid #4CAF50;
        }

        #leaderboard {
            margin: 20px 0;
            font-size: 16px;
            line-height: 1.5;
        }

        #leaderboard h3 {
            color: #4CAF50;
            margin-bottom: 10px;
            font-size: 18px;
        }