* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Courier New', monospace; }
body { background: #1a1a2e; color: #fff; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; }
#game-container { position: relative; display: flex; flex-direction: row; align-items: stretch; border: 3px solid #fff; background: #16213e; box-shadow: 0 0 28px rgba(0,0,0,0.85); }

#left-sidebar { width: 148px; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 8px; background: #0f3460; border-right: 3px solid #fff; font-weight: bold; }
.left-top { display: flex; flex-direction: column; gap: 8px; }
#gold-display { font-size: 12px; line-height: 1.45; color: #f1c40f; background: #071952; border: 1px solid #00d2d3; padding: 7px; text-align: left; }
.audio-controls { display: flex; flex-direction: column; gap: 6px; background: #071952; border: 1px solid #00d2d3; padding: 7px; }
.vol-row { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #00d2d3; cursor: pointer; }
.vol-row input[type="range"] { width: 100%; accent-color: #f1c40f; cursor: pointer; height: 14px; }
.side-buttons { display: flex; flex-direction: column; gap: 7px; }
.top-btn { width: 100%; background: #000080; color: #fff; border: 2px solid #fff; padding: 7px 6px; cursor: pointer; font-weight: bold; font-size: 12px; text-align: center; }
.top-btn:hover { background: #e94560; border-color: #f1c40f; }

canvas { display: block; background: #16213e; cursor: pointer; }

#right-sidebar { width: 172px; display: flex; flex-direction: column; justify-content: space-between; padding: 8px 7px; background: #000080; border-left: 3px solid #fff; gap: 8px; }
#action-menu { display: flex; flex-direction: column; gap: 5px; width: 100%; }
#action-menu button { width: 100%; background: #0f3460; color: #fff; border: 2px solid #fff; padding: 7px 5px; text-align: center; cursor: pointer; font-size: 12px; font-weight: bold; }
#action-menu button.selected { background: #e94560; border-color: #f1c40f; }
#action-menu button.disabled, #action-menu.waiting button { opacity: 0.35; cursor: not-allowed; }
#action-menu.hidden { display: none; }

#power-hotbar { display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%; flex: 1; align-content: end; }
#power-hotbar button { background: #071952; color: #fff; border: 1px solid #00d2d3; padding: 5px 5px; font-size: 10px; font-weight: bold; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
#power-hotbar button:hover:not(.disabled) { background: #e94560; border-color: #f1c40f; }
#power-hotbar button.disabled { opacity: 0.35; cursor: not-allowed; border-color: #555; }
#power-hotbar.hidden { display: none; }

.hidden { display: none !important; }
#modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.78); display: flex; justify-content: center; align-items: center; z-index: 50; pointer-events: auto; }
#modal-box { background: #000080; border: 3px solid #fff; padding: 14px 16px; width: 680px; max-width: 96%; text-align: center; pointer-events: auto; }
#modal-box h3 { margin-bottom: 8px; color: #f1c40f; }
#modal-body p { margin: 8px 0; font-size: 14px; line-height: 1.4; }
.desc-box { background: #0a194e; border: 1px solid #00d2d3; color: #00d2d3; padding: 7px; margin-bottom: 8px; font-size: 12px; min-height: 36px; }
.modal-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; max-height: 280px; overflow-y: auto; margin: 10px 0; text-align: left; }
#modal-box button { background: #0f3460; color: #fff; border: 2px solid #fff; padding: 6px 10px; cursor: pointer; font-weight: bold; font-size: 12px; pointer-events: auto; }
#modal-box button.selected, #modal-box button:hover { background: #e94560; border-color: #f1c40f; }
#btn-close-modal { margin-top: 8px; width: 45%; }

.ff-layout { display: flex; gap: 10px; text-align: left; align-items: stretch; }
.ff-panel { background: #071952; border: 2px solid #fff; padding: 8px; border-radius: 3px; }
.ff-left { flex: 1.45; display: flex; flex-direction: column; justify-content: space-between; }
.ff-right { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.ff-right .modal-list { grid-template-columns: 1fr; max-height: none; overflow-y: visible; gap: 5px; }
.ff-char { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid #1e3799; padding: 6px 0; }
.ff-char:last-child { border-bottom: none; }
.ff-avatar { width: 28px; height: 28px; border: 2px solid #fff; flex-shrink: 0; }
.xp-bar-bg { width: 100%; height: 6px; background: #222; border: 1px solid #aaa; margin-top: 3px; }
.xp-bar-fill { height: 100%; background: #00d2d3; }
.intel-card { display: flex; align-items: center; gap: 8px; background: #0a194e; border: 1px solid #fff; padding: 6px; font-size: 11px; }
.enemy-swatch { width: 20px; height: 20px; border: 1px solid #fff; flex-shrink: 0; }

