/* ═════════════════════════════════════════════════════════════════════════
   SHARED CSS - DARK MODE (DEFAULT)
   Sử dụng cho: hoingu.html, campaign.html, arcade.html
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --bg:      #08081a;
    --bg-card: #0e0e24;
    --bg-deep: #060614;
    --blue:    #5b8dee;
    --purple:  #9b59f5;
    --green:   #0fd494;
    --danger:  #f5607a;
    --warn:    #f5c842;
    --gold:    #f5c842;
    --text:    #dde1f5;
    --muted:   #5c6490;
    --dim:     #8892b8;
    --border:  rgba(91,141,238,.15);
    --glow-b:  rgba(91,141,238,.28);
    --glow-p:  rgba(155,89,245,.22);
    --glow-g:  rgba(15,212,148,.25);
}

/* LIGHT MODE */
body.light-mode {
    --bg:      #f8f9fa;
    --bg-card: #ffffff;
    --bg-deep: #e8eaef;
    --blue:    #3b7ee5;
    --purple:  #7c3aed;
    --green:   #10b981;
    --danger:  #ef4444;
    --warn:    #f59e0b;
    --gold:    #d97706;
    --text:    #1f2937;
    --muted:   #6b7280;
    --dim:     #4b5563;
    --border:  rgba(59,126,229,.15);
    --glow-b:  rgba(59,126,229,.2);
    --glow-p:  rgba(124,58,237,.15);
    --glow-g:  rgba(10,186,126,.15);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Bungee', cursive;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background .3s, color .3s;
}

/* Background gradient (dark) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%,   rgba(91,141,238,.09) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(155,89,245,.08) 0%, transparent 55%);
}

body.light-mode::before {
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%,   rgba(59,126,229,.05) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124,58,237,.04) 0%, transparent 55%);
}

/* Grid pattern (dark) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(91,141,238,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91,141,238,.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.6) 30%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.3) 100%);
}

body.light-mode::after {
    background-image:
        linear-gradient(rgba(59,126,229,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,126,229,.03) 1px, transparent 1px);
}

/* ── TOPBAR ───────────────────────────────────────── */
.topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(1200px, calc(100vw - 24px));
    margin: 18px auto 0;
    padding: 14px 16px;
    background:
        linear-gradient(180deg, rgba(91,141,238,.08), transparent 44%),
        rgba(8,8,26,.9);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: background .3s, border-color .3s;
}

body.light-mode .topbar {
    background:
        linear-gradient(180deg, rgba(59,126,229,.06), transparent 44%),
        rgba(248,249,250,.95);
}

.topbar-home, .home-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    font-size: 22px;
    text-decoration: none;
    line-height: 1;
    transition: color .2s, background .2s;
    flex-shrink: 0;
}

.topbar-home:hover, .home-btn:hover {
    color: var(--blue);
    background: rgba(91,141,238,.10);
}

/* Score chip */
.score-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,200,66,.1);
    border: 1px solid rgba(245,200,66,.25);
    border-radius: 999px;
    padding: 4px 14px;
    font-family: 'Bungee', cursive;
    font-weight: 800;
    font-size: 16px;
    color: var(--gold);
    letter-spacing: .04em;
    transition: all .3s;
}

body.light-mode .score-chip {
    background: rgba(217,119,6,.08);
    border-color: rgba(217,119,6,.25);
}

.score-chip.bump {
    animation: bump .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes bump {
    from { transform: scale(.85); }
    to { transform: scale(1); }
}

.score-label {
    font-size: 10px;
    color: var(--muted);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: .1em;
    font-weight: 400;
}

/* Skip button */
.skip-btn {
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(91,141,238,.1);
    border: 1px solid rgba(91,141,238,.25);
    border-radius: 999px;
    padding: 6px 14px;
    color: var(--dim);
    font-family: 'Bungee', cursive;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.skip-btn:hover:not(:disabled) {
    background: rgba(91,141,238,.2);
    border-color: rgba(91,141,238,.5);
    color: var(--text);
}

.skip-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.skip-btn .skip-icon {
    font-size: 16px;
    line-height: 1;
}

.skip-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    background: rgba(91,141,238,.2);
    border-radius: 10px;
    padding: 1px 7px;
    color: var(--blue);
    min-width: 20px;
    text-align: center;
}

/* ── TIMER ────────────────────────────────────────── */
.timer-section {
    position: relative;
    z-index: 1;
    padding: 14px 18px 6px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.timer-num {
    font-family: 'Bungee', cursive;
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    min-width: 90px;
    transition: color .3s;
    letter-spacing: 1px;
}

.timer-num.warn {
    color: var(--danger);
    text-shadow: 0 0 20px rgba(245,96,122,.5);
    animation: tshake .25s ease;
}

@keyframes tshake {
    0%, 100% { transform: none; }
    40% { transform: translateX(-3px); }
    70% { transform: translateX(3px); }
}

.timer-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.06);
    border-radius: 2px;
    overflow: hidden;
}

