/* ============================================================
   chatbox_game_pac_man.css
   Pannello & Gioco Pac Man
   ============================================================ */

#pacman-panel {
    position: absolute;
    inset: 10px;
    z-index: 20;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0;
    color: #eee;
    font-size: 0.88em;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
#pacman-panel .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}
#pacman-panel .game-title  { color: #fff; font-weight: bold; }
#pacman-panel .game-close  { color: #aaa; cursor: pointer; font-size: 1.1em; }
#pacman-panel .game-close:hover { color: #fff; }

/* Body */
#pacman-panel .game-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    overflow: hidden;
    gap: 8px;
}

/* HUD */
#pacman-panel .game-hud {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    font-size: 0.82em;
    color: #aaa;
    padding: 0 2px;
    flex-shrink: 0;
}
#pacman-panel .game-hud span { color: #fff; font-weight: bold; }

/* Canvas */
#pacman-canvas {
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    display: block;
    width: 80%;
    aspect-ratio: 448 / 496;
    max-height: calc(100% - 40px);
}

/* Messaggi overlay */
#pacman-panel .game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    gap: 12px;
    z-index: 10;
}
#pacman-panel .game-overlay h2 { color: #fff; margin: 0; font-size: 1.4em; }
#pacman-panel .game-overlay p  { color: #aaa; margin: 0; font-size: 0.85em; }

/* Footer */
#pacman-panel .game-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

/* Bottoni */
#pacman-panel .game-btn {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.15s;
}
#pacman-panel .game-btn:hover  { background: #3a3a3a; color: #fff; }
#pacman-panel .game-btn.primary { background: #4a3a00; border-color: #aa8800; color: #ffd700; }
#pacman-panel .game-btn.primary:hover { background: #5a4a00; }

/* Info controlli */
#pacman-panel .game-controls-hint {
    font-size: 0.75em;
    color: #666;
    text-align: center;
    flex-shrink: 0;
}
