/* Gamable V4 shell styles - base layout and the mobile touch controls (from the V2 shell). */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a12;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#gamable-game-zone {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
/* --- Touch Controls (mobile only) --- */
#gamable-touch-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 9999;
    display: none;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}
#gamable-touch-controls.active { display: flex; justify-content: space-between; align-items: flex-end; }

.gamable-dpad {
    position: relative;
    width: 140px;
    height: 140px;
    pointer-events: all;
}
.gamable-dpad-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}
.gamable-dpad-btn:active, .gamable-dpad-btn.pressed {
    background: rgba(255,255,255,0.35);
}
.gamable-dpad-up    { top: 0; left: 50%; transform: translateX(-50%); }
.gamable-dpad-down  { bottom: 0; left: 50%; transform: translateX(-50%); }
.gamable-dpad-left  { left: 0; top: 50%; transform: translateY(-50%); }
.gamable-dpad-right { right: 0; top: 50%; transform: translateY(-50%); }

.gamable-action-buttons {
    display: flex;
    gap: 12px;
    pointer-events: all;
}
.gamable-action-btn {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}
.gamable-action-btn:active, .gamable-action-btn.pressed {
    background: rgba(255,255,255,0.35);
}

.gamable-toggle-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10000;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Show touch UI only on touch devices */
@media (hover: none) and (pointer: coarse) {
    .gamable-toggle-controls { display: flex; }
}
@media (hover: hover) and (pointer: fine) {
    #gamable-touch-controls { display: none !important; }
    .gamable-toggle-controls { display: none !important; }
}
