/**
 * August Gunfight 2.0 — giao diện (dark, namespace .agf-*). Author: August — https://augustcsgo.com
 */
.agf-wrap {
	--agf-bg: #0b0f1e;
	--agf-panel: #141a33;
	--agf-panel-2: #1b2244;
	--agf-line: #2a3363;
	--agf-text: #e6e9f5;
	--agf-dim: #8c93b8;
	--agf-cyan: #36d6ff;
	--agf-hot: #ff4d8d;
	--agf-red: #ff5a5a;
	--agf-blue: #4d8dff;
	--agf-green: #2fd67b;
	--agf-gold: #ffc94d;
	--agf-head: 'Orbitron', 'Rajdhani', sans-serif;
	color: var(--agf-text);
	font-family: 'Rajdhani', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	box-sizing: border-box;
}
.agf-wrap *, .agf-wrap *::before, .agf-wrap *::after { box-sizing: inherit; }
body.agf-game-body { margin: 0; background: #0b0f1e; min-height: 100vh; }
body.agf-game-body .agf-wrap { max-width: 1240px; margin: 0 auto; padding: 16px; }

.agf-wrap .agf-empty { padding: 48px 16px; text-align: center; color: var(--agf-dim); background: var(--agf-panel); border: 1px solid var(--agf-line); border-radius: 12px; }
.agf-wrap .agf-muted { color: var(--agf-dim); font-size: 14px; }
.agf-wrap .agf-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--agf-panel-2); border: 1px solid var(--agf-line); font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.agf-wrap .agf-badge--live { color: var(--agf-green); border-color: rgba(47,214,123,.4); }
.agf-wrap .agf-badge--fair { color: var(--agf-gold); border-color: rgba(255,201,77,.4); }