body.light-mode .timer-track {
    background: rgba(0,0,0,.08);
}

.timer-fill {
    height: 100%;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    transition: width 1s linear, background .4s;
}

.timer-fill.warn {
    background: linear-gradient(90deg, var(--warn), var(--danger));
}

/* ── MAIN ─────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px 40px;
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Question/Word display */
.question {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 0 25px rgba(0,0,0,.4);
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.5;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

body.light-mode .question {
    box-shadow: 0 0 15px rgba(0,0,0,.1);
}

/* Answers grid */
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 560px;
}

.answer-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px 16px;
    border-radius: 16px;
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

body.light-mode .answer-btn {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.answer-btn:hover {
    background: rgba(91,141,238,.15);
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(91,141,238,.3);
}

body.light-mode .answer-btn:hover {
    background: rgba(59,126,229,.08);
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(59,126,229,.2);
}

/* ── ARENA / WORD CARD ─────────────────────────────── */
.arena {
    position: relative; z-index: 1; flex: 1;
    display: flex; flex-direction: column;
    align-items: center; padding: 16px 16px 28px; gap: 14px;
}

.word-card {
    width: 100%; max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px; padding: 26px 22px 20px;
    text-align: center; position: relative; overflow: hidden;
}
.word-card::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 55%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(91,141,238,.5), transparent);
}

.word-eyebrow {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 10px; color: var(--muted);
    letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 10px;
}

.word-text {
    font-family: 'Be Vietnam Pro', sans-serif; font-size: clamp(28px, 9vw, 56px);
    font-weight: 800; color: #fff;
    text-shadow: 0 0 36px var(--glow-b); transition: all .15s;
}
body.light-mode .word-text { color: var(--text); text-shadow: none; }
.word-text.pop { animation: wbounce .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes wbounce { from{transform:scale(.88);opacity:.5} to{transform:none;opacity:1} }

.tail-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(91,141,238,.1); border: 1px solid rgba(91,141,238,.25);
    border-radius: 999px; padding: 4px 14px; margin-top: 12px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 12px; color: var(--muted); justify-content: center;
}
.tail-chip strong { color: var(--blue); font-weight: 700; }

/* ── JIGSAW INPUT ─────────────────────────────────── */
.answer-wrap {
    width: 100%; max-width: 500px;
    display: flex; flex-direction: column; gap: 12px;
}
.jigsaw {
    display: flex; align-items: stretch; gap: 0; min-height: 60px;
}
.jig-head {
    display: flex; align-items: center; justify-content: center;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    font-family: 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: 20px;
    color: #fff; white-space: nowrap; min-width: 72px;
    border-radius: 16px 0 0 16px;
    position: relative; z-index: 2;
    letter-spacing: .02em; text-shadow: 0 1px 4px rgba(0,0,0,.4);
    box-shadow: 0 6px 16px rgba(91,141,238,.20);
}
.jig-input-wrap {
    flex: 1; position: relative; z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 16px 16px 0;
    margin-left: -1px;
    font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-shadow: 0 6px 16px rgba(0,0,0,.10);
}
.jig-input-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(91,141,238,.10), 0 10px 24px rgba(91,141,238,.12);
}
.jig-input {
    width: 100%; height: 100%; background: transparent;
    border: none; outline: none; -webkit-appearance: none;
    padding: 0 44px 0 18px;
    font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700; font-size: 20px;
    color: var(--text); letter-spacing: .02em; caret-color: var(--blue);
}
.jig-input::-webkit-search-cancel-button,
.jig-input::-webkit-search-decoration { display: none; }
.jig-input::placeholder {
    color: var(--muted); font-weight: 500; font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}
