* {
    box-sizing: border-box
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0b2b13;
    color: #fff;
    margin: 0;
    padding: 12px;
    text-align: center
}

header h1 {
    margin: 6px 0
}

#menu {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px
}

select,
button {
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    background: #1a8;
    color: #012;
    cursor: pointer
}

#gameCanvas {
    background: #0a5a2b;
    display: block;
    margin: 10px auto;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6)
}

#hud {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 8px
}

#modal.hidden {
    display: none
}

#modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.6)
}

#modal-content {
    background: #fff;
    color: #000;
    padding: 16px;
    border-radius: 8px;
    width: 320px
}

#touch-controls {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

#touch-controls button {
    width: 48px;
    height: 48px;
    font-size: 2rem;
    background: #1a8;
    color: #012;
    border: none;
    border-radius: 50%;
    margin: 2px;
    opacity: 0.85;
    box-shadow: 0 2px 8px #0006;
}

#touch-controls.hidden {
    display: none;
}

@media (min-width: 700px) {
    #touch-controls { display: none !important; }
}