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

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

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 500px;
    max-height: 800px;
    background: #2a2a2a;
    touch-action: none;
    margin: 0 auto;
    overflow: hidden;
}

/* Ensure canvas is fully visible on mobile */
@media (max-width: 500px) {
    #gameContainer {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        /* Prevent scrolling and ensure full viewport */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    /* Ensure canvas fills container properly on mobile */
    object-fit: contain;
}

#ui {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 18px;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#highScore {
    margin-top: 5px;
    font-size: 14px;
    color: #ffd700;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    z-index: 20;
    display: none;
}

#gameOver h2 {
    margin-bottom: 15px;
    font-size: 32px;
}

#gameOver p {
    margin-bottom: 20px;
    font-size: 20px;
}

#restartBtn {
    padding: 12px 30px;
    font-size: 18px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

#restartBtn:hover {
    background: #ff6666;
}

#restartBtn:active {
    background: #cc0000;
}

#startScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    z-index: 20;
}

#startScreen h1 {
    margin-bottom: 20px;
    font-size: 36px;
    color: #ff4444;
}

#startScreen p {
    margin-bottom: 30px;
    font-size: 16px;
}

#startBtn {
    padding: 12px 30px;
    font-size: 18px;
    background: #44ff44;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

#startBtn:hover {
    background: #66ff66;
}

#startBtn:active {
    background: #00cc00;
}

#mobileControls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none !important; /* Hide buttons completely - touch screen is sufficient */
    gap: 20px;
    z-index: 15;
}

.controlBtn {
    width: 70px;
    height: 70px;
    font-size: 32px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.1s;
    display: none !important; /* Hide buttons completely - touch screen is sufficient */
}

.controlBtn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}
