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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    overflow: hidden; /* Prevent scrolling on mobile */
}

.game-container {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh; /* Take full viewport height */
    max-width: 800px; /* Limit max width to original game width */
    max-height: 500px; /* Limit max height to original game height */
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    background: #000;
    border: 3px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    width: 100%; /* Make canvas responsive */
    height: auto; /* Maintain aspect ratio */
    max-width: 800px; /* Original width */
    max-height: 500px; /* Original height */
    aspect-ratio: 800 / 500; /* Preserve aspect ratio */
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    font-size: 1.5em;
    width: 100%;
    max-width: 800px; /* Match canvas width */
}

.score {
    background: rgba(255, 215, 0, 0.1);
    padding: 10px 30px;
    border-radius: 5px;
    border: 1px solid #ffd700;
}

.controls {
    margin-top: 20px;
    width: 100%;
    max-width: 800px; /* Match canvas width */
}

.controls p {
    margin-bottom: 15px;
    color: #ccc;
}

#startButton {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 10px 30px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

#startButton:hover {
    background: #ffed4a;
    transform: scale(1.05);
}

#startButton:active {
    transform: scale(0.95);
}

.mode-select {
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px; /* Match canvas width */
}

.mode-select button {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 10px 30px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s, background 0.2s;
}

.mode-select button:hover {
    background: #ffed4a;
    transform: scale(1.05);
}

.mode-select button:active {
    transform: scale(0.95);
}

#modeSelect {
    display: flex;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Orientation Notice for Portrait Mode */
@media screen and (orientation: portrait) {
    .game-container {
        display: none;
    }
    .back-button {
        display: none;
    }
    .orientation-notice {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        font-size: 1.2em;
        padding: 20px;
    }
}

@media screen and (orientation: landscape) {
    .orientation-notice {
        display: none;
    }
}

@media (max-width: 820px) and (max-height: 520px) and (orientation: landscape) {
    .game-container {
        transform: scale(0.8);
    }
}

/* Adjustments for smaller screens */
@media (max-width: 700px) {
    h1 {
        font-size: 1.8em;
    }
    .score-board {
        font-size: 1.2em;
    }
    .score {
        padding: 8px 20px;
    }
    #startButton, .mode-select button {
        padding: 8px 20px;
        font-size: 1em;
    }
    .controls p {
        font-size: 0.9em;
    }
} 