/* ═══════════════════════════════════════════
   TroCHoi.Online — Dark Gaming Theme
   100% CSS, zero images
   ═══════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0e17;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --pvp-color: #f43f5e;
    --pve-color: #06b6d4;
    --gold: #fbbf24;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ── PARTICLES ── */
.particles {
    position: fixed; inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.particles::before, .particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .15;
    animation: float 20s ease-in-out infinite;
}
.particles::before {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; left: -100px;
}
.particles::after {
    width: 500px; height: 500px;
    background: #ec4899;
    bottom: -150px; right: -100px;
    animation-delay: -10s;
    animation-direction: reverse;
}
@keyframes float {
    0%,100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(80px,40px) scale(1.1); }
    66% { transform: translate(-60px,-30px) scale(.9); }
}

/* ── GLASS ── */
.glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── SCREENS ── */
.screen {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}
.screen.active { display: flex; }

/* ═══════ LOGIN SCREEN ═══════ */
#screen-login {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 36px;
    border-radius: var(--radius);
    text-align: center;
    animation: cardIn .6s ease-out;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 12px;
    animation: pulse-logo 3s ease-in-out infinite;
}
@keyframes pulse-logo {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}
.accent { color: var(--accent); }

.login-sub {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-top: 4px;
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#input-name {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.3);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
#input-name:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
#input-name::placeholder { color: var(--text-muted); }

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn-primary:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:not(:disabled):active {
    transform: translateY(0);
}
.btn-icon { font-size: 1.2rem; transition: var(--transition); }
.btn-primary:not(:disabled):hover .btn-icon { transform: translateX(4px); }

.login-hint {
    color: var(--text-muted);
    font-size: .8rem;
    margin-top: 20px;
}

/* ═══════ TOPBAR ═══════ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-glass);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-logo { font-size: 1.5rem; }
.topbar-brand { font-weight: 800; font-size: 1.15rem; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--green);
    background: rgba(34,197,94,.1);
    padding: 5px 12px;
    border-radius: 20px;
}
.pulse-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.7); }
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-logout:hover {
    background: rgba(239,68,68,.15);
    color: var(--red);
    border-color: rgba(239,68,68,.3);
}

.btn-back {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-back:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--accent);
}

/* ═══════ DASHBOARD ═══════ */
#screen-dashboard { flex-direction: column; }

.dashboard-content {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 28px;
    text-align: center;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ── GAME CARD ── */
.game-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 28px 24px 20px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cardFadeIn .5s ease-out both;
}
.game-card:nth-child(1) { animation-delay: .05s; }
.game-card:nth-child(2) { animation-delay: .1s; }
.game-card:nth-child(3) { animation-delay: .15s; }
.game-card:nth-child(4) { animation-delay: .2s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px var(--accent);
}

.card-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
}
.game-card:hover .card-glow { opacity: .15; }

.card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: flex;
    gap: 4px;
}
.big-emoji { font-size: 2.8rem; }

.suit { animation: suitBounce 2s ease-in-out infinite; }
.s1 { animation-delay: 0s; }
.s2 { animation-delay: .15s; }
.s3 { animation-delay: .3s; }
.s4 { animation-delay: .45s; }
@keyframes suitBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.bc1, .bc2, .bc3 { animation: suitBounce 2s ease-in-out infinite; }
.bc2 { animation-delay: .2s; }
.bc3 { animation-delay: .4s; }

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.card-mode {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    width: fit-content;
}
.card-mode.pvp {
    background: rgba(244,63,94,.15);
    color: var(--pvp-color);
    border: 1px solid rgba(244,63,94,.25);
}
.card-mode.pve {
    background: rgba(6,182,212,.15);
    color: var(--pve-color);
    border: 1px solid rgba(6,182,212,.25);
}

.card-desc {
    color: var(--text-secondary);
    font-size: .85rem;
    flex: 1;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-glass);
    padding-top: 14px;
}
.card-players {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    color: var(--text-muted);
}
.footer-icon { font-size: 1rem; }

.btn-play {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ═══════ BALANCE BADGE ═══════ */
.balance-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--orange);
    background: rgba(245,158,11,.1);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(245,158,11,.2);
}
.coin-icon {
    font-size: 1rem;
    animation: coinSpin 3s ease-in-out infinite;
}
@keyframes coinSpin {
    0%,100% { transform: rotateY(0); }
    50% { transform: rotateY(180deg); }
}

/* ═══════ CARD TAGS ═══════ */
.card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.card-tags .card-mode { margin-bottom: 0; }

.card-mode.bet {
    background: rgba(245,158,11,.15);
    color: var(--orange);
    border: 1px solid rgba(245,158,11,.25);
}

.section-title-2 {
    margin-top: 48px;
}

/* ═══════ CARO / CHESS / XIANGQI ICONS ═══════ */
.caro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}
.caro-x { color: var(--accent); }
.caro-o { color: var(--pvp-color); }

.chess-pieces {
    display: flex;
    gap: 4px;
    font-size: 2.4rem;
    line-height: 1;
}
.chess-pieces span { animation: suitBounce 2s ease-in-out infinite; }
.chess-pieces span:nth-child(1) { animation-delay: 0s; }
.chess-pieces span:nth-child(2) { animation-delay: .12s; }
.chess-pieces span:nth-child(3) { animation-delay: .24s; }
.chess-pieces span:nth-child(4) { animation-delay: .36s; }

