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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    background-attachment: fixed;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 840px;
    min-height: 100vh;
}

.game-container {
    position: relative;
    width: 800px;
    height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    margin: auto;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
}

#score {
    font-size: 24px;
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
}

#gameCanvas {
    background: #87CEEB;
    border-radius: 5px;
    width: 760px;
    height: 500px;
    display: block;
}

#startMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
    margin-top: auto;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .game-wrapper {
        padding: 15px;
    }

    .game-container {
        width: 90vw;
        height: calc(90vw * 0.75);
        padding: 15px;
    }

    #gameCanvas {
        width: calc(90vw - 30px);
        height: calc((90vw - 30px) * 0.75);
    }

    h1 {
        font-size: 28px;
    }

    #score {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .game-wrapper {
        padding: 10px;
    }

    .game-container {
        width: 95vw;
        height: calc(95vw * 0.75);
        padding: 10px;
    }

    #gameCanvas {
        width: calc(95vw - 20px);
        height: calc((95vw - 20px) * 0.75);
    }

    h1 {
        font-size: 24px;
    }

    #score {
        font-size: 20px;
    }

    #startMessage {
        font-size: 20px;
        padding: 15px;
    }
} 