/* Mobile Controls and Responsive Design */
#mobileControls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #0ff;
    border-radius: 10px;
    width: 800px;
    max-width: 100%;
    box-sizing: border-box;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.control-btn {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #0ff, #00bfff);
    border: 3px solid #0ff;
    border-radius: 10px;
    color: #000;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transition: all 0.1s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    margin: 0;
    padding: 0;
}

.control-btn:active {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    background: linear-gradient(45deg, #00bfff, #0ff);
}

.control-btn.pressed {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    background: linear-gradient(45deg, #00bfff, #0ff);
}

#spaceBtn {
    width: 80px;
    height: 170px;
}

/* Tablet/Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    #gameTitle {
        font-size: 2em;
    }
    #gameWrapper {
        gap: 10px;
        align-items: center;
        transform: scale(0.5);
        transform-origin: top center;
        width: 200%;
        margin-bottom: -50%;
    }
    #mainContent {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
    }
    .hud {
        width: 100%;
        max-width: 800px;
        padding: 15px;
        font-size: 1em;
    }
    /* Hide damage HUD elements on mobile */
    #hoarderHUD,
    #trickshotHUD,
    #ballDamageHUD,
    #vampiricHUD {
        display: none !important;
    }
    #gameContainer {
        width: 100%;
        max-width: 800px;
    }
    canvas {
        width: 100%;
        height: auto;
    }
    #mobileControls {
        width: 100%;
        max-width: 800px;
        gap: 30px;
        padding: 15px;
    }
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.2em;
    }
    .shop-items {
        grid-template-columns: 1fr;
    }
    .results-stats {
        grid-template-columns: 1fr;
    }
    .control-btn {
        width: 200px;
        height: 200px;
        font-size: 4em;
        border-radius: 15px;
        border-width: 4px;
    }
    #spaceBtn {
        width: 200px;
        height: 420px;
        font-size: 5em;
    }
    .control-group {
        gap: 15px;
    }
    button {
        padding: 12px 30px;
        font-size: 1em;
    }
    .version-tag {
        font-size: 0.7em;
    }
    #roundInfo {
        font-size: 3em;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    #gameTitle {
        font-size: 1.5em;
    }
    #gameWrapper {
        transform: scale(0.5);
        transform-origin: top center;
        width: 200%;
        margin-bottom: -50%;
    }
    /* Hide damage HUD elements on mobile */
    #hoarderHUD,
    #trickshotHUD,
    #ballDamageHUD,
    #vampiricHUD {
        display: none !important;
    }
    h1 {
        font-size: 1.5em;
    }
    .control-btn {
        width: 160px;
        height: 160px;
        font-size: 3em;
    }
    #spaceBtn {
        width: 160px;
        height: 340px;
        font-size: 4em;
    }
    #mobileControls {
        gap: 20px;
        padding: 10px;
    }
    .control-group {
        gap: 10px;
    }
    #roundInfo {
        font-size: 2.5em;
    }
}