.xiangqi-pieces {
    display: flex;
    gap: 10px;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}
.xq-red {
    color: var(--red);
    text-shadow: 0 0 10px rgba(239,68,68,.4);
}
.xq-black {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255,255,255,.2);
}
.xiangqi-pieces span { animation: suitBounce 2.5s ease-in-out infinite; }
.xiangqi-pieces span:nth-child(2) { animation-delay: .3s; }

/* ═══════ TOAST ═══════ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all .3s ease;
    pointer-events: none;
    max-width: 400px;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-info {
    background: rgba(99,102,241,.9);
    color: #fff;
    border: 1px solid var(--accent);
}
.toast-success {
    background: rgba(34,197,94,.9);
    color: #fff;
    border: 1px solid var(--green);
}
.toast-error {
    background: rgba(239,68,68,.9);
    color: #fff;
    border: 1px solid var(--red);
}

/* ═══════ LOBBY SCREEN ═══════ */
#screen-lobby { flex-direction: column; }

.lobby-content {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px;
}

.lobby-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.lobby-actions .btn-primary { width: auto; padding: 12px 24px; }

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.06);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-secondary:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--accent);
}

.room-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
    font-size: .95rem;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.room-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.room-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.room-item-id {
    font-weight: 700;
    font-size: .95rem;
    color: var(--accent);
}
.room-item-host {
    font-size: .8rem;
    color: var(--text-secondary);
}

.room-item-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.room-item-count {
    font-size: .85rem;
    color: var(--text-secondary);
}
.btn-join-room {
    width: auto !important;
    padding: 8px 18px !important;
    font-size: .85rem !important;
}

.room-id-badge {
    font-size: .75rem;
    background: rgba(99,102,241,.15);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* ═══════ GAME ROOM ═══════ */
#screen-gameroom { flex-direction: column; }

.gameroom-content {
    display: flex;
    flex: 1;
    width: 100%;
    padding: 0 20px 20px 0;
    gap: 0;
}

/* Sidebar */
.room-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-radius: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    margin-right: 16px;
    margin-left: 0;
    border-left: none;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-glass);
}

.room-players {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.room-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    font-size: .85rem;
    transition: var(--transition);
}
.room-player.is-me {
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.2);
}
.room-player.is-host {
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.15);
}

.player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    color: #fff;
    flex-shrink: 0;
}

.player-n { flex: 1; font-weight: 600; }
.host-badge { font-size: .9rem; }

/* Chat */
.room-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-glass);
    padding-top: 12px;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    font-size: .8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100px;
    max-height: 200px;
    padding: 4px;
}

.chat-msg {
    padding: 4px 8px;
    background: rgba(255,255,255,.03);
    border-radius: 6px;
    word-break: break-word;
}
.chat-msg strong {
    color: var(--accent);
}

.chat-input-group {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

#chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: rgba(0,0,0,.3);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .8rem;
    outline: none;
}
#chat-input:focus { border-color: var(--accent); }

.btn-chat-send {
    width: 36px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}
.btn-chat-send:hover { opacity: .8; }

/* Game Area */
.game-area {
    flex: 1;
    min-width: 0;
}

.game-panel {
    animation: cardFadeIn .4s ease-out;
}

.btn-start-game {
    margin-top: 20px;
    width: auto;
    padding: 14px 32px;
}

/* ═══════ SHARED GAME STYLES ═══════ */

/* Betting */
.bet-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.chip-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid var(--border-glass);
    background: rgba(255,255,255,.06);
    color: var(--gold);
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.chip-btn:hover {
    background: rgba(251,191,36,.15);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.bet-input {
    width: 120px;
    padding: 8px 14px;
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.3);
    color: var(--gold);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    text-align: center;
}
.bet-input:focus { border-color: var(--gold); }

/* Results */
.bets-header, .results-header, .bc-results-header, .xd-results-header {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-glass);
}

.bet-row, .result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: .85rem;
    background: rgba(255,255,255,.03);
}

.bet-player, .result-player { font-weight: 600; flex: 1; }
.bet-choice, .result-choice {
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
}
.bet-choice.tai, .result-choice.tai {
    background: rgba(239,68,68,.15);
    color: var(--red);
}
.bet-choice.xiu, .result-choice.xiu {
    background: rgba(6,182,212,.15);
    color: var(--pve-color);
}
.bet-amount { font-weight: 700; color: var(--gold); }

.result-win { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.15); }
.result-lose { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.15); }
.result-payout { font-weight: 700; min-width: 80px; text-align: right; }
.result-win .result-payout { color: var(--green); }
.result-lose .result-payout { color: var(--red); }

