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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* Canvas füllt immer exakt den Viewport - keine Balken */
canvas {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    touch-action: none;
}

/* ── Querformat-Overlay ─────────────────────────────────────── */
#orientationOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: sans-serif;
    font-size: 1.3rem;
    text-align: center;
    gap: 0.5rem;
}

.rotate-icon {
    font-size: 4rem;
    animation: rotateHint 1.5s ease-in-out infinite;
}

@keyframes rotateHint {
    0%, 100% { transform: rotate(0deg); }
    50%       { transform: rotate(90deg); }
}

/* ── Touch-Buttons: innerhalb des Canvas-Bereichs, kein overflow ── */
#touchControls {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    gap: 10px;
    z-index: 200;
    flex-direction: row;
    /* Buttons dürfen Layout nicht sprengen */
    pointer-events: auto;
}

.touch-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.touch-btn:active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

/* 🔵 Schießen-Button */
#touchShoot {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 200, 255, 0.12);
    border: 2px solid rgba(0, 200, 255, 0.5);
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(0, 200, 255, 0.8);
    z-index: 200;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#touchShoot:active {
    background: rgba(0, 200, 255, 0.3);
    border-color: rgba(0, 200, 255, 1.0);
}