.jig-input:disabled { opacity: .35; cursor: not-allowed; }

.jig-enter-hint {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-family: 'Share Tech Mono', monospace; font-size: 9px;
    color: var(--muted); letter-spacing: .1em; pointer-events: none;
    opacity: 0; transition: opacity .2s;
}
.jig-input-wrap:focus-within .jig-enter-hint { opacity: 1; }

/* Submit button — mobile only */
.submit-btn {
    display: none; width: 100%; padding: 15px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    border: none; border-radius: 14px;
    font-family: 'Bungee', cursive; font-weight: 800; font-size: 17px;
    color: #fff; letter-spacing: .06em;
    cursor: pointer; transition: opacity .2s, transform .1s;
    box-shadow: 0 4px 20px rgba(91,141,238,.3);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.submit-btn:active { transform: scale(.97); opacity: .85; }
.submit-btn:disabled { opacity: .35; cursor: not-allowed; }

@media (hover: none) and (pointer: coarse), (max-width: 640px) {
    .submit-btn { display: block; }
    .jig-enter-hint { display: none; }
    .shortcut-hint,
    .answer-hint { display: none; }
}

/* ── SWAL THEME ───────────────────────────────────── */
.swal-gaming { background-color: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: 20px !important; }
.swal-gaming .swal-title { font-family: 'Bungee', cursive; font-weight: 800; color: var(--text) !important; }
.swal-gaming .swal-text { color: var(--dim) !important; }
.swal-gaming .swal-button--confirm { background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%) !important; border-radius: 12px !important; }
.swal-gaming .swal-button--cancel { background: rgba(255,255,255,.06) !important; color: var(--dim) !important; border-radius: 12px !important; }
.swal-win .swal-title { color: var(--green) !important; }
.swal-lose .swal-title { color: var(--danger) !important; }
.swal-overlay { background-color: rgba(8,8,15,.85) !important; backdrop-filter: blur(8px); }
body.light-mode .swal-overlay { background-color: rgba(240,242,245,.85) !important; }

/* ── RESPONSIVE (shared) ─────────────────────────── */
@media (max-width: 380px) {
    .jigsaw { gap: 0; }
    .jig-head { font-size: 17px; padding: 0 14px; min-width: 60px; border-radius: 14px 0 0 14px; }
    .jig-input { font-size: 17px; padding-left: 16px; }
    .timer-num { font-size: 36px; min-width: 76px; }
    .word-text { font-size: clamp(24px, 10vw, 48px); }
    .skip-btn span:not(.skip-count):not(.skip-icon) { display: none; }
}

/* ── SHORTCUT HINT ─────────────────────────────────── */
.shortcut-hint,
.answer-hint {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}
.shortcut-hint kbd,
.answer-hint kbd {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    color: var(--dim);
    font-family: 'Share Tech Mono', monospace;
}
body.light-mode .shortcut-hint kbd,
body.light-mode .answer-hint kbd {
    background: rgba(0,0,0,.05);
}

/* ── GAME OVER OVERLAY ────────────────────────────── */
.go-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(8,8,15,.92);
    backdrop-filter: blur(14px);
    justify-content: center; align-items: center;
    padding: 16px;
}
body.light-mode .go-overlay { background: rgba(240,242,245,.94); }
.go-overlay.show { display: flex; animation: goFade .4s ease; }
@keyframes goFade { from{opacity:0} to{opacity:1} }

.go-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 26px;
    max-width: 400px; width: 100%;
    overflow: hidden;
    animation: goPopIn .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes goPopIn {
    from { opacity: 0; transform: scale(.92) translateY(12px) }
    to { opacity: 1; transform: none }
}

