/* game-aquabrain.css — AquaBrain.io giao diện mới (templates/pages/games/aquabrain.html + aquabrain/_overlays.html).
   Bản vẽ GC_AB_0..7, GC_AB_M_Play. JS game cũ bật/tắt khối bằng style.display: 'flex' (sảnh, HUD, lớp phủ cả màn
   hình), 'block' (màn chơi, bản đồ nhỏ, thanh trên, hộp giữa màn hình) → mỗi id mặc định display:none ở đây.
   body.mobile-mode do aquabrain_touch.js gắn khi app điện thoại mở trang (?mobile=1). */

.gs.ab { min-height: 0; }
body:has(.gs.ab) { overflow: hidden; height: 100vh; }
.ab-grow { flex-grow: 1; min-width: 0; }

/* ── Sảnh ─────────────────────────────────────────────────────────── */
#lobby {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  display: flex; flex-direction: column; background: var(--bg);
}
.ab-lobby { width: 100%; max-width: 600px; margin: 0 auto; padding: 40px 40px 120px; }
.ab-h1 { font-size: 32px; }
.ab-input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
}
.ab-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.ab-input-hint { margin: 6px 0 20px; font-size: 12px; color: var(--faint); }
.ab-rooms { display: flex; flex-direction: column; gap: 8px; }
.room-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg);
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.room-btn:hover { border-color: var(--faint); }
.room-btn.active { border: 2px solid var(--accent); background: var(--callout); padding: 0 13px; }
.ab-radio { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--faint); }
.room-btn.active .ab-radio { border: 5px solid var(--accent); background: var(--bg); }
.ab-room-name { flex-grow: 1; font-size: 14px; font-weight: 500; }
.room-btn.active .ab-room-name { font-weight: 600; }
.room-players { font-size: 13px; color: var(--muted); }
.ab-h3 { margin: 28px 0 4px; font-size: 16px; font-weight: 700; }
.ab-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.ab-branches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ab-branch { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ab-branch-top { height: 52px; display: grid; place-items: center; }
.ab-branch-name { margin: 10px 12px 0; font-size: 14px; font-weight: 600; }
.ab-branch-desc { margin: 2px 12px 6px; font-size: 12px; color: var(--muted); }
.ab-branch-path { margin: 0 12px 12px; font-size: 12px; color: var(--text); }
.ab-learn { margin: 8px 0 0; padding: 0; list-style: none; }
.ab-learn li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 4px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text); }
.ab-learn .icon { color: var(--blue); }

/* ── Trong trận ───────────────────────────────────────────────────── */
#game-container {
  display: none; position: fixed; inset: 0; z-index: 1;
  min-width: 100vw; min-height: 100vh; background: var(--dark);
}
#game-container canvas { display: block; }

#leave-btn { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 200; }
.ab-topbar .gs-bar { background: rgba(255, 255, 255, 0.94); }

