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

body {
    background: #0d0d1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: monospace;
}

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

canvas { 
    border: 2px solid #2a2a5a; 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain;
}

#controls { 
    color: #555; 
    font-size: 12px; 
    margin-top: 8px; 
    letter-spacing: 1px; 
    text-align: center; 
}

.touch-controls {
    display: none;
    position: absolute;
    bottom: 20px;
    width: 100%;
    padding: 0 20px;
    justify-content: space-between;
    pointer-events: none;
}

.btn {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    user-select: none;
    pointer-events: auto;
}

.btn:active { background: rgba(255, 255, 255, 0.3); }

.d-pad { display: flex; gap: 10px; }

@media (pointer: coarse) {
    .touch-controls { display: flex; }
    #controls { display: none; }
}