/* Countdown */
.countdown-urgent {
    color: var(--red) !important;
    animation: blinkUrgent .5s ease-in-out infinite;
}
@keyframes blinkUrgent {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* Dice pop */
.dice-pop {
    animation: dicePop .6s ease-out !important;
}
@keyframes dicePop {
    0% { transform: scale(0.3) rotate(180deg); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ═══════ TÀI XỈU ═══════ */
.tx-countdown-area {
    text-align: center;
    margin-bottom: 24px;
}
.tx-round-info {
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.tx-countdown {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}

.tx-dice-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}
.tx-dice {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
    border: 2px solid #ccc;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 10px;
    gap: 2px;
    box-shadow: 3px 3px 10px rgba(0,0,0,.3), inset 1px 1px 3px rgba(255,255,255,.6);
    transition: transform .3s ease;
}
.tx-dice .dice-dot {
    width: 100%;
    aspect-ratio: 1;
    background: radial-gradient(circle, #1a1a1a 60%, #333);
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.tx-dice .dice-empty {
    width: 100%;
    aspect-ratio: 1;
}
.tx-dice .dice-q {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #999;
    font-weight: 700;
}
.tx-dice.dice-rolling {
    animation: diceShake .12s ease-in-out infinite;
}
.tx-dice.dice-pop {
    animation: dicePop .5s ease-out;
}
@keyframes diceShake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.02); }
    75% { transform: rotate(-5deg) scale(1.02); }
}
@keyframes dicePop {
    0% { transform: scale(.6) rotate(-10deg); opacity: .5; }
    50% { transform: scale(1.15) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.tx-sum {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tx-result-badge {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 24px;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.tx-result-badge.result-tai {
    background: rgba(239,68,68,.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,.3);
}
.tx-result-badge.result-xiu {
    background: rgba(6,182,212,.15);
    color: var(--pve-color);
    border: 1px solid rgba(6,182,212,.3);
}

.tx-betting-area {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}
.tx-betting-area.disabled {
    opacity: .4;
    pointer-events: none;
}

.tx-bet-group label {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-secondary);
}

.tx-choice-btns {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.btn-tai, .btn-xiu {
    flex: 1;
    padding: 20px;
    border: 2px solid var(--border-glass);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-tai {
    background: rgba(239,68,68,.1);
    color: var(--red);
}
.btn-tai:hover {
    background: rgba(239,68,68,.2);
    border-color: var(--red);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(239,68,68,.2);
}
.btn-xiu {
    background: rgba(6,182,212,.1);
    color: var(--pve-color);
}
.btn-xiu:hover {
    background: rgba(6,182,212,.2);
    border-color: var(--pve-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(6,182,212,.2);
}
.btn-tai small, .btn-xiu small {
    font-size: .7rem;
    font-weight: 500;
    opacity: .7;
}
.btn-tai.tx-selected {
    background: rgba(239,68,68,.3);
    border-color: var(--red);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(239,68,68,.3);
}
.btn-xiu.tx-selected {
    background: rgba(6,182,212,.3);
    border-color: var(--pve-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(6,182,212,.3);
}

.tx-bets-table, .tx-results-table {
    margin-bottom: 16px;
}

/* ═══════ XÌ DÁCH ═══════ */
.xd-round-info {
    text-align: center;
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.xd-dealer-area, .xd-player-area {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}
.xd-dealer-area h3, .xd-player-area h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.xd-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 8px 0;
}

.xd-cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 90px;
    align-items: flex-start;
}

/* Playing Card */
.playing-card {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    animation: cardDealAnim .4s ease-out;
}
@keyframes cardDealAnim {
    from { opacity: 0; transform: translateY(-30px) rotateY(90deg); }
    to { opacity: 1; transform: translateY(0) rotateY(0); }
}

.playing-card.card-red { color: #dc2626; }
.playing-card.card-black { color: #1e293b; }

.card-rank {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}
.card-suit {
    font-size: 1.4rem;
    line-height: 1;
}

.playing-card.card-hidden {
    background: linear-gradient(145deg, #3b3ba8, #4f46e5);
    border-color: #6366f1;
}
.card-back {
    font-size: 2rem;
}

.xd-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: 8px;
}

.xd-hand-type {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 4px;
}
.ht-xidach { color: var(--gold); }
.ht-xiban { color: #f472b6; }
.ht-ngulinh { color: var(--green); }
.ht-bust { color: var(--red); }
.ht-21 { color: var(--green); }

.xd-actions {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.btn-hit, .btn-stand {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border-glass);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn-hit {
    background: rgba(34,197,94,.1);
    color: var(--green);
}
.btn-hit:hover {
    background: rgba(34,197,94,.2);
    border-color: var(--green);
    transform: translateY(-2px);
}
.btn-stand {
    background: rgba(245,158,11,.1);
    color: var(--orange);
}
.btn-stand:hover {
    background: rgba(245,158,11,.2);
    border-color: var(--orange);
    transform: translateY(-2px);
}

.xd-betting-area {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
}
.xd-betting-area label {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-secondary);
}
.xd-betting-area .btn-primary {
    margin-top: 12px;
    width: auto;
    padding: 12px 32px;
}

.xd-status {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    padding: 12px;
    min-height: 44px;
}

.xd-all-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.xd-other-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-glass);
    font-size: .85rem;
}
.xd-other-player.xd-bust { border-color: rgba(239,68,68,.3); opacity: .6; }
.xd-other-player.xd-stood { border-color: rgba(245,158,11,.3); }

.xd-p-name { font-weight: 600; }
.xd-p-status { color: var(--text-secondary); font-size: .8rem; }
.xd-p-cards { letter-spacing: 2px; }

/* Xi Dach Results */
.xd-results {
    margin-top: 16px;
}
.xd-results-header {
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.xd-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xd-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    flex-wrap: wrap;
}
.xd-result-row.payout-win {
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.15);
}
.xd-result-row.payout-lose {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.15);
}
.xd-result-player { font-weight: 700; min-width: 80px; }
.xd-result-cards { display: flex; gap: 3px; }
.mini-card {
    padding: 2px 4px;
    border-radius: 4px;
    background: #fff;
    font-size: .75rem;
    font-weight: 700;
    border: 1px solid #ddd;
}
.mini-card.card-red { color: #dc2626; }
.mini-card.card-black { color: #1e293b; }
.xd-result-score { color: var(--text-secondary); }
.xd-result-outcome { font-weight: 700; color: var(--gold); }
.xd-result-payout { font-weight: 800; min-width: 80px; text-align: right; }
.payout-win .xd-result-payout { color: var(--green); }
.payout-lose .xd-result-payout { color: var(--red); }

/* ═══════ BẦU CUA ═══════ */
.bc-countdown-area {
    text-align: center;
    margin-bottom: 20px;
}
.bc-round-info {
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.bc-countdown {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}

.bc-dice-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}
.bc-dice {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(0,0,0,.2));
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: var(--transition);
}

.bc-symbols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    transition: var(--transition);
}
.bc-symbols-grid.disabled {
    opacity: .4;
    pointer-events: none;
}

.bc-symbol-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.bc-symbol-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.bc-symbol-card.bc-match {
    border-color: var(--green);
    background: rgba(34,197,94,.1);
    box-shadow: 0 0 20px rgba(34,197,94,.2);
}
.bc-symbol-card.bc-no-match {
    opacity: .4;
}
.bc-symbol-card.bc-selected {
    border-color: var(--accent);
    background: rgba(99,102,241,.15);
    box-shadow: 0 0 20px rgba(99,102,241,.3);
    transform: translateY(-4px);
}

.bc-emoji { font-size: 2.5rem; }
.bc-label {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-primary);
}
.bc-bet-display {
    font-size: .75rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(251,191,36,.1);
    padding: 2px 10px;
    border-radius: 12px;
}

.bc-bet-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.bc-bet-controls label {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-secondary);
}

.bc-results {
    margin-top: 16px;
}
.bc-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: .85rem;
    flex-wrap: wrap;
}
.bc-result-row.payout-win {
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.15);
}
.bc-result-row.payout-lose {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.15);
}
.bc-result-player { font-weight: 700; }
.bc-result-details { flex: 1; color: var(--text-secondary); font-size: .8rem; }
.bc-result-payout { font-weight: 800; }
.payout-win .bc-result-payout { color: var(--green); }
.payout-lose .bc-result-payout { color: var(--red); }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
    .gameroom-content {
        flex-direction: column;
    }
    .room-sidebar {
        width: 100%;
        max-height: none;
        order: 2;
        border-radius: 0;
    }
    .game-area {
        order: 1;
    }
    .tx-choice-btns { flex-direction: column; }
    .xd-actions { flex-direction: column; }
    .bc-symbols-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .login-card { padding: 36px 24px; }
    .login-title { font-size: 1.6rem; }
    .topbar { padding: 10px 16px; }
    .topbar-brand { display: none; }
    .game-grid { grid-template-columns: 1fr; }
    .dashboard-content { padding: 24px 16px 40px; }
    .playing-card { width: 50px; height: 72px; font-size: .85rem; }
    .card-suit { font-size: 1.1rem; }
    .tx-dice, .bc-dice { width: 60px; height: 60px; font-size: 2rem; }
}

@media (max-width: 380px) {
    .online-badge span:not(.pulse-dot) { display: none; }
    .online-badge::after { content: '🟢'; }
    .bc-symbols-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════ COMING SOON ═══════ */
.game-card-coming-soon {
    opacity: .5;
    cursor: default;
    position: relative;
}
.game-card-coming-soon:hover {
    transform: none;
    border-color: var(--border-glass);
    box-shadow: none;
}
.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,.1);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.btn-play:disabled {
    opacity: .4;
    cursor: not-allowed;
    background: rgba(255,255,255,.1);
}

/* ═══════ CỜ CARO ═══════ */
.caro-status-area {
    text-align: center;
    margin-bottom: 16px;
}
.caro-turn-info {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.caro-turn-info.my-turn {
    color: var(--green);
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.2);
}
.caro-marks {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 1rem;
    font-weight: 600;
}
.caro-mark-x { color: var(--accent); }
.caro-mark-o { color: var(--pvp-color); }

.caro-board-wrapper {
    display: flex;
    justify-content: center;
    overflow: auto;
    max-height: 60vh;
    padding: 4px;
}
.caro-board {
    display: grid;
    gap: 0;
    width: fit-content;
}
.caro-cell {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, transform .15s;
    background: rgba(255,255,255,.02);
}
.caro-cell:hover {
    background: rgba(255,255,255,.08);
}
.caro-cell.cell-x {
    color: var(--accent);
    cursor: default;
}
.caro-cell.cell-o {
    color: var(--pvp-color);
    cursor: default;
}
.caro-cell.cell-placed {
    animation: cellPop .3s ease-out;
}
@keyframes cellPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.caro-cell.cell-win {
    background: rgba(251,191,36,.2);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(251,191,36,.3);
    animation: cellWinPulse 1s ease-in-out infinite;
}
@keyframes cellWinPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(251,191,36,.3); }
    50% { box-shadow: 0 0 16px rgba(251,191,36,.5); }
}