#hud {
  display: none; position: fixed; top: 72px; left: 16px; right: 16px; z-index: 50;
  justify-content: space-between; align-items: flex-start; pointer-events: none;
}
.ab-card {
  pointer-events: auto; padding: 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.96); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(15, 23, 42, 0.06);
}
.hud-left { width: 280px; max-height: calc(100vh - 100px); overflow-y: auto; }
.hud-right { width: 240px; }
.ab-lv { display: flex; align-items: baseline; gap: 8px; }
.hud-level { font-size: 20px; font-weight: 700; }
.hud-class { font-size: 14px; color: var(--text); }
.ab-zone { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ab-zone-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ab-evolve { margin: 10px 0 4px; padding: 8px 10px; border-radius: var(--r); background: var(--amber-bg); }
.ab-evolve-text { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--amber); }
.ab-evolve-track { margin-top: 5px; height: 5px; border-radius: 3px; background: var(--sand-bg); overflow: hidden; }
.ab-evolve-fill { width: 0; height: 100%; background: var(--amber); transition: width 0.3s ease; }
.hud-label { display: flex; justify-content: space-between; margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.ab-key-hint { color: var(--faint); }
.hud-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.hud-bar-fill { height: 100%; border-radius: 3px; transition: width 0.2s; }
.hp-fill { width: 100%; background: var(--green); }
.exp-fill { width: 0; background: var(--blue); }
.stamina-fill { width: 100%; background: var(--amber); }

.skill-panel { display: none; margin-top: 14px; }
.skill-panel-title { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.skill-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.skill-icon {
  position: relative; width: 32px; height: 32px; flex-shrink: 0; overflow: hidden;
  border-radius: var(--r-md); background: var(--blue-bg); color: var(--blue);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 2px solid transparent; transition: border-color 0.2s;
}
.skill-icon.ready { border-color: var(--accent); }
.skill-icon.passive { background: var(--bg-soft); color: var(--muted); }
.skill-cd-overlay { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(15, 23, 42, 0.55); }
.skill-cd-text { position: absolute; inset: 0; display: none; place-items: center; text-align: center; line-height: 28px; font-size: 13px; font-weight: 800; color: var(--on-accent); }
.skill-info { flex-grow: 1; min-width: 0; }
.skill-name { margin: 0; font-size: 13px; font-weight: 600; }
.skill-desc { margin: 0; font-size: 12px; color: var(--muted); }
.skill-badge-passive { flex-shrink: 0; font-size: 11px; height: 20px; }

.lb-title { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.lb-title .icon { color: var(--amber); }
.lb-row { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 6px; border-radius: var(--r-sm); font-size: 13px; }
.lb-row.is-me { background: var(--callout); font-weight: 600; }
.lb-rank { width: 16px; color: var(--muted); display: grid; place-items: center; }
.lb-rank .icon { color: var(--amber); }
.lb-name { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-lv { color: var(--muted); }

.ab-keys { position: fixed; left: 16px; bottom: 16px; margin: 0; display: flex; gap: 8px; pointer-events: none; }
.ab-keys span {
  padding: 4px 8px; border-radius: var(--r-sm); background: var(--bg); box-shadow: 0 0 0 1px var(--line);
  font-size: 12px; color: var(--muted);
}

#minimap {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 150px; height: 150px; padding: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.96); box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* ── Lớp phủ cả màn hình (JS: 'flex') ─────────────────────────────── */
.ab-overlay {
  display: none; position: fixed; inset: 0; z-index: 800;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 23, 42, 0.32);
}
#reconnect-overlay { z-index: 9999; }
.ab-dialog-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ab-dialog-head .gs-dialog-icon, .ab-dialog-head .gs-dialog-title { margin: 0; }
.ab-w440 { width: 440px; }
.ab-tight { margin-bottom: 16px; }
.ab-resume-info { padding: 4px 14px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--r-md); }
.ab-resume-info .prop-name { width: 110px; }

/* ── Hộp giữa màn hình (JS: 'block') ──────────────────────────────── */
.ab-box {
  display: none; position: fixed; top: 50%; left: 50%; z-index: 820; transform: translate(-50%, -50%);
  max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 24px; border-radius: 12px; background: var(--bg); color: var(--ink);
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.32), 0 12px 40px rgba(15, 23, 42, 0.18);
}
.ab-w480 { width: 480px; }
.ab-w500 { width: 500px; }
.ab-w820 { width: 820px; }
.ab-quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ab-quiz-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; }
.ab-quiz-title { margin: 0; font-size: 15px; font-weight: 600; }
.ab-quiz-sub { margin: 0; font-size: 13px; color: var(--muted); }
.ab-question { margin: 0 0 14px; font-size: 22px; font-weight: 700; line-height: 1.4; }

.ab-duel-vs {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 12px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--bg-side);
  font-size: 14px; font-weight: 600;
}
.ab-duel-vs span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ab-duel-vs .is-atk { color: var(--red); }
.ab-duel-vs .is-def { color: var(--blue); justify-content: flex-end; }
.ab-duel-mid { font-size: 12px; font-weight: 700; color: var(--faint); }
.ab-duel-role { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ab-duel-hint { font-size: 13px; color: var(--muted); }
.ab-duel-result { text-align: center; padding: 8px 0; display: flex; flex-direction: column; align-items: center; }
.ab-duel-result-t { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.ab-duel-result.is-win .ab-duel-result-t { color: var(--green); }
.ab-duel-result.is-lose .ab-duel-result-t { color: var(--red); }
.ab-duel-result-m { margin: 0; font-size: 14px; color: var(--muted); }

.ab-evolve-title { font-size: 26px; }
.ab-evolve-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.evolve-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; cursor: pointer;
}
.evolve-card:hover, .evolve-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.evolve-top { height: 72px; display: grid; place-items: center; }
.evolve-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.evolve-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.evolve-branch { font-size: 12px; font-weight: 600; color: var(--muted); }
.evolve-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ── Quản trị ─────────────────────────────────────────────────────── */
/* Chỉ hiện khi đang trong phòng (JS game đặt #hud display:flex) — cần roomId mới áp dụng được. */
body:not(.mobile-mode) #admin-panel { display: none; }
body:not(.mobile-mode) #hud[style*="flex"] ~ #admin-panel { display: block; }
#admin-panel {
  position: fixed; left: 16px; bottom: 56px; z-index: 300; width: 190px; padding: 12px 14px;
  border-radius: 10px; background: var(--bg); box-shadow: var(--shadow-pop); font-size: 12px;
}
.admin-title { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--amber); }
#admin-panel label { display: block; margin: 6px 0 2px; color: var(--muted); }
#admin-panel input[type=range], #admin-panel select { width: 100%; }
#admin-panel select { height: 30px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; }
#admin-apply { width: 100%; margin-top: 8px; height: 32px; }
#admin-toggle { display: none; }