.agf-wrap button { margin: 0; min-height: 0; box-shadow: none; text-shadow: none; line-height: 1.2; }
.agf-wrap .agf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--agf-cyan); color: #06101f; font: 700 15px/1 'Rajdhani', sans-serif; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: transform .1s, filter .15s; }
.agf-wrap .agf-btn:hover, .agf-wrap .agf-btn:focus { filter: brightness(1.1); background: var(--agf-cyan); color: #06101f; }
.agf-wrap .agf-btn--hot:hover, .agf-wrap .agf-btn--hot:focus { background: var(--agf-hot); color: #fff; }
.agf-wrap .agf-btn--ghost:hover, .agf-wrap .agf-btn--ghost:focus { background: var(--agf-panel-2); color: #fff; border-color: var(--agf-cyan); }
.agf-wrap .agf-btn:active { transform: scale(.97); }
.agf-wrap .agf-btn--hot { background: var(--agf-hot); color: #fff; }
.agf-wrap .agf-btn--ghost { background: transparent; color: var(--agf-text); border: 1px solid var(--agf-line); }
.agf-wrap .agf-btn--sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Lobby ---------- */
.agf-lobby .agf-lobby-head { text-align: center; margin-bottom: 18px; }
.agf-lobby .agf-title { font-family: var(--agf-head); font-size: 30px; letter-spacing: 4px; margin: 0; color: #fff; }
.agf-lobby .agf-sub { color: var(--agf-dim); margin: 6px 0 0; }
.agf-wrap .agf-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.agf-wrap .agf-room-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: linear-gradient(160deg, var(--agf-panel-2), var(--agf-panel)); border: 1px solid var(--agf-line); border-radius: 14px; color: var(--agf-text); text-decoration: none; transition: border-color .15s, transform .15s; }
.agf-wrap .agf-room-card:hover { border-color: var(--agf-cyan); transform: translateY(-2px); }
.agf-wrap .agf-room-card__top, .agf-wrap .agf-room-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.agf-wrap .agf-room-card__mode { font-family: var(--agf-head); font-size: 12px; letter-spacing: 1px; color: var(--agf-cyan); }
.agf-wrap .agf-room-card__title { font-size: 20px; font-weight: 700; }
.agf-wrap .agf-room-card__prize { display: flex; align-items: center; gap: 8px; color: var(--agf-gold); font-weight: 600; }
.agf-wrap .agf-room-card__prize img { width: 56px; height: 40px; object-fit: contain; }

/* ---------- Đầu trang phòng ---------- */
.agf-wrap .agf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; background: var(--agf-panel); border: 1px solid var(--agf-line); border-radius: 14px; margin-bottom: 14px; }
.agf-wrap .agf-back { color: var(--agf-dim); text-decoration: none; font-weight: 600; }
.agf-wrap .agf-head__main { flex: 1 1 220px; }
.agf-wrap .agf-head__title { font-family: var(--agf-head); font-size: 20px; letter-spacing: 1px; color: #fff; }
.agf-wrap .agf-head__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.agf-wrap .agf-prize { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--agf-panel-2); border-radius: 10px; }
.agf-wrap .agf-prize img { width: 64px; height: 44px; object-fit: contain; }
.agf-wrap .agf-prize small { display: block; color: var(--agf-dim); font-size: 12px; }
.agf-wrap .agf-prize b { color: var(--agf-gold); }
.agf-wrap .agf-prize__icon { font-size: 28px; }

/* ---------- Phòng chờ ---------- */
.agf-wrap .agf-wait__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 14px; background: var(--agf-panel); border-radius: 12px; border: 1px solid var(--agf-line); }
.agf-wrap .agf-wait__bar > b { font-family: var(--agf-head); font-size: 18px; }
.agf-wrap .agf-countdown { color: var(--agf-gold); font-weight: 700; }
.agf-wrap .agf-wait__bar .agf-btn:first-of-type { margin-left: auto; }
.agf-wrap .agf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.agf-wrap .agf-slots--royal { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.agf-wrap button.agf-slot { text-transform: none; letter-spacing: normal; height: auto; width: auto; }
.agf-wrap .agf-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; min-height: 130px; background: var(--agf-panel); border: 1px solid var(--agf-line); border-radius: 12px; color: var(--agf-text); font: inherit; text-align: center; }
.agf-wrap .agf-slot--empty { cursor: pointer; border-style: dashed; }
.agf-wrap .agf-slot--empty:hover, .agf-wrap .agf-slot--empty:focus { border-color: var(--agf-cyan); background: var(--agf-panel-2); color: var(--agf-text); outline: none; }
.agf-wrap .agf-slot--taken { border-color: rgba(47,214,123,.45); }
.agf-wrap .agf-slot--me { box-shadow: 0 0 0 2px var(--agf-cyan) inset; }
.agf-wrap .agf-slot__name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agf-wrap .agf-slot__state { font-size: 12px; letter-spacing: 1px; color: var(--agf-cyan); font-weight: 700; }
.agf-wrap .agf-slot--taken .agf-slot__state { color: var(--agf-green); }
.agf-wrap .agf-ava { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.agf-wrap .agf-ava--empty { display: inline-flex; align-items: center; justify-content: center; background: var(--agf-panel-2); border: 1px solid var(--agf-line); font-size: 22px; color: var(--agf-dim); }

.agf-wrap .agf-team { margin-bottom: 16px; padding: 12px; border-radius: 14px; background: var(--agf-panel); border-top: 3px solid var(--agf-line); }
.agf-wrap .agf-team h3 { margin: 0 0 10px; font-family: var(--agf-head); font-size: 15px; letter-spacing: 2px; }
.agf-wrap .agf-team--red { border-top-color: var(--agf-red); }
.agf-wrap .agf-team--red h3 { color: var(--agf-red); }
.agf-wrap .agf-team--blue { border-top-color: var(--agf-blue); }
.agf-wrap .agf-team--blue h3 { color: var(--agf-blue); }

/* ---------- Banner ---------- */
.agf-wrap .agf-banner { margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; background: var(--agf-panel); border: 1px solid var(--agf-line); font-weight: 700; text-align: center; }
.agf-wrap .agf-banner--dead { color: var(--agf-red); border-color: rgba(255,90,90,.4); }
.agf-wrap .agf-banner--win { color: var(--agf-green); border-color: rgba(47,214,123,.4); }

/* ---------- Trận đấu ---------- */
.agf-wrap .agf-battle { margin-bottom: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, var(--agf-panel-2), var(--agf-panel)); border: 1px solid var(--agf-line); }
.agf-wrap .agf-battle__opp { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.agf-wrap .agf-battle__opp small { display: block; color: var(--agf-dim); font-size: 12px; }
.agf-wrap .agf-battle__opp b { font-size: 18px; }
.agf-wrap .agf-ready { font-size: 12px; color: var(--agf-green); font-weight: 700; }
.agf-wrap .agf-battle__grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.agf-wrap .agf-board__label { margin-bottom: 8px; text-align: center; font-family: var(--agf-head); font-size: 12px; letter-spacing: 2px; color: var(--agf-dim); }
/* Bảng tổ ong 2-3-2-3-2 — ô trắng viền vàng, khít nhau (kiểu DaddySkins) */
.agf-wrap .agf-board { padding: 14px 10px 16px; border-radius: 14px; background-color: #0e1430; background-image: linear-gradient(rgba(76,96,200,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(76,96,200,.12) 1px, transparent 1px); background-size: 18px 18px; border: 1px solid var(--agf-line); }
/* Hex đầu bằng (flat-top), xếp cột 2-3-2-3-2 khít nhau như DaddySkins. --hw = bề ngang 1 ô, chiều cao = hw*0.866 */
.agf-wrap .agf-hex { --hw: 96px; --g: 3px; --hh: calc(var(--hw) * .866); position: relative; width: calc(var(--hw) * 4 * .75 + var(--g) * 4 + var(--hw)); height: calc(var(--hh) * 3 + var(--g) * 2); margin: 0 auto; }
.agf-wrap .agf-hex--mini { --hw: 34px; --g: 2px; }
.agf-wrap button.agf-cell { all: unset; box-sizing: border-box; position: absolute; left: calc(var(--c) * (var(--hw) * .75 + var(--g))); top: calc(var(--r) * (var(--hh) + var(--g)) / 2); display: flex; flex-direction: column; align-items: center; justify-content: center; width: var(--hw); height: var(--hh); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); --ol: #34375a; --bd: #f7d98b; --rim: #ecc664; --in: #ffffff; --tx: #14162b; background: var(--ol); color: var(--tx); font: 800 24px/1 'Inter', 'Roboto', Arial, sans-serif; cursor: default; transition: transform .1s; }
.agf-wrap button.agf-cell::before, .agf-wrap button.agf-cell::after, .agf-wrap button.agf-cell > span { content: ''; position: absolute; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); transition: background .15s; }
.agf-wrap button.agf-cell::before { inset: 4px; background: var(--bd); }
.agf-wrap button.agf-cell::after { inset: 17%; background: var(--rim); }
.agf-wrap .agf-hex--mini button.agf-cell::before { inset: 2px; }
.agf-wrap .agf-hex--mini button.agf-cell::after { inset: 15%; }
.agf-wrap button.agf-cell > span, .agf-wrap button.agf-cell > small { z-index: 2; color: var(--tx); }
.agf-wrap button.agf-cell > span { inset: 20%; display: flex; align-items: center; justify-content: center; background: var(--in); }
.agf-wrap .agf-hex--mini button.agf-cell > span { inset: 18%; }
.agf-wrap .agf-hex--mini button.agf-cell { font-size: 12px; }
.agf-wrap button.agf-cell > small { position: absolute; bottom: 7%; font: 700 8px/1 'Rajdhani', sans-serif; text-transform: uppercase; color: #fff; }
.agf-wrap button.agf-cell--free { cursor: pointer; }
.agf-wrap button.agf-cell--free:hover, .agf-wrap button.agf-cell--free:focus-visible { --ol: #ffd86b; --bd: #ffe6a3; --in: #fffaf0; transform: scale(1.05); z-index: 3; outline: none; }
.agf-wrap button.agf-cell--picked, .agf-wrap button.agf-cell--picked:hover { --ol: #ff4d8d; --bd: #ff8fb5; --rim: #ff4d8d; --in: #fff0f5; z-index: 3; animation: agf-pulse 1s infinite; }
.agf-wrap button.agf-cell--hit, .agf-wrap button.agf-cell--hit:hover { --bd: #b3263f; --rim: #e2475f; --in: #4a1222; --tx: #ffd6df; }
.agf-wrap button.agf-cell--miss, .agf-wrap button.agf-cell--miss:hover { --bd: #4a5070; --rim: #5d6488; --in: #262a40; --tx: #9aa0bd; }
.agf-wrap button.agf-cell:disabled { cursor: not-allowed; }
/* Icon bộ phận trên ô đã trúng + ô vừa bắn */
.agf-wrap button.agf-cell > span.agf-cell__icon { padding: 3%; box-sizing: border-box; }
.agf-wrap .agf-part { display: block; width: 100%; height: 100%; fill: #ff8a9a; stroke: none; filter: drop-shadow(0 0 3px rgba(255,90,110,.55)); }
.agf-wrap .agf-part path[fill="none"] { fill: none; stroke: #ff8a9a; }
.agf-wrap .agf-fig--icon { width: 100%; height: 100%; }
.agf-wrap .agf-fig--only .agf-fig__ok { fill: rgba(255,255,255,.14); }
.agf-wrap .agf-fig--only .agf-fig__hit { fill: #ff5a6e; }
.agf-wrap .agf-hex--mini button.agf-cell > span.agf-cell__icon { padding: 2%; }
.agf-wrap button.agf-cell--last { --ol: #36d6ff; }
.agf-wrap button.agf-cell--flash { animation: agf-flash .9s ease-out 1; }
@keyframes agf-flash { 0% { filter: brightness(1.8); transform: scale(1.12); } 100% { filter: none; transform: none; } }
/* OT */
.agf-wrap .agf-battle--ot { border-color: var(--agf-gold); box-shadow: 0 0 24px rgba(255,201,77,.15); text-align: center; }
.agf-wrap .agf-ot__title { font-family: var(--agf-head); font-size: 30px; letter-spacing: 6px; color: var(--agf-gold); }
.agf-wrap .agf-ot__desc { max-width: 560px; margin: 6px auto 12px; color: var(--agf-dim); }
.agf-wrap .agf-ot__desc b { color: var(--agf-text); }
.agf-wrap .agf-clock--center { display: inline-block; margin-top: 12px; }
@keyframes agf-pulse { 50% { filter: brightness(1.25); } }

.agf-wrap .agf-dmgmap { text-align: center; }
.agf-wrap .agf-fig { width: 50px; height: 60px; flex: 0 0 auto; }
.agf-wrap .agf-fig--lg { width: 150px; height: 180px; display: block; margin: 0 auto 8px; }
.agf-wrap .agf-fig__ok { fill: #dfe4f7; }
.agf-wrap .agf-fig__hit { fill: var(--agf-red); }

.agf-wrap .agf-hp { position: relative; height: 14px; min-width: 110px; border-radius: 999px; background: #262c4d; overflow: hidden; }
.agf-wrap .agf-hp__fill { height: 100%; transition: width .4s; }
.agf-wrap .agf-hp__fill--ok { background: var(--agf-green); }
.agf-wrap .agf-hp__fill--mid { background: var(--agf-gold); }
.agf-wrap .agf-hp__fill--low { background: var(--agf-red); }
.agf-wrap .agf-hp span { position: absolute; inset: 0; text-align: center; font-size: 11px; font-weight: 700; line-height: 14px; color: #fff; text-shadow: 0 1px 2px #000; }

.agf-wrap .agf-battle__bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 14px; }
.agf-wrap .agf-me { display: flex; align-items: center; gap: 10px; }
.agf-wrap .agf-me--right { justify-content: flex-end; text-align: right; }
.agf-wrap .agf-me small { display: block; color: var(--agf-dim); font-size: 12px; }
.agf-wrap .agf-clock { text-align: center; padding: 8px 18px; border-radius: 12px; background: #0e1430; border: 1px solid var(--agf-line); }
.agf-wrap .agf-clock small { display: block; font-size: 11px; letter-spacing: 1px; color: var(--agf-dim); }
.agf-wrap .agf-clock b { font-family: var(--agf-head); font-size: 26px; color: var(--agf-green); }
.agf-wrap .agf-urgent { color: var(--agf-red) !important; }

/* ---------- Các cặp đang đấu ---------- */
.agf-wrap .agf-pairs { margin-bottom: 16px; }
.agf-wrap .agf-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; margin-bottom: 10px; padding: 12px; border-radius: 14px; background: var(--agf-panel); border: 1px solid var(--agf-line); }
.agf-wrap .agf-pair__side { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.agf-wrap .agf-pair__who { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 230px; }
.agf-wrap .agf-pair__who .agf-ava { width: 34px; height: 34px; font-size: 16px; }
.agf-wrap .agf-pair__who > div { flex: 1; min-width: 0; }
.agf-wrap .agf-pair__who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agf-wrap .agf-pair__hint { font-size: 12px; color: var(--agf-dim); }
.agf-wrap .agf-pair__hint b { color: var(--agf-gold); }
.agf-wrap .agf-pair__vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-top: 18px; }
.agf-wrap .agf-pair__vs small { font-size: 10px; letter-spacing: 1px; color: var(--agf-dim); }
.agf-wrap .agf-pair__vs b { font-family: var(--agf-head); font-size: 18px; color: var(--agf-green); }
.agf-wrap .agf-pair__vs span { font-family: var(--agf-head); font-size: 13px; color: var(--agf-hot); }

/* ---------- Danh sách người chơi ---------- */
.agf-wrap .agf-list__title { font-family: var(--agf-head); font-size: 15px; letter-spacing: 2px; text-align: center; margin: 4px 0 10px; }
.agf-wrap .agf-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.agf-wrap .agf-pcard { position: relative; padding: 10px; border-radius: 12px; background: #0f1530; border: 1px solid var(--agf-line); overflow: hidden; }
.agf-wrap .agf-pcard--me { box-shadow: 0 0 0 2px var(--agf-cyan) inset; }
.agf-wrap .agf-pcard--win { box-shadow: 0 0 0 2px var(--agf-gold) inset; }
.agf-wrap .agf-pcard--red { border-left: 3px solid var(--agf-red); }
.agf-wrap .agf-pcard--blue { border-left: 3px solid var(--agf-blue); }
.agf-wrap .agf-pcard__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.agf-wrap .agf-pcard__top .agf-ava { width: 28px; height: 28px; font-size: 14px; }
.agf-wrap .agf-pcard__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agf-wrap .agf-pcard__name em { font-style: normal; font-size: 10px; color: var(--agf-cyan); }
.agf-wrap .agf-pcard__mid { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.agf-wrap .agf-stats { list-style: none; margin: 0; padding: 0; font-size: 13px; text-align: right; }
.agf-wrap .agf-pcard--dead > *:not(.agf-pcard__dead):not(.agf-pcard__fair) { opacity: .35; }
.agf-wrap .agf-pcard__dead { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-family: var(--agf-head); font-size: 15px; letter-spacing: 2px; color: var(--agf-red); text-shadow: 0 0 8px #000; }
.agf-wrap .agf-pcard__fair { display: block; margin-top: 6px; font-size: 12px; text-align: center; color: var(--agf-gold); text-decoration: none; position: relative; }

/* ---------- Kết thúc ---------- */
.agf-wrap .agf-final { margin-bottom: 16px; padding: 24px 16px; text-align: center; border-radius: 16px; background: radial-gradient(circle at 50% 0, rgba(255,201,77,.18), transparent 60%), var(--agf-panel); border: 1px solid rgba(255,201,77,.4); }
.agf-wrap .agf-final--red { border-color: var(--agf-red); }
.agf-wrap .agf-final--blue { border-color: var(--agf-blue); }
.agf-wrap .agf-final__title { font-family: var(--agf-head); font-size: 28px; letter-spacing: 2px; color: var(--agf-gold); }
.agf-wrap .agf-final__me { margin-top: 8px; color: var(--agf-green); font-weight: 700; }
.agf-wrap .agf-final__prize { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 18px; }
.agf-wrap .agf-final__prize img { width: 90px; height: 64px; object-fit: contain; }

/* ---------- Kill feed ---------- */
.agf-wrap .agf-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-bottom: 16px; padding: 10px; border-radius: 12px; background: var(--agf-panel); border: 1px solid var(--agf-line); }
.agf-wrap .agf-feed__title { grid-column: 1 / -1; font-family: var(--agf-head); font-size: 12px; letter-spacing: 2px; color: var(--agf-dim); }
.agf-wrap .agf-feed__row { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: #0f1530; border: 1px solid var(--agf-line); font-size: 13px; }
.agf-wrap .agf-feed__row b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agf-wrap .agf-feed__row--kill { border-color: var(--agf-red); }

/* ---------- Toast + modal (gắn vào body → style riêng, không phụ thuộc theme) ---------- */
.agf-toast { all: unset; position: fixed; left: 50%; bottom: 24px; z-index: 100001; transform: translateX(-50%); padding: 10px 18px; border-radius: 10px; background: #141a33; color: #e6e9f5; border: 1px solid #2a3363; font: 600 15px/1.3 'Rajdhani', system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: opacity .4s, transform .4s; }
.agf-toast--good { border-color: #2fd67b; }
.agf-toast--bad { border-color: #ff5a5a; }
.agf-toast--out { opacity: 0; transform: translate(-50%, 10px); }
.agf-modal { all: unset; position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(5,8,20,.75); font: 16px/1.4 'Rajdhani', system-ui, sans-serif; color: #e6e9f5; }
.agf-modal__box { width: min(92vw, 380px); padding: 20px; border-radius: 14px; background: #141a33; border: 1px solid #2a3363; box-sizing: border-box; }
.agf-modal__box h3 { margin: 0 0 12px; font: 700 18px/1.2 'Orbitron', sans-serif; letter-spacing: 1px; color: #fff; }
.agf-modal__box label { display: block; margin-bottom: 10px; font-weight: 600; }
.agf-modal__box input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid #2a3363; background: #0b0f1e; color: #fff; font: 700 18px/1.2 'Rajdhani', monospace; letter-spacing: 2px; box-sizing: border-box; }
.agf-modal__box details { margin-bottom: 10px; }
.agf-modal__box summary { cursor: pointer; color: #ffc94d; font-weight: 600; }
.agf-modal__box .agf-muted { color: #8c93b8; font-size: 13px; }
.agf-modal__actions { display: flex; justify-content: flex-end; gap: 8px; }
.agf-modal__actions button { padding: 10px 18px; border-radius: 999px; border: 1px solid #2a3363; background: transparent; color: #e6e9f5; font: 700 15px/1 'Rajdhani', sans-serif; cursor: pointer; }
.agf-modal__actions .agf-btn--hot { background: #ff4d8d; border-color: #ff4d8d; color: #fff; }
.agf-modal__actions button:disabled { opacity: .6; cursor: wait; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.agf-wrap .agf-battle__grid { grid-template-columns: 1fr; }
	.agf-wrap .agf-hex { --hw: 62px; --g: 2px; }
	.agf-wrap button.agf-cell { font-size: 17px; }
	.agf-wrap .agf-hex--mini { --hw: 28px; }
	.agf-wrap .agf-pair { grid-template-columns: 1fr; }
	.agf-wrap .agf-pair__vs { flex-direction: row; gap: 8px; padding-top: 0; }
	.agf-wrap .agf-battle__bar { grid-template-columns: 1fr 1fr; }
	.agf-wrap .agf-clock { grid-column: 1 / -1; order: -1; }
	.agf-wrap .agf-pgrid { grid-template-columns: repeat(2, 1fr); }
	.agf-wrap .agf-head { gap: 10px; }
}

/* v2.1 — quà hòm Lì Xì */
.agf-wrap .agf-final__open { margin-top: 12px; padding: 13px 22px; font-size: 17px; box-shadow: 0 6px 22px rgba(255,77,141,.35); }
.agf-wrap .agf-final__ttl { margin-top: 6px; font-size: 13px; }
.agf-wrap .agf-final__ttl b { color: var(--agf-gold); font-variant-numeric: tabular-nums; }

/* 2.1.1 — thanh báo mất kết nối / phòng bị xoá, thẻ người thắng đã ngã */
.agf-conn { all: unset; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100000; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: #2a1020; border: 1px solid #ff4d8d; color: #ffe1ea; font: 600 14px/1.3 'Rajdhani', system-ui, sans-serif; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.agf-conn__btn { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 999px; background: #ff4d8d; color: #fff; font-weight: 700; }
.agf-conn__btn:hover { filter: brightness(1.1); }
.agf-wrap .agf-pcard__dead--win { color: var(--agf-gold); }