.caro-result {
    margin-top: 16px;
    text-align: center;
}
.caro-result-box {
    display: inline-block;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1.3rem;
    font-weight: 800;
    animation: cardFadeIn .4s ease-out;
}
.caro-result-box.result-win {
    background: rgba(34,197,94,.15);
    color: var(--green);
    border: 1px solid rgba(34,197,94,.3);
}
.caro-result-box.result-lose {
    background: rgba(239,68,68,.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,.3);
}
.caro-result-box.result-draw {
    background: rgba(245,158,11,.15);
    color: var(--orange);
    border: 1px solid rgba(245,158,11,.3);
}

/* ═══════ TIẾN LÊN ═══════ */
.tl-status-area {
    text-align: center;
    margin-bottom: 16px;
}
.tl-turn-info {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.tl-turn-info.my-turn {
    color: var(--green);
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.2);
}

.tl-table {
    margin-bottom: 16px;
}

.tl-other-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.tl-player-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-glass);
    font-size: .85rem;
    transition: var(--transition);
}
.tl-player-badge.tl-me {
    border-color: rgba(99,102,241,.3);
    background: rgba(99,102,241,.08);
}
.tl-player-badge.tl-player-out {
    opacity: .5;
}
.tl-p-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .7rem;
    color: #fff;
    flex-shrink: 0;
}
.tl-p-name { font-weight: 600; }
.tl-p-count {
    color: var(--text-muted);
    font-size: .8rem;
}