/* ── Điều khiển cảm ứng (chỉ app điện thoại) ──────────────────────── */
#mobile-joystick-zone { display: none; position: fixed; left: 20px; bottom: 20px; width: 130px; height: 130px; z-index: 1000; touch-action: none; }
#mobile-joystick-base {
  position: relative; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px var(--line);
}
#mobile-joystick-knob {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--bg);
  box-shadow: 0 0 0 1px var(--faint), 0 2px 6px rgba(15, 23, 42, 0.1);
}
#mobile-actions { display: none; position: fixed; right: 20px; bottom: 20px; width: 160px; height: 160px; z-index: 1000; pointer-events: none; }
#m-btn-dash {
  position: absolute; right: 0; bottom: 0; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  pointer-events: auto; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#m-btn-dash:active { background: var(--accent-hover); }
.m-skill-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--bg);
  color: var(--blue); font-size: 16px; font-weight: 700;
  pointer-events: auto; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.m-skill-btn:active { background: var(--blue-bg); }
.m-skill-btn.on-cd { opacity: 0.4; }

body.mobile-mode #mobile-joystick-zone, body.mobile-mode #mobile-actions { display: block; }
/* App tự có nút quay lại ở góc trên trái → ẩn thanh trên, HUD gọn và chừa chỗ bên trái. */
body.mobile-mode #leave-btn { display: none !important; }
body.mobile-mode #hud { top: 8px; left: 56px; right: 8px; }
body.mobile-mode .hud-left { width: 180px; padding: 8px 10px; }
body.mobile-mode .hud-level { font-size: 15px; }
body.mobile-mode .hud-class, body.mobile-mode .ab-zone, body.mobile-mode .ab-key-hint,
body.mobile-mode .skill-panel, body.mobile-mode .ab-keys { display: none !important; }
body.mobile-mode .ab-evolve { margin: 6px 0 2px; padding: 4px 6px; }
body.mobile-mode .hud-label { margin: 4px 0 2px; font-size: 11px; }
body.mobile-mode .hud-right { width: 140px; padding: 6px 8px; opacity: 0.9; }
body.mobile-mode .lb-row { height: 20px; font-size: 11px; }
body.mobile-mode .leaderboard { max-height: 96px; overflow: hidden; }
body.mobile-mode #minimap { width: 65px; height: 65px; right: 12px; bottom: 180px; opacity: 0.7; }
body.mobile-mode #admin-panel { left: auto; right: 12px; bottom: auto; top: 60px; display: none; }
body.mobile-mode #admin-panel.expanded { display: block; }
body.mobile-mode #admin-toggle {
  display: grid; place-items: center; position: fixed; top: 8px; right: 156px; z-index: 10000;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--amber);
}
body.mobile-mode #lobby .gs-bar { padding-left: 64px; }

@media (max-width: 860px) {
  .ab-lobby { padding: 24px 16px 110px; }
  .ab-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-left { width: 220px; }
  .hud-right { width: 170px; }
}
@media (max-height: 520px) {
  .ab-box, .gs-dialog { padding: 16px; }
  .ab-question { font-size: 18px; margin-bottom: 10px; }
  .gs-opt { min-height: 40px; padding: 6px 12px; }
  .ab-evolve-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .evolve-top { height: 44px; }
}

/* ══ Phong cách TỐI · PHÁT SÁNG của bản đầu (templates/aquabrain.html trước 19/09/2026) ══════════════
   Bản giao diện mới 19/09 đổi mọi bảng trong trận sang thẻ TRẮNG đè lên biển tối → mất chất game. Khôi phục
   màu gốc: nền xanh đen #0a1628, kính tối viền xanh phát sáng, cấp xanh neon, thanh chuyển màu, hộp quiz viền
   vàng, đấu tay đôi viền đỏ, tiến hoá viền xanh lá. Giữ BỐ CỤC của khung GC_AB_* (chỉ đổi màu/chất liệu).
   Cách làm như Kanji Arena (game-arena.css): đặt lại biến màu phong cách C BÊN TRONG các khối trong trận
   → mọi thành phần dùng chung (gs-dialog, gs-opt, btn, tag, props, gs-ring, gs-stats) tự tối theo.
   Sảnh (#lobby) giữ phong cách C sáng như khung GC_AB_1. */
