body {
    margin: 0; background: #111; color: #0f0; font-family: monospace;
    overflow: hidden; touch-action: none;
}
canvas { display: block; margin: 0 auto; image-rendering: pixelated; background: #050509; }

.screen {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,20,0,0.97); padding: 30px 50px; border: 4px solid #0f0;
    text-align: center; z-index: 100; max-width: 90%; box-shadow: 0 0 40px #0f0;
}
.hidden { display: none !important; }

/* Animated tutorial / how-to: no box, just a control bar pinned to the bottom
   so the live canvas demonstration stays fully visible. */
.screen.bare {
    top: auto; bottom: 14px; left: 50%; transform: translateX(-50%);
    background: transparent; border: none; box-shadow: none; padding: 0;
}

#ui {
    position: absolute; top: 10px; left: 10px; pointer-events: none;
    text-shadow: 0 0 8px #0f0; font-size: 18px; z-index: 10;
}

button {
    background: #000; color: #0f0; border: 2px solid #0f0;
    padding: 12px 24px; margin: 8px; font-family: monospace; cursor: pointer; font-size: 16px;
}
button:hover { background: #0f0; color: #000; }
.menu-buttons button { display: block; width: 100%; margin: 12px 0; padding: 14px; font-size: 18px; }

#mobile-controls {
    position: absolute; bottom: 20px; left: 0; right: 0; display: flex;
    justify-content: space-between; align-items: flex-end; padding: 0 20px;
    z-index: 50; pointer-events: all;
}
.dpad button { width: 52px; height: 52px; font-size: 26px; margin: 3px; }
.action-cluster { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rotate-row { display: flex; gap: 6px; }
.rotate-row button { width: 52px; height: 52px; font-size: 24px; margin: 0; }
#fire-btn { background: #a00; color: #fff; border: 3px solid #f44; font-size: 18px; padding: 14px 30px; margin: 0; }
#cast-btn { background: #0088ff; color: white; font-size: 18px; padding: 14px 30px; border: 3px solid #0ff; margin: 0; }