.go-header {
    position: relative; padding: 30px 24px 20px;
    text-align: center; overflow: hidden;
}
.go-header::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(91,141,238,.12) 0%, rgba(155,89,245,.08) 50%, rgba(245,200,66,.1) 100%);
}
.go-header.win::before { background: linear-gradient(135deg, rgba(15,212,148,.1) 0%, rgba(245,200,66,.12) 100%); }
.go-header.lose::before { background: linear-gradient(135deg, rgba(245,96,122,.1) 0%, rgba(155,89,245,.08) 100%); }
.go-header::after {
    content: ''; position: absolute; bottom: 0; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.go-emoji { font-size: 52px; line-height: 1; margin-bottom: 8px; position: relative; }
.go-title {
    font-family: 'Bungee', cursive; font-size: 22px; font-weight: 800;
    color: #fff; position: relative; letter-spacing: .04em;
}
body.light-mode .go-title { color: var(--text); }
.go-sub { font-size: 12px; color: var(--muted); margin-top: 4px; position: relative; }

.go-score-section { padding: 22px 24px 18px; text-align: center; }
.go-score-label {
    font-size: 10px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1.6px; margin-bottom: 4px;
}
.go-score-big {
    font-family: 'Bungee', cursive; font-size: 56px; font-weight: 800;
    color: var(--gold); line-height: 1;
    text-shadow: 0 0 30px rgba(245,200,66,.3);
}
body.light-mode .go-score-big { text-shadow: none; }
.go-score-rank {
    display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 20px;
    font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: .08em;
}
.go-rank-s { background: rgba(245,200,66,.15); color: var(--gold); }
.go-rank-a { background: rgba(155,89,245,.15); color: var(--purple); }
.go-rank-b { background: rgba(91,141,238,.15); color: var(--blue); }
.go-rank-c { background: rgba(15,212,148,.15); color: var(--green); }
.go-rank-d { background: rgba(136,146,184,.12); color: var(--dim); }

.go-stats {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 1px; background: var(--border);
    margin: 0 20px; border-radius: 14px; overflow: hidden;
}
.go-stats.cols-2 { grid-template-columns: 1fr 1fr; }
.go-stat { background: var(--bg-card); padding: 14px 8px; text-align: center; }
body.light-mode .go-stat { background: #f7f8fa; }
.go-stat-val {
    font-family: 'Bungee', cursive; font-weight: 800; font-size: 24px; line-height: 1;
}
.go-stat-val.green { color: var(--green); }
.go-stat-val.gold { color: var(--gold); }
.go-stat-val.blue { color: var(--blue); }
.go-stat-val.danger { color: var(--danger); }
.go-stat-val.purple { color: var(--purple); }
.go-stat-label {
    font-size: 9px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .1em; margin-top: 4px; font-family: 'Share Tech Mono', monospace;
}

.go-perf { padding: 16px 24px 0; display: flex; align-items: center; gap: 10px; }
.go-perf-label {
    font-size: 10px; color: var(--muted); white-space: nowrap;
    font-family: 'Share Tech Mono', monospace; letter-spacing: .06em; min-width: 70px;
}
.go-perf-track {
    flex: 1; height: 6px; background: rgba(255,255,255,.06);
    border-radius: 3px; overflow: hidden;
}
body.light-mode .go-perf-track { background: rgba(0,0,0,.06); }
.go-perf-fill {
    height: 100%; border-radius: 3px;
    transition: width .8s cubic-bezier(.4,0,.2,1);
}
.go-perf-fill.green { background: linear-gradient(90deg, var(--green), #5fefc8); }
.go-perf-fill.gold { background: linear-gradient(90deg, var(--warn), #ffe066); }
.go-perf-fill.blue { background: linear-gradient(90deg, var(--blue), #93bbf7); }
.go-perf-pct {
    font-family: 'Share Tech Mono', monospace; font-size: 11px;
    color: var(--dim); min-width: 36px; text-align: right;
}

.go-brand {
    text-align: center; padding: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px; color: var(--muted); letter-spacing: .12em;
}

.go-buttons { display: flex; gap: 10px; padding: 0 20px 22px; }
.go-btn {
    flex: 1; padding: 14px; border: none; border-radius: 14px;
    font-family: 'Bungee', cursive; font-weight: 800;
    font-size: 15px; letter-spacing: .04em;
    cursor: pointer; transition: all .2s;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.go-btn:active { transform: scale(.97); }
.go-btn-home {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1); color: var(--dim);
}
body.light-mode .go-btn-home {
    background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.1);
}
.go-btn-home:hover { background: rgba(255,255,255,.08); color: var(--text); }
body.light-mode .go-btn-home:hover { background: rgba(0,0,0,.06); }
.go-btn-retry {
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    color: #fff; box-shadow: 0 4px 16px rgba(91,141,238,.35);
}
.go-btn-retry:hover { box-shadow: 0 6px 24px rgba(91,141,238,.5); }

/* Footer */
.footer {
    padding: 12px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: .06em;
    position: relative;
    z-index: 1;
}


/* ═════════════════════════════════════════════════════════════════════════
   2026 HUD REFRESH OVERRIDES
   Đồng bộ visual language game với native app
   ════════════════════════════════════════════════════════════════════════ */

body::after {
    opacity: .45;
}

.topbar {
    gap: 10px;
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.timer-section {
    width: min(500px, calc(100vw - 36px));
    margin: 10px auto 8px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
}

.timer-num {
    min-width: 76px;
    font-size: 24px;
}

.timer-track {
    height: 8px;
    border-radius: 999px;
}

.timer-fill {
    border-radius: 999px;
}

.main {
    gap: 22px;
}

.question,
.word-card {
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 18px 34px rgba(0,0,0,.18);
}

.question {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(91,141,238,.06), transparent 38%), var(--bg-card);
}

.question::before {
    content: 'QUESTION';
    display: block;
    width: fit-content;
    margin: 0 auto 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .16em;
    color: var(--muted);
}

.word-card {
    background: linear-gradient(180deg, rgba(91,141,238,.06), transparent 38%), var(--bg-card);
}

.word-card .word-eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .16em;
    margin-bottom: 12px;
}

.word-text,
.question {
    text-shadow: none;
}

.tail-chip {
    display: none;
}

.answer-wrap,
.single-input-wrap {
    width: min(500px, 100%);
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 14px 14px 12px;
    box-shadow: 0 18px 34px rgba(0,0,0,.16);
}

.answer-wrap::before,
.single-input-wrap::before {
    content: 'ANSWER CONSOLE';
    display: block;
    margin-bottom: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .16em;
    color: var(--muted);
}

.single-input-wrap input {
    background: var(--bg-deep);
}

.answers {
    gap: 12px;
}

.answer-btn {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(91,141,238,.05), transparent 36%), var(--bg-card);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

.answer-btn:hover {
    transform: translateY(-2px);
}

.shortcut-hint {
    margin-top: 6px;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: .06em;
}

.go-card {
    max-width: 430px;
    border-radius: 28px;
    border-color: rgba(91,141,238,.22);
    box-shadow: 0 22px 42px rgba(0,0,0,.28);
}

.go-header {
    padding: 18px 20px 14px;
}

.go-header::before {
    opacity: .9;
}

.go-emoji {
    width: 78px;
    height: 78px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(91,141,238,.28);
    background: rgba(91,141,238,.08);
}

.go-title {
    font-size: 24px;
}

.go-score-section {
    padding-top: 16px;
}

.go-score-big {
    font-size: 44px;
}

.go-buttons {
    padding-top: 14px;
}

.go-btn {
    min-height: 50px;
    border-radius: 16px;
    font-size: 13px;
}

@media (max-width: 640px) {
    .timer-section {
        width: calc(100vw - 24px);
    }

    .answer-wrap,
    .single-input-wrap,
    .word-card,
    .question {
        width: min(100%, 500px);
    }
}


/* 2026 overflow + overlay refinements */
.go-card {
    max-height: min(92vh, 760px);
    overflow: auto;
}

.go-reason {
    padding: 0 20px;
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--muted);
}

.go-vs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 16px 20px 8px;
}

.go-player {
    text-align: center;
}

.go-player-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.go-player-elo {
    font-family: 'Bungee', cursive;
    font-size: 34px;
    line-height: 1;
    color: var(--text);
}

.go-player-elo.me { color: var(--green); }
.go-player-elo.opp { color: var(--danger); }

.go-player-diff {
    min-height: 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--muted);
}

.go-vs-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .16em;
    color: var(--muted);
}

@media (max-width: 640px) {
    .go-overlay {
        padding: 12px;
    }

    .go-card {
        max-height: min(94vh, 760px);
    }

    .go-stats {
        grid-template-columns: 1fr 1fr;
    }

    .go-stats.cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .go-buttons {
        flex-direction: column;
    }

    .go-btn {
        width: 100%;
    }

    .go-vs {
        grid-template-columns: 1fr;
    }

    .go-vs-divider {
        justify-self: center;
    }
}

/* 2026 native-style result overlays + ultra-small phones */
.go-card-native {
    max-width: 460px;
    border-radius: 30px;
    border: 1px solid rgba(91,141,238,.24);
    background:
        linear-gradient(180deg, rgba(91,141,238,.10), transparent 34%),
        var(--bg-card);
    box-shadow:
        0 28px 56px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.03);
}

.go-header-native {
    padding: 18px 20px 8px;
}

.go-eyebrow {
    width: fit-content;
    margin: 0 auto 14px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--muted);
}

