body {
    margin: 0;
    overflow: hidden;
    background-color: #87CEEB;
    font-family: 'Courier New', monospace;
    touch-action: manipulation;
}

#gameContainer {
    position: relative;
    width: 800px;
    height: 400px;
    margin: 20px auto;
    background-color: #5F9EA0;
    overflow: hidden;
    border: 4px solid #654321;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
}

#scoreDisplay {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 20px;
    text-shadow: 2px 2px 4px #000;
    z-index: 10;
}

#livesDisplay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 20px;
    text-shadow: 2px 2px 4px #000;
    z-index: 10;
}

#startScreen,
#gameOverScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

#gameOverScreen {
    display: none;
}

h1 {
    color: #FFD700;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 #654321;
}

button {
    background-color: #FFD700;
    color: #654321;
    border: none;
    padding: 10px 20px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

button:hover {
    background-color: #FFC000;
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.mobile-controls {
    display: none;
    position: absolute;
    bottom: 20px;
    width: 100%;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    user-select: none;
}

/* Back to Menu Button */
.back-to-menu {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 8px 15px;
    background-color: rgba(139, 69, 19, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-to-menu:hover {
    background-color: rgba(139, 69, 19, 0.9);
}

@media (max-width: 800px) {
    .back-to-menu {
        font-size: 14px;
        padding: 6px 12px;
        top: 5px;
        left: 5px;
        background-color: rgba(139, 69, 19, 0.8);
    }

    #gameContainer {
        width: 100%;
        height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
    }

    #gameCanvas {
        width: 100%;
        height: 40%;
    }

    .mobile-controls {
        display: flex;
        bottom: 100px;
        padding: 50px;
    }

    .youtube-logo {
        bottom: 300px;
    }
}