* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none;
    /* Prevent browser zooming/scrolling on touch */
    user-select: none;
    /* Prevent text selection */
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #050510;
    /* Deep space dark blue */
}

canvas {
    display: block;
}

/* Mobile Controls - Hidden by default */
#mobile-controls {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through areas without buttons */
}

#joystick-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    /* Left half of screen */
    height: 60%;
    /* Lower 60% of screen */
    pointer-events: auto;
    /* No visual indicator - invisible touch area */
}

/* Hide visual joystick elements */
#joystick-base {
    display: none;
}

#joystick-handle {
    display: none;
}

#fire-zone {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    /* Right half */
    height: 60%;
    /* Lower 60% */
    pointer-events: auto;
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    align-items: flex-end;
    /* Align to bottom */
    padding: 30px;
    /* Padding from edges */
}

#fire-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 50, 50, 0.3);
    border: 2px solid rgba(255, 50, 50, 0.6);
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

#fire-btn:active {
    background: rgba(255, 50, 50, 0.6);
    transform: scale(0.95);
}

/* Arrow Controls */
#arrow-controls {
    position: absolute;
    left: 30px;
    bottom: 20px;
    /* Anchor to bottom */
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: auto;
}

.arrow-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 255, 100, 0.3);
    border: 2px solid rgba(0, 255, 100, 0.6);
    color: #00ff66;
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.4);
    user-select: none;
}

.arrow-btn:active {
    background: rgba(0, 255, 100, 0.6);
    transform: scale(0.95);
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.8);
}

.control-label {
    display: none;
    /* Hide labels since joystick is invisible */
}

/* Landscape Warning */
#landscape-warning {
    display: none;
    /* Shown via JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
}

.warning-content {
    animation: rotate-phone 2s infinite;
}

.phone-icon {
    font-size: 60px;
    margin-bottom: 20px;
    display: inline-block;
}

@keyframes rotate-phone {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(90deg);
    }

    75% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}