/* Mobile-spezifische CSS-Ergänzungen */

/* Debug: Roter Rahmen um mobile-controls zum Testen */
.mobile-controls {
    border: 3px solid red !important;
}

/* Stelle sicher, dass Mobile Controls auf Touch-Geräten immer sichtbar sind */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(0, 0, 0, 0.9) !important;
        padding: 10px 5px !important;
        height: 120px !important;
        align-items: center !important;
        justify-content: center !important;
        border: 3px solid red !important;
    }

    /* Canvas anpassen damit Platz für Controls bleibt */
    #gameContainer {
        padding-bottom: 130px !important;
    }

    canvas {
        width: 100% !important;
        height: calc(100vh - 200px) !important;
        max-height: calc(100vh - 200px) !important;
    }

    /* Sicherstellen dass alle Control-Buttons sichtbar sind */
    .control-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 45px !important;
        min-height: 45px !important;
        background: linear-gradient(145deg, #3a3a3a, #2a2a2a) !important;
        border: 2px solid #555 !important;
        color: white !important;
        font-size: 18px !important;
        border-radius: 12px !important;
        touch-action: manipulation !important;
    }

    .control-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 500px !important;
    }

    .control-group {
        display: flex !important;
        gap: 8px !important;
    }
}

/* Auch für alle Bildschirmgrößen sichtbar machen (zum Testen) */
@media (max-width: 1200px) {
    .mobile-controls {
        display: flex !important;
    }
}

/* Touch-Feedback verbessern */
.control-btn:active {
    transform: scale(0.9);
    transition: transform 0.1s;
}

/* Touch-Responsiveness für sehr kleine Bildschirme */
@media (max-width: 320px) {
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .jump-btn,
    .shoot-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .speech-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .mobile-controls {
        height: 70px;
        padding: 3px;
    }

    .control-group {
        gap: 4px;
    }
}

/* iOS Safari spezifische Anpassungen */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    .control-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-appearance: none;
        appearance: none;
    }
}