:root {
    --btn-color: rgba(255, 255, 255, 0.25);
    --btn-border: rgba(255, 255, 255, 0.4);
    --btn-active: rgba(255, 255, 255, 0.6);
}

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

body {
    background: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Varela Round', sans-serif;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

#gameScreen {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #5c94fc;
    image-rendering: pixelated;
    display: block;
}

.hud-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let touches pass through the empty spaces */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5vmin;
    z-index: 100;
}

.bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex: 1;
}

.movement-controls {
    pointer-events: auto;
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-controls {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mobile-btn {
    background: var(--btn-color);
    border: 2px solid var(--btn-border);
    border-radius: 50%;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.1s ease-out;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.mobile-btn:active, .mobile-btn.active {
    background: var(--btn-active);
    transform: scale(0.9);
    border-color: rgba(255,255,255,0.8);
}

.dir-btn {
    width: 18vmin;
    height: 18vmin;
    min-width: 60px;
    min-height: 60px;
    max-width: 100px;
    max-height: 100px;
    font-size: 24px;
}

.act-btn {
    width: 20vmin;
    height: 20vmin;
    min-width: 70px;
    min-height: 70px;
    max-width: 110px;
    max-height: 110px;
    font-size: 14px;
}

.start-btn {
    pointer-events: auto;
    align-self: flex-end;
    width: auto;
    height: auto;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 12px;
    border-width: 1px;
}