#hud, #minimap, .ab-keys, .ab-overlay, .ab-box, #leave-btn, #admin-panel, #mobile-joystick-zone, #mobile-actions {
  --bg: #0f1e3a; --bg-side: #132647; --bg-soft: #16294a; --line: rgba(100, 200, 255, 0.2);
  --ink: #e2e8f0; --text: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --accent: #00d4ff; --accent-hover: #33ddff; --accent-soft: rgba(0, 212, 255, 0.16); --callout: rgba(0, 212, 255, 0.12);
  --on-accent: #04121f;
  --green: #00ff88; --green-bg: rgba(0, 255, 136, 0.12); --green-tag: rgba(0, 255, 136, 0.14);
  --blue: #5cb8ff; --blue-bg: rgba(92, 184, 255, 0.14); --blue-tag: rgba(92, 184, 255, 0.16);
  --amber: #ffd700; --amber-bg: rgba(255, 215, 0, 0.12); --sand-bg: rgba(255, 215, 0, 0.2);
  --red: #ff5a5a; --red-bg: rgba(255, 68, 68, 0.15); --violet: #c49bff; --violet-bg: rgba(196, 155, 255, 0.15);
  --shadow-pop: 0 10px 34px rgba(0, 0, 0, 0.55);
  color: var(--ink);
}
#game-container { background: #0a1628; }
.ab-card, #minimap, #admin-panel {
  background: rgba(10, 20, 40, 0.85); border: 1px solid rgba(100, 200, 255, 0.2);
  box-shadow: 0 0 18px rgba(0, 150, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  /* KHÔNG dùng backdrop-filter: nền sau bảng là khung game vẽ lại 60 lần/giây → trình duyệt phải làm mờ
     lại mỗi khung hình, dễ giật trên điện thoại yếu. Nền 85% tối đã đủ đọc. */
}
.hud-level { font-size: 22px; font-weight: 800; color: #00d4ff; text-shadow: 0 0 12px rgba(0, 212, 255, 0.45); }
.hud-class { color: #8fa3bd; }
.ab-evolve { background: rgba(255, 215, 0, 0.08); border: 1px solid rgba(255, 215, 0, 0.22); }
.ab-evolve-text { color: #ffe27a; }
.ab-evolve-track { background: rgba(0, 0, 0, 0.45); }
.ab-evolve-fill { background: linear-gradient(90deg, #ffa500, #ffd700); box-shadow: 0 0 8px rgba(255, 200, 0, 0.5); }
.hud-bar { height: 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); }
.hp-fill { background: linear-gradient(90deg, #ff4444, #ff6666); box-shadow: 0 0 8px rgba(255, 68, 68, 0.5); }
.exp-fill { background: linear-gradient(90deg, #00ccff, #00ff88); box-shadow: 0 0 8px rgba(0, 220, 200, 0.5); }
.stamina-fill { background: linear-gradient(90deg, #ffa500, #ffd700); box-shadow: 0 0 8px rgba(255, 190, 0, 0.45); }
.ab-zone { color: var(--text); font-weight: 600; }
.ab-zone .icon { flex-shrink: 0; }
.skill-row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.skill-row:last-child { border-bottom: 0; }
.skill-icon { width: 34px; height: 34px; background: #1e293b; border: 2px solid #3a4658; color: #cfe8ff; }
.skill-icon.ready { border-color: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.55); }
.skill-icon.passive { border-color: #3a4658; background: #182233; opacity: 0.85; }
.skill-icon .ab-key { position: absolute; right: -1px; bottom: -1px; min-width: 13px; height: 13px; padding: 0 2px;
  border-radius: 4px 0 4px 0; background: #0a1628; color: #9fdcff; font-size: 9px; font-weight: 800; line-height: 13px; text-align: center; z-index: 1; }
.skill-cd-overlay { background: rgba(4, 10, 22, 0.72); }
.lb-title .icon, .lb-rank .icon { color: #ffd700; }
.lb-row { color: #cbd5e1; }
.lb-row:nth-of-type(1) .lb-name, .lb-row:nth-of-type(1) .lb-lv { color: #ffd700; font-weight: 700; }
.lb-row.is-me { background: rgba(0, 212, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.35); }
.ab-keys span { background: rgba(10, 20, 40, 0.8); box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.2); color: #94a3b8; }
/* Thanh trên: kính tối, nút Rời phòng đỏ như bản đầu */
.ab-topbar .gs-bar { background: rgba(10, 22, 40, 0.82); border-bottom: 1px solid rgba(100, 200, 255, 0.18); color: var(--ink);
}
.ab-topbar .gs-bar .btn { background: rgba(180, 30, 30, 0.9); border-color: rgba(255, 120, 120, 0.7); color: #fff; }
.ab-topbar .gs-bar .btn:hover { background: rgba(255, 50, 50, 0.85); }
.ab-topbar .gs-bar a, .ab-topbar .gs-bar button:not(.btn) { color: var(--ink); }
/* Lớp phủ + hộp giữa màn hình */
.ab-overlay { background: rgba(0, 0, 0, 0.62); }
.ab-overlay .gs-dialog, .ab-box { background: rgba(10, 20, 50, 0.97); color: var(--ink); border: 1px solid rgba(100, 200, 255, 0.25);
  box-shadow: 0 0 40px rgba(0, 150, 255, 0.18), 0 16px 48px rgba(0, 0, 0, 0.55); }
.ab-box { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 150, 255, 0.18); }
#quiz-popup { border: 2px solid rgba(255, 215, 0, 0.5); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 215, 0, 0.22); }
#quiz-popup .gs-ring-fg { stroke: #ffd700; }
#quiz-popup .gs-ring-n { color: #ffd700; font-weight: 800; }
#duel-popup { background: rgba(28, 4, 8, 0.96); border: 2px solid #ff4444; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 0, 0, 0.35); }
#duel-popup .ab-duel-vs { background: rgba(255, 68, 68, 0.1); }
#duel-popup .ab-duel-vs .is-atk { color: #ff8888; }
#duel-popup .gs-opt { background: rgba(255, 68, 68, 0.12); border-color: rgba(255, 68, 68, 0.6); }
#duel-popup .gs-opt:hover { background: rgba(255, 68, 68, 0.3); }
#evolve-popup { background: rgba(10, 30, 20, 0.97); border: 2px solid rgba(0, 255, 100, 0.4); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 255, 120, 0.2); }
.ab-evolve-title { color: #00ff88; text-shadow: 0 0 14px rgba(0, 255, 136, 0.4); }
.evolve-card { background: rgba(20, 50, 40, 0.8); border: 1px solid rgba(0, 255, 100, 0.22); color: var(--ink); transition: transform 0.15s, border-color 0.15s; }
.evolve-card:hover, .evolve-card:focus-visible { border-color: #00ff88; box-shadow: 0 0 14px rgba(0, 255, 136, 0.3); transform: translateY(-2px); }
.evolve-top { height: 84px; background: none; }
.ab-evo-orb { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--orb, #00ff88); box-shadow: 0 0 18px var(--orb, #00ff88), inset 0 -6px 12px rgba(0, 0, 0, 0.25); }
.evolve-name { color: #fff; }
#death-screen .gs-dialog { background: rgba(20, 10, 10, 0.96); border-color: rgba(255, 50, 50, 0.35); box-shadow: 0 0 40px rgba(255, 40, 40, 0.2); }
#death-screen .gs-dialog-title { color: #ff4444; font-weight: 800; }
#death-screen [data-action="ab-respawn"] { background: linear-gradient(135deg, #ff4444, #ff6666); border: 0; color: #fff; }
.ab-overlay .gs-opt, .ab-box .gs-opt { background: rgba(30, 60, 100, 0.55); border-color: rgba(100, 200, 255, 0.2); color: var(--ink); }
.ab-overlay .gs-opt:hover, .ab-box .gs-opt:hover { background: rgba(0, 150, 255, 0.28); border-color: #00d4ff; }
/* Điều khiển cảm ứng */
#mobile-joystick-base { background: rgba(10, 20, 40, 0.45); box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.25); }
#mobile-joystick-knob { background: rgba(0, 212, 255, 0.35); box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.6), 0 0 12px rgba(0, 212, 255, 0.4); }
#m-btn-dash { background: linear-gradient(135deg, #00b4ff, #00d4ff); color: #04121f; box-shadow: 0 0 16px rgba(0, 212, 255, 0.5); }
.m-skill-btn { background: rgba(10, 20, 40, 0.85); border: 1px solid rgba(100, 200, 255, 0.35); color: #cfe8ff; }
.m-skill-btn:active { background: rgba(0, 150, 255, 0.3); }
body.mobile-mode #admin-toggle { background: rgba(10, 20, 40, 0.85); border-color: rgba(100, 200, 255, 0.3); }