.tl-played-cards {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 100px;
}
.tl-played-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.tl-play-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.tl-played-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tl-free-label {
    color: var(--gold);
    font-weight: 600;
    font-style: italic;
}

.tl-my-hand-area {
    margin: 16px 0;
}
.tl-my-hand-area h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.tl-hand {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 80px;
}

/* Tiến Lên Cards */
.tl-card {
    width: 54px;
    height: 76px;
    border-radius: 6px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.tl-card.card-red { color: #dc2626; }
.tl-card.card-black { color: #1e293b; }

.tl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0,0,0,.4);
}
.tl-card.tl-card-selected {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.tl-card-rank {
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
}
.tl-card-suit {
    font-size: 1.2rem;
    line-height: 1;
}

/* Tiến Lên Actions */
.tl-actions {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}
.tl-actions .btn-primary, .tl-actions .btn-secondary {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    text-align: center;
}
.btn-tl-play {
    background: linear-gradient(135deg, var(--green), #16a34a) !important;
}
.btn-tl-pass {
    background: rgba(245,158,11,.1) !important;
    color: var(--orange) !important;
    border-color: rgba(245,158,11,.3) !important;
}

/* Tiến Lên Rankings */
.tl-rankings {
    margin-top: 16px;
}
.tl-rankings-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-glass);
}
.tl-rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255,255,255,.03);
    font-size: .9rem;
}
.tl-rank-row.rank-first {
    background: rgba(251,191,36,.1);
    border: 1px solid rgba(251,191,36,.2);
}
.tl-rank-pos { font-weight: 700; min-width: 40px; }
.tl-rank-name { flex: 1; font-weight: 600; }
.tl-rank-cards { color: var(--text-muted); font-size: .85rem; }
.tl-rank-payout {
    font-weight: 700;
    font-size: .9rem;
    margin-left: 8px;
}
.tl-rank-payout.payout-win { color: var(--green); }
.tl-rank-payout.payout-lose { color: var(--red); }
.tl-rank-row.rank-winner {
    background: rgba(34,197,94,.06);
    border: 1px solid rgba(34,197,94,.15);
}
.tl-rank-row.rank-loser {
    background: rgba(239,68,68,.06);
    border: 1px solid rgba(239,68,68,.15);
}

.tl-pot-info {
    background: rgba(251,191,36,.1);
    color: var(--gold);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 8px;
    text-align: center;
}

.tl-betting-area {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 16px;
    margin: 12px 0;
}
.tl-betting-area label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ═══════ ENHANCED ANIMATIONS & POLISH ═══════ */

/* Smooth page transitions */
.screen { transition: opacity .4s ease, transform .4s ease; }
.screen.active { animation: screenSlideIn .4s ease-out; }
@keyframes screenSlideIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Card deal animation */
.tl-card, .playing-card {
    animation: cardDeal .4s ease-out;
    animation-fill-mode: both;
}
@keyframes cardDeal {
    0% { opacity: 0; transform: translateY(-30px) rotateZ(-10deg) scale(.7); }
    60% { transform: translateY(4px) rotateZ(1deg) scale(1.03); }
    100% { opacity: 1; transform: translateY(0) rotateZ(0) scale(1); }
}