.go-header-native .go-emoji {
    width: 84px;
    height: 84px;
    margin-bottom: 14px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 48%),
        rgba(91,141,238,.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(91,141,238,.10);
}

.go-header-native.win .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 48%),
        rgba(15,212,148,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(15,212,148,.16),
        0 0 28px rgba(15,212,148,.16);
}

.go-header-native.lose .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10), transparent 48%),
        rgba(245,96,122,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(245,96,122,.18),
        0 0 28px rgba(245,96,122,.14);
}

.go-header-native .go-title {
    font-size: 26px;
}

.go-reason-pill {
    margin: 12px 20px 0;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
}

.go-header-native.win .go-reason-pill {
    background: rgba(15,212,148,.10);
    border-color: rgba(15,212,148,.18);
}

.go-header-native.lose .go-reason-pill {
    background: rgba(245,96,122,.10);
    border-color: rgba(245,96,122,.18);
}

.go-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px 0;
}

.go-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 20px 0;
}

.go-box {
    min-width: 0;
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.go-box-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .12em;
    color: var(--muted);
}

.go-box-value {
    margin-top: 8px;
    font-family: 'Bungee', cursive;
    font-size: 28px;
    line-height: 1;
    color: var(--text);
}

.go-box-value.small {
    font-size: 18px;
    line-height: 1.15;
    word-break: break-word;
}

.go-box-value.gold { color: var(--gold); }
.go-box-value.blue { color: var(--blue); }
.go-box-value.purple { color: var(--purple); }
.go-box-value.green { color: var(--green); }
.go-box-value.danger { color: var(--danger); }

.go-vs-card {
    margin: 14px 20px 0;
    padding: 16px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    display: none;
    align-items: stretch;
    gap: 12px;
}

.go-vs-card.show {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.go-vs-side {
    min-width: 0;
    text-align: center;
}

.go-vs-side .go-player-name {
    margin-bottom: 6px;
}

.go-vs-divider-native {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: .16em;
    color: var(--muted);
}

.go-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 20px 0;
}

.go-status-chip {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    text-align: center;
}

.go-status-chip .go-status-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: .14em;
    color: var(--muted);
}

.go-status-chip .go-status-value {
    margin-top: 5px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
    word-break: break-word;
}

.hud-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(8,8,15,.88);
    backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hud-modal-overlay.show {
    display: flex;
    animation: goFade .28s ease;
}

.hud-modal-card {
    width: min(440px, 100%);
    max-height: min(92vh, 760px);
    overflow: auto;
    border-radius: 30px;
    border: 1px solid rgba(91,141,238,.22);
    background:
        linear-gradient(180deg, rgba(91,141,238,.10), transparent 34%),
        var(--bg-card);
    box-shadow: 0 28px 56px rgba(0,0,0,.34);
}

.hud-modal-head {
    padding: 18px 20px 8px;
    text-align: center;
}

.hud-modal-head.success .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 48%),
        rgba(15,212,148,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(15,212,148,.16),
        0 0 28px rgba(15,212,148,.16);
}

.hud-modal-head.warning .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10), transparent 48%),
        rgba(245,200,66,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(245,200,66,.16),
        0 0 28px rgba(245,200,66,.14);
}

