* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #1a1a12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
    cursor: crosshair;
}

#game-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas {
    display: block;
}

footer {
    position: fixed;
    bottom: 4px;
    text-align: center;
    z-index: 100;
}

footer a {
    color: #555;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #8faa3b;
}

#mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    z-index: 50;
}

#joystick-zone {
    position: absolute;
    left: 30px;
    bottom: 30px;
    pointer-events: auto;
    touch-action: none;
}

#joystick-base {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(74, 93, 35, 0.2);
    border: 2px solid rgba(74, 93, 35, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(74, 93, 35, 0.5);
    border: 2px solid rgba(74, 93, 35, 0.7);
    position: absolute;
    transition: none;
}

#mobile-buttons {
    position: absolute;
    right: 20px;
    bottom: 30px;
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(74, 93, 35, 0.2);
    border: 2px solid rgba(74, 93, 35, 0.5);
    color: #8faa3b;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.mobile-btn:active {
    background: rgba(74, 93, 35, 0.5);
    transform: scale(0.9);
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    #mobile-controls {
        display: block;
    }
    body {
        cursor: default;
    }
}