:root {
    --bg-color: #0b0e14;
    --panel-color: #161b22;
    --neon-blue: #2563eb;
    --neon-glow: rgba(37, 99, 235, 0.4);
    --pacman-yellow: #fbbf24;
    --danger: #ef4444;
    --text-color: #e6edf3;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    touch-action: manipulation;
}

.arcade-container { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 100%; max-width: 500px; padding: 10px; }
.header { display: flex; justify-content: space-between; width: 100%; align-items: center; }
h1 { font-size: 1.2rem; color: var(--pacman-yellow); margin: 0; }
.score-board { background: var(--panel-color); padding: 8px; border-radius: 6px; font-size: 0.8rem; border: 1px solid #30363d; color: var(--pacman-yellow); min-width: 100px; text-align: center; }

.game-area { position: relative; border: 4px solid var(--neon-blue); border-radius: 12px; box-shadow: 0 0 20px var(--neon-glow); background: #000; }
#pacmanCanvas { display: block; max-width: 100%; height: auto; }

.overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 20; border-radius: 8px; }
.overlay.hidden { display: none; }
.speed-control { margin-bottom: 20px; }
.speed-control label { display: block; color: var(--pacman-yellow); font-size: 0.8rem; margin-bottom: 10px; }

.action-buttons { display: flex; gap: 10px; width: 100%; }
.action-btn { flex: 1; border: none; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: inherit; }
.action-btn.pause { background: var(--pacman-yellow); color: #000; }
.action-btn.stop { background: var(--danger); color: #fff; }

/* RODYKLĖS: Pagal nutylėjimą paslėptos (desktopui) */
.controls-mobile { display: none; flex-direction: column; align-items: center; gap: 5px; margin-top: 10px; }
.ctrl-row { display: flex; gap: 5px; }
.ctrl-btn { width: 60px; height: 60px; background: var(--panel-color); border: 1px solid #30363d; border-radius: 12px; color: white; font-size: 1.5rem; }

.btn { background: var(--pacman-yellow); border: none; padding: 12px 30px; font-weight: bold; border-radius: 30px; cursor: pointer; }
.hint { color: #8b949e; font-size: 0.75rem; }
kbd { background: #21262d; border: 1px solid #30363d; padding: 2px 5px; border-radius: 4px; }

/* Rodyti tik mobiliuose arba mažuose ekranuose */
@media (max-width: 768px), (pointer: coarse) {
    .controls-mobile { display: flex; }
    .hint { display: none; }
    footer { display: none; } /* Slėpiame, kad neatimtų vietos iš mygtukų */
}