/* Staggered card entrance */
.tl-hand .tl-card:nth-child(1) { animation-delay: 0s; }
.tl-hand .tl-card:nth-child(2) { animation-delay: .04s; }
.tl-hand .tl-card:nth-child(3) { animation-delay: .08s; }
.tl-hand .tl-card:nth-child(4) { animation-delay: .12s; }
.tl-hand .tl-card:nth-child(5) { animation-delay: .16s; }
.tl-hand .tl-card:nth-child(6) { animation-delay: .20s; }
.tl-hand .tl-card:nth-child(7) { animation-delay: .24s; }
.tl-hand .tl-card:nth-child(8) { animation-delay: .28s; }
.tl-hand .tl-card:nth-child(9) { animation-delay: .32s; }
.tl-hand .tl-card:nth-child(10) { animation-delay: .36s; }
.tl-hand .tl-card:nth-child(11) { animation-delay: .40s; }
.tl-hand .tl-card:nth-child(12) { animation-delay: .44s; }
.tl-hand .tl-card:nth-child(13) { animation-delay: .48s; }

/* Tiến Lên card selection glow */
.tl-card.tl-card-selected {
    transform: translateY(-14px);
    border-color: var(--accent);
    box-shadow: 0 8px 28px var(--accent-glow), 0 0 12px rgba(99,102,241,.3);
}
.tl-card:active {
    transform: scale(.95);
    transition-duration: .1s;
}

/* Enhanced TL turn indicator */
.tl-turn-info {
    transition: all .3s ease;
}
.tl-turn-info.my-turn {
    animation: turnPulse 2s ease-in-out infinite;
}
@keyframes turnPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.3); }
    50% { box-shadow: 0 0 20px 4px rgba(34,197,94,.15); }
}

/* Chip active state */
.chip-btn.active,
.chip-btn:active {
    background: rgba(251,191,36,.25) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 12px rgba(251,191,36,.3);
    transform: translateY(-3px) scale(1.05);
}

/* Countdown animations */
.tx-countdown, .bc-countdown {
    transition: all .3s ease;
}
@keyframes countdownTick {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.countdown-urgent {
    animation: blinkUrgent .5s ease-in-out infinite, countdownTick 1s ease-in-out infinite !important;
}

/* Dice rolling animation */
@keyframes diceRoll {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg); }
}
.tx-dice, .bc-dice {
    transition: all .4s cubic-bezier(.175,.885,.32,1.275);
}

/* Enhanced dice pop */
.dice-pop {
    animation: dicePop .6s cubic-bezier(.175,.885,.32,1.275) !important;
}
@keyframes dicePop {
    0% { transform: scale(.2) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.35) rotate(-10deg); opacity: 1; }
    70% { transform: scale(.9); }
    100% { transform: scale(1) rotate(0); }
}

/* Result slide-in */
.result-row, .bc-result-row, .xd-result-row, .tl-rank-row {
    animation: resultSlideIn .4s ease-out both;
}
.result-row:nth-child(2) { animation-delay: .1s; }
.result-row:nth-child(3) { animation-delay: .2s; }
.result-row:nth-child(4) { animation-delay: .3s; }

.bc-result-row:nth-child(2) { animation-delay: .1s; }
.bc-result-row:nth-child(3) { animation-delay: .2s; }

.tl-rank-row:nth-child(2) { animation-delay: .1s; }
.tl-rank-row:nth-child(3) { animation-delay: .15s; }
.tl-rank-row:nth-child(4) { animation-delay: .2s; }

@keyframes resultSlideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Balance flash on update */
@keyframes balanceFlash {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); filter: brightness(1.4); }
    100% { transform: scale(1); filter: brightness(1); }
}
.balance-badge.updated {
    animation: balanceFlash .5s ease-out;
}

/* Tai/Xiu button pulse when betting open */
.btn-tai, .btn-xiu {
    position: relative;
    overflow: hidden;
}
.btn-tai::after, .btn-xiu::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
    opacity: 0;
    transition: opacity .3s;
}
.btn-tai:hover::after, .btn-xiu:hover::after {
    opacity: 1;
}

/* Bầu Cua symbol bounce on match */
.bc-symbol-card.bc-match {
    animation: matchBounce .5s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes matchBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.1) translateY(-6px); }
    60% { transform: scale(.95); }
    100% { transform: scale(1); }
}

/* Playing card shadows & hover */
.playing-card {
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
}
.playing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.playing-card.card-deal {
    animation: cardDeal .4s ease-out;
}

/* Xì Dách hand type badges */
.xd-hand-type {
    transition: all .3s ease;
    display: inline-block;
}
.ht-xidach, .ht-xiban, .ht-ngulinh {
    animation: specialHandPop .6s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes specialHandPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Pot info glow */
.tl-pot-info {
    animation: potGlow 2s ease-in-out infinite;
}
@keyframes potGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,.1); }
    50% { box-shadow: 0 0 16px 4px rgba(251,191,36,.15); }
}

/* Betting area shimmer */
.tx-betting-area, .bc-bet-controls, .tl-betting-area {
    position: relative;
    overflow: hidden;
}
.tx-betting-area::before, .bc-bet-controls::before, .tl-betting-area::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.03), transparent);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Player badge hover */
.tl-player-badge:hover {
    background: rgba(255,255,255,.07);
    transform: translateY(-2px);
}

/* Better scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* Button press feedback */
.btn-primary:active, .btn-secondary:active, .btn-play:active {
    transform: scale(.95);
    transition-duration: .1s;
}