.hud-modal-head.danger .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10), transparent 48%),
        rgba(245,96,122,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(245,96,122,.18),
        0 0 28px rgba(245,96,122,.14);
}

.hud-modal-head.info .go-emoji {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 48%),
        rgba(91,141,238,.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(91,141,238,.16),
        0 0 28px rgba(91,141,238,.14);
}

.hud-modal-title {
    font-family: 'Bungee', cursive;
    font-size: 24px;
    letter-spacing: .04em;
    color: var(--text);
}

.hud-modal-head.success .hud-modal-title { color: var(--green); }
.hud-modal-head.warning .hud-modal-title { color: var(--gold); }
.hud-modal-head.danger .hud-modal-title { color: var(--danger); }
.hud-modal-head.info .hud-modal-title { color: var(--text); }

.hud-modal-text {
    margin: 12px 20px 0;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--muted);
}

.hud-modal-body {
    padding: 14px 20px 0;
}

.hud-modal-actions {
    display: flex;
    gap: 10px;
    padding: 18px 20px 20px;
}

.hud-modal-btn {
    flex: 1;
    min-height: 50px;
    border: none;
    border-radius: 16px;
    font-family: 'Bungee', cursive;
    font-size: 13px;
    letter-spacing: .04em;
    cursor: pointer;
}

.hud-modal-btn.secondary {
    background: rgba(255,255,255,.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.hud-modal-btn.primary {
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    color: #fff;
}

.hud-modal-btn.danger {
    background: linear-gradient(135deg, #f5607a 0%, #dc3b5c 100%);
    color: #fff;
}

@media (max-width: 390px) {
    .topbar {
        gap: 8px;
        width: min(100vw - 18px, 1200px);
        padding: 12px;
        border-radius: 18px;
    }

    .topbar-home,
    .home-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .score-chip {
        margin-left: auto;
        padding: 4px 10px;
        font-size: 13px;
        gap: 5px;
    }

    .score-label,
    .skip-count {
        font-size: 10px;
    }

    .skip-btn {
        margin-left: 8px;
        padding: 5px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .timer-section {
        width: calc(100vw - 18px);
        margin: 8px auto 6px;
        padding: 10px 11px;
        gap: 10px;
    }

    .timer-num {
        min-width: 58px;
        font-size: 20px;
    }

    .main {
        gap: 16px;
        padding: 14px 9px 28px;
    }

    .question,
    .word-card,
    .answer-wrap,
    .single-input-wrap {
        border-radius: 18px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .word-card .word-eyebrow,
    .question::before,
    .answer-wrap::before,
    .single-input-wrap::before {
        font-size: 9px;
        letter-spacing: .14em;
    }

    .go-overlay {
        padding: 10px;
    }

    .go-card,
    .go-card-native {
        border-radius: 24px;
        max-height: min(96vh, 760px);
    }

    .go-header-native {
        padding: 16px 14px 8px;
    }

    .go-header-native .go-emoji {
        width: 72px;
        height: 72px;
        font-size: 42px;
    }

    .go-header-native .go-title {
        font-size: 22px;
    }

    .go-reason-pill,
    .go-score-grid,
    .go-top-grid,
    .go-vs-card,
    .go-status-strip,
    .go-buttons {
        margin-left: 14px;
        margin-right: 14px;
        padding-left: 0;
        padding-right: 0;
    }

    .go-score-grid,
    .go-status-strip {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .go-top-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .go-vs-card.show {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .go-vs-divider-native {
        justify-self: center;
    }

    .go-box,
    .go-status-chip {
        padding: 12px 10px;
    }

    .go-box-value {
        font-size: 24px;
    }

    .go-box-value.small {
        font-size: 17px;
    }

    .hud-modal-overlay {
        padding: 10px;
    }

    .hud-modal-card {
        border-radius: 24px;
        max-height: min(96vh, 760px);
    }

    .hud-modal-head {
        padding: 16px 14px 8px;
    }

    .hud-modal-title {
        font-size: 22px;
    }

    .hud-modal-text,
    .hud-modal-body,
    .hud-modal-actions {
        margin-left: 14px;
        margin-right: 14px;
        padding-left: 0;
        padding-right: 0;
    }

    .hud-modal-actions {
        flex-direction: column;
    }
}