/* Game panel content fade */
.game-panel > * {
    animation: fadeUp .3s ease-out both;
}
.game-panel > *:nth-child(2) { animation-delay: .05s; }
.game-panel > *:nth-child(3) { animation-delay: .1s; }
.game-panel > *:nth-child(4) { animation-delay: .15s; }
.game-panel > *:nth-child(5) { animation-delay: .2s; }

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Enhanced TL card styling */
.tl-card {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,.25), inset 0 1px 2px rgba(255,255,255,.5);
}
.tl-card.card-red .tl-card-rank,
.tl-card.card-red .tl-card-suit {
    text-shadow: 0 0 6px rgba(220,38,38,.3);
}

/* Next round countdown badge */
.countdown-next-round {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.15));
    border: 1px solid rgba(99,102,241,.3);
    color: var(--accent);
    font-weight: 700;
    animation: pulseGlow 1.5s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 0 rgba(99,102,241,0); }
    50% { box-shadow: 0 0 12px rgba(99,102,241,.2); }
}

/* Xì Dách result cards */
.mini-card {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 700;
    background: rgba(255,255,255,.9);
    margin: 1px;
}
.mini-card.card-red { color: #dc2626; }
.mini-card.card-black { color: #1e293b; }

/* Win/Lose payout emphasis */
.payout-win .bc-result-payout,
.payout-win .xd-result-payout { color: var(--green); font-weight: 800; }
.payout-lose .bc-result-payout,
.payout-lose .xd-result-payout { color: var(--red); font-weight: 800; }

/* Toast animation improvement */
.toast {
    animation: toastIn .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes toastIn {
    0% { opacity: 0; transform: translateX(100px) scale(.8); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ═══════ RESPONSIVE (new games) ═══════ */
@media (max-width: 768px) {
    .caro-cell { width: 26px; height: 26px; font-size: .7rem; }
    .tl-card { width: 46px; height: 66px; font-size: .8rem; }
    .tl-card-suit { font-size: 1rem; }
    .tl-actions { flex-direction: column; }
    .tx-dice, .bc-dice { width: 60px; height: 60px; font-size: 2rem; }
    .bc-symbols-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .bc-symbol-card { padding: 12px 8px; }
    .bc-emoji { font-size: 2rem; }
    .tx-choice-btns { flex-direction: column; gap: 10px; }
}

@media (max-width: 640px) {
    .caro-cell { width: 22px; height: 22px; font-size: .6rem; }
    .tl-card { width: 40px; height: 58px; }
    .tl-card-rank { font-size: .8rem; }
    .tl-card-suit { font-size: .9rem; }
    .tx-dice, .bc-dice { width: 50px; height: 50px; font-size: 1.5rem; }
    .bc-symbols-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   ĐUA XE MÔ TÔ 3D - Styles
   ═══════════════════════════════════════ */

/* Container */
#panel-duaxe { padding: 0 !important; }
.duaxe-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #000;
}

#duaxe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ─── Phase Overlays ─── */
.duaxe-phase-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.80);
    z-index: 10;
    overflow-y: auto;
    padding: 20px;
    animation: cardIn .4s ease-out;
}

.duaxe-phase-box {
    max-width: 480px;
    width: 100%;
    padding: 40px 32px;
    border-radius: var(--radius);
    text-align: center;
}

.duaxe-phase-box.duaxe-phase-wide {
    max-width: 900px;
    text-align: left;
}

.duaxe-phase-box h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.duaxe-phase-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.duaxe-phase-box p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: center;
}

.duaxe-phase-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: pulse-logo 3s ease-in-out infinite;
}

/* Lobby start button */
.duaxe-lobby-start-btn {
    margin-top: 12px;
    width: 100% !important;
    padding: 14px !important;
    font-size: 1.1rem !important;
    background: linear-gradient(135deg, #ff6b35, #f7c948) !important;
}

/* ─── Map Select Grid (large cards) ─── */
.duaxe-mapselect-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.duaxe-map-card-lg {
    background: rgba(255,255,255,0.04);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.duaxe-map-card-lg.duaxe-map-clickable {
    cursor: pointer;
}

.duaxe-map-card-lg.duaxe-map-clickable:hover {
    border-color: var(--accent);
    background: rgba(99,102,241,0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.duaxe-map-preview-lg {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duaxe-map-emoji {
    font-size: 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.duaxe-map-info-lg {
    padding: 10px 14px;
}

.duaxe-map-title-lg {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.duaxe-map-desc-lg {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Bike Select Layout ─── */
.duaxe-bikeselect-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.duaxe-bikeselect-left {
    max-height: 55vh;
    overflow-y: auto;
}

.duaxe-bikeselect-right {
    display: flex;
    flex-direction: column;
}

/* Bike Grid */
.duaxe-bike-grid {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 8px;
}

.duaxe-bike-section h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    margin-top: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-glass);
}

.duaxe-bike-section:first-child h4 { margin-top: 0; }

.duaxe-bike-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.duaxe-bike-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.duaxe-bike-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.duaxe-bike-card.selected {
    border-color: var(--accent);
    background: rgba(99,102,241,0.15);
    box-shadow: 0 0 16px var(--accent-glow);
}

.duaxe-bike-preview {
    width: 100%;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.duaxe-bike-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.duaxe-bike-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Ready List ─── */
.duaxe-ready-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    max-height: 40vh;
    overflow-y: auto;
}

.duaxe-ready-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.duaxe-ready-row.duaxe-ready-me {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.2);
}

.duaxe-ready-icon {
    font-size: 1.1rem;
}

.duaxe-ready-name {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.duaxe-ready-bike {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ready Button */
.duaxe-ready-btn {
    width: 100% !important;
    padding: 14px !important;
    font-size: 1.05rem !important;
    background: linear-gradient(135deg, var(--green), #16a34a) !important;
}

.duaxe-ready-btn:hover {
    box-shadow: 0 8px 24px rgba(34,197,94,0.4) !important;
}

.duaxe-ready-btn.duaxe-ready-active {
    background: linear-gradient(135deg, var(--red), #dc2626) !important;
}

.duaxe-ready-btn.duaxe-ready-active:hover {
    box-shadow: 0 8px 24px rgba(239,68,68,0.4) !important;
}

/* ─── HUD ─── */
.duaxe-hud {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 5;
}

.duaxe-hud-speed {
    background: rgba(10,10,20,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100,200,255,0.2);
    border-radius: 20px;
    padding: 16px 24px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 0 20px rgba(0,200,255,0.15), inset 0 0 15px rgba(0,200,255,0.05);
}

.duaxe-hud-speed span {
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff88, #00ddff, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(0,255,136,0.4));
}

.duaxe-hud-speed small {
    display: block;
    font-size: 0.8rem;
    color: rgba(200,220,255,0.6);
    margin-top: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.duaxe-hud-info {
    background: rgba(10,10,20,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100,200,255,0.2);
    border-radius: 20px;
    padding: 14px 22px;
    display: flex;
    gap: 24px;
    box-shadow: 0 0 20px rgba(0,200,255,0.15), inset 0 0 15px rgba(0,200,255,0.05);
}

.duaxe-hud-lap, .duaxe-hud-position {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e0e8ff;
    text-shadow: 0 0 6px rgba(100,180,255,0.3);
}

.duaxe-hud-boost {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4400, #ff8800, #ffcc00);
    color: #fff;
    padding: 10px 28px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    animation: boostPulse 0.4s ease-in-out infinite alternate;
    pointer-events: none;
    box-shadow: 0 0 25px rgba(255,100,0,0.6), 0 0 50px rgba(255,160,0,0.3);
    text-shadow: 0 0 10px rgba(255,200,0,0.8);
}

@keyframes boostPulse {
    from { transform: translateX(-50%) scale(1); box-shadow: 0 0 25px rgba(255,100,0,0.6), 0 0 50px rgba(255,160,0,0.3); }
    to { transform: translateX(-50%) scale(1.08); box-shadow: 0 0 35px rgba(255,100,0,0.8), 0 0 70px rgba(255,160,0,0.5); }
}

.duaxe-hud-controls {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    pointer-events: none;
    z-index: 4;
}

.duaxe-hud-controls span {
    background: rgba(10,10,20,0.5);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.7rem;
    color: rgba(200,210,230,0.5);
    letter-spacing: 0.5px;
}

/* ─── Countdown ─── */
.duaxe-countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 40px rgba(255,255,255,0.5), 0 0 80px rgba(99,102,241,0.5);
    z-index: 20;
    pointer-events: none;
    background: rgba(0,0,0,0.3);
}

.duaxe-countdown-anim {
    animation: countdownPop 0.8s ease-out;
}

@keyframes countdownPop {
    0% { transform: scale(2); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.7; }
}

/* ─── Message ─── */
.duaxe-message {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    z-index: 15;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.1);
}

.duaxe-msg-anim {
    animation: msgSlideIn 0.3s ease-out;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Results ─── */
.duaxe-results {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 25;
    padding: 40px;
    animation: cardIn 0.5s ease-out;
}

.duaxe-results h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.duaxe-results-timer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.duaxe-results-timer span {
    color: var(--orange);
    font-weight: 700;
}

.duaxe-results-list {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.duaxe-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.duaxe-result-row.duaxe-result-me {
    background: rgba(99,102,241,0.15);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.duaxe-result-rank {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.duaxe-result-name {
    font-weight: 700;
    font-size: 1rem;
    flex: 1;
}

.duaxe-result-bike {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duaxe-result-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--orange);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.duaxe-result-status {
    font-size: 0.8rem;
    color: var(--green);
    min-width: 50px;
    text-align: right;
}

/* ─── Controls Hint ─── */
.duaxe-controls-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 5;
    pointer-events: none;
}

.duaxe-controls-hint span {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .duaxe-bikeselect-layout {
        grid-template-columns: 1fr;
    }
    .duaxe-mapselect-grid {
        grid-template-columns: 1fr;
    }
    .duaxe-bike-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .duaxe-hud {
        padding: 0 12px;
        bottom: 50px;
    }
    .duaxe-hud-speed span {
        font-size: 1.8rem;
    }
    .duaxe-countdown {
        font-size: 5rem;
    }
    .duaxe-controls-hint {
        gap: 8px;
    }
    .duaxe-controls-hint span {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
}
