/* ========================================
   Hit the Post! - BBPT Card Game Styles
   ======================================== */

:root {
    --felt-green: #1a6b3c;
    --felt-dark: #0f4425;
    --felt-border: #2c1810;
    --gold: #ffd700;
    --gold-dim: #b8960f;
    --red: #c0392b;
    --green: #27ae60;
    --purple: #8e44ad;
    --blue: #2980b9;
    --card-width: 120px;
    --card-height: 168px;
    --card-radius: 10px;
    --bg-dark: #1a1a1a;
    --bg-darker: #111;
    --bg-card: #222;
    --text-light: #e0e0e0;
    --text-muted: #888;
    --font: 'Open Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg-darker);
    color: var(--text-light);
    font-family: var(--font);
    min-height: 100vh;
}

/* ---- Header ---- */
.htp-header {
    text-align: center;
    padding: 16px 16px 8px;
    background: var(--bg-dark);
    border-bottom: 2px solid #333;
    position: relative;
}
.htp-logo-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    line-height: 0;
}
.htp-logo-link:hover { opacity: 0.85; }
.htp-logo-img {
    height: 150px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(255,215,0,0.3));
}
.header-buttons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}
.hdr-btn {
    background: none;
    border: 1px solid #444;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    color: var(--text-muted);
    transition: border-color 0.2s;
}
.hdr-btn:hover { border-color: #888; }
.hdr-btn.lb-notify {
    animation: lb-pulse 1.4s ease-in-out infinite;
    border-color: var(--gold);
}
@keyframes lb-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.5); transform: scale(1); }
    50% { box-shadow: 0 0 12px 4px rgba(255,215,0,0.4); transform: scale(1.15); }
}
.htp-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(255,215,0,0.3);
}
.htp-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- Modals ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}
.modal-box {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 32px 36px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.modal-box h2 {
    color: var(--gold);
    margin: 0 0 12px;
    font-size: 22px;
}
.modal-box p {
    color: #aaa;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 20px;
}
.modal-input-group { margin-bottom: 20px; }
.modal-input-group label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}
.modal-input-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font);
    border: 1px solid #555;
    border-radius: 6px;
    background: #333;
    color: #fff;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.modal-input-group input:focus { border-color: var(--gold); }
.modal-hint { font-size: 11px; color: #666; margin-top: 6px; }
.recover-error { color: #e74c3c; font-size: 13px; margin: 8px 0; text-align: center; }
.pin-reveal { cursor: pointer; font-size: 13px; color: var(--text-muted); margin-top: 4px; text-align: center; }
.pin-reveal:hover { color: var(--gold); }

/* Bust overlay */
.bust-overlay { background: rgba(30,0,0,0.92); }
.bust-box { border-color: var(--red); }
.bust-title {
    color: var(--red) !important;
    font-size: 36px !important;
    text-shadow: 0 0 20px rgba(192,57,43,0.5);
}
.bust-countdown {
    color: var(--gold);
    font-weight: 700;
    font-size: 18px;
}
.bust-leaderboard-link { margin-top: 16px; }

/* Splash screen (after declining donut) */
.splash-overlay {
    background: rgba(10, 10, 10, 0.95);
    cursor: pointer;
    justify-content: center;
    align-items: center;
}
.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}
.splash-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.splash-logo {
    width: 220px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}
.splash-aura {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    z-index: 1;
    background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%);
    box-shadow:
        0 0 40px 10px rgba(255, 215, 0, 0.15),
        0 0 80px 20px rgba(255, 180, 0, 0.08);
    animation: splash-aura-pulse 3s ease-in-out infinite, splash-aura-spin 8s linear infinite;
}
@keyframes splash-aura-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 40px 10px rgba(255, 215, 0, 0.15),
            0 0 80px 20px rgba(255, 180, 0, 0.08);
    }
    50% {
        transform: scale(1.12);
        box-shadow:
            0 0 60px 20px rgba(255, 215, 0, 0.25),
            0 0 120px 40px rgba(255, 180, 0, 0.12);
    }
}
@keyframes splash-aura-spin {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(15deg); }
    100% { filter: hue-rotate(0deg); }
}
.splash-tap {
    color: rgba(255, 215, 0, 0.5);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: splash-tap-fade 2s ease-in-out infinite;
    margin: 0;
}
@keyframes splash-tap-fade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ---- Help Modal ---- */
.help-box {
    max-width: 520px;
    text-align: left;
}
.help-box h2 {
    text-align: center;
}
.help-content h3 {
    color: var(--gold);
    font-size: 15px;
    margin: 16px 0 6px;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}
.help-content h3:first-child { margin-top: 0; }
.help-content p {
    color: #bbb;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 8px;
}
.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #bbb;
}
.help-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #333;
    vertical-align: top;
}
.help-table td:first-child {
    white-space: nowrap;
    color: var(--gold);
    width: 140px;
}
#helpBtn {
    font-weight: 700;
    font-size: 16px;
    font-family: var(--font);
}

/* ---- Avatar Picker ---- */
.avatar-picker {
    margin: 16px 0 12px;
}
.avatar-picker label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 4px;
}
.avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    background: #2a2a2a;
}
.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-option:hover { border-color: #666; transform: scale(1.08); }
.avatar-option.selected { border-color: var(--gold); box-shadow: 0 0 8px rgba(255,215,0,0.4); }
.avatar-separator {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(to right, transparent, #555, transparent);
    margin: 6px 0;
}

/* Welcome screen & avatar pickers — larger on desktop */
@media (min-width: 601px) {
    #nameModal .modal-box {
        max-width: 1200px;
        padding: 40px 56px;
    }
    #nameModal .modal-box h2 {
        font-size: 30px;
    }
    #nameModal .avatar-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 12px;
    }
    #nameModal .avatar-option {
        border-width: 4px;
    }
    #avatarModal .modal-box {
        max-width: 1350px;
        padding: 40px 56px;
    }
    #avatarModal .avatar-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 14px;
    }
    #avatarModal .avatar-option {
        border-width: 4px;
    }
}

/* ---- Buttons ---- */
.btn-gold, .btn-bet, .btn-deal {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--gold), #e6b800);
    color: #1a1a1a;
    box-shadow: 0 3px 12px rgba(255,215,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-gold:hover, .btn-bet:hover, .btn-deal:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.4);
}
.btn-gold:active, .btn-bet:active, .btn-deal:active {
    transform: translateY(0);
}
.btn-deal.deal-breathe {
    animation: deal-breathe 3s ease-in-out infinite;
}
@keyframes deal-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 3px 12px rgba(255,215,0,0.3);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 18px 6px rgba(255,215,0,0.35), 0 3px 12px rgba(255,215,0,0.3);
    }
}
.btn-pass {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    background: #333;
    color: #aaa;
    transition: background 0.2s;
}
.btn-pass:hover { background: #444; color: #ccc; }
.btn-muted {
    padding: 10px 24px;
    font-size: 13px;
    font-family: var(--font);
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    background: #333;
    color: #ccc;
}
.btn-muted:hover { background: #444; }
.btn-quick {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    background: #333;
    color: #ccc;
    transition: background 0.15s;
}
.btn-quick:hover { background: #444; border-color: var(--gold); color: var(--gold); }

/* ---- Game Wrapper ---- */
.htp-game-wrapper {
    max-width: 1050px;
    margin: 0 auto;
    padding: 16px;
}
@media (min-width: 601px) {
    .htp-game-wrapper { margin: 100px auto; }
}

/* ---- Pot Display ---- */
.pot-display {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    z-index: 20;
}
.pot-text {
    white-space: nowrap;
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}
.pot-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-right: 6px;
}
.pot-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}
.cc-unit {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 4px;
}
/* Coin pile */
.pot-chips {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 2px;
    height: 50px;
    width: 120px;
}
.pot-chips img {
    height: 48px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    position: absolute;
}

/* ---- Card Table ---- */
.card-table {
    background: url('media/felt.png') repeat center center, radial-gradient(ellipse at 50% 50%, var(--felt-green), var(--felt-dark));
    border: 10px solid var(--felt-border);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.4), 0 4px 24px rgba(0,0,0,0.5);
    border-radius: 200px / 130px;
    padding: 70px 40px 60px;
    position: relative;
    margin: 0 auto;
    min-height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---- Simulated Players ---- */
.table-player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.tp-top-left { top: 12px; left: 10px; }
.tp-top-right { top: 12px; right: 10px; }
.tp-bottom-left { bottom: -40px; left: 10px; }
.tp-bottom-right { bottom: -40px; right: 10px; }
.tp-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,215,0,0.4);
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
    background: #2a2a2a;
}
#humanAvatar {
    cursor: pointer;
    transition: border-color 0.2s;
}
#humanAvatar:hover {
    border-color: var(--gold);
}
.tp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tp-name {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
}
.tp-balance {
    font-size: 11px;
    color: rgba(255,215,0,0.7);
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.3s, color 0.3s;
}
.tp-balance.pop-win {
    animation: balance-pop 0.5s ease-out;
    color: #2ecc71;
}
.tp-balance.pop-lose {
    animation: balance-pop 0.5s ease-out;
    color: var(--red);
}
@keyframes balance-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Bot bustout animations */
.tp-avatar.bot-fadeout {
    transition: opacity 0.5s ease-out;
    opacity: 0;
}
.tp-avatar.bot-fadein {
    transition: opacity 0.4s ease-in;
    opacity: 1;
}
.tp-balance.bot-bust-text {
    color: var(--red) !important;
    font-weight: bold;
    animation: bust-flash 0.6s ease-out 3;
}
@keyframes bust-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
/* Smoke puff on bust */
.bust-smoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(200,200,200,0.5), transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: none;
}
.bust-smoke.active {
    animation: smoke-puff 1.8s ease-out forwards;
}
@keyframes smoke-puff {
    0%   { opacity: 1; transform: scale(0.5); filter: blur(1px); }
    20%  { opacity: 0.9; transform: scale(2); filter: blur(4px); }
    50%  { opacity: 0.5; transform: scale(3.5); filter: blur(8px); }
    100% { opacity: 0; transform: scale(5); filter: blur(14px); }
}
.bust-puff-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 22px;
    font-weight: bold;
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255,0,0,0.6), 0 2px 4px rgba(0,0,0,0.8);
    opacity: 0;
    pointer-events: none;
    z-index: 11;
    white-space: nowrap;
}
.bust-puff-text.active {
    animation: bust-text-pop 1.8s ease-out forwards;
}
@keyframes bust-text-pop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    30%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    70%  { opacity: 1; transform: translate(-50%, -60%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(0.8); }
}
.bot-sat-down {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #2ecc71;
    white-space: nowrap;
    opacity: 0;
    animation: sat-down-fade 2.5s ease-out forwards;
    z-index: 5;
}
@keyframes sat-down-fade {
    0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Ante chip animation */
.ante-chip {
    width: 20px;
    height: 20px;
    z-index: 30;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* ---- Card Slots ---- */
.card-area {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.card-slot {
    width: var(--card-width);
    perspective: 800px;
    text-align: center;
}
.card-inner {
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-inner.flipped {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--card-radius);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    overflow: hidden;
}
.card-front {
    transform: rotateY(180deg);
    position: relative;
}
.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    border-radius: var(--card-radius);
    object-fit: contain;
    display: block;
}
.card-ghost {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--card-radius);
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
}
.card-ghost.visible {
    animation: ghostPulse 2s ease-in-out infinite;
}
@keyframes ghostPulse {
    0%   { opacity: 0; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}
.card-label {
    display: none;
}

/* Card glow effects */
.card-slot.glow-green .card-inner { box-shadow: 0 0 20px 6px rgba(39,174,96,0.6); border-radius: var(--card-radius); }
.card-slot.glow-red .card-inner { box-shadow: 0 0 20px 6px rgba(192,57,43,0.6); border-radius: var(--card-radius); }
.card-slot.glow-gold .card-inner { box-shadow: 0 0 20px 6px rgba(255,215,0,0.6); border-radius: var(--card-radius); }

/* Card breathe idle animation */
.card-slot.card-breathe .card-inner {
    animation: card-breathe 3s ease-in-out infinite;
}
.card-slot.card-breathe:nth-child(2) .card-inner { animation-delay: 0.4s; }
.card-slot.card-breathe:nth-child(3) .card-inner { animation-delay: 0.8s; }
@keyframes card-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 14px 4px rgba(255,215,0,0.2), 2px 2px 10px rgba(0,0,0,0.5);
    }
}
.card-slot.card-breathe .card-inner.flipped {
    animation: card-breathe-flipped 3s ease-in-out infinite;
}
.card-slot.card-breathe:nth-child(2) .card-inner.flipped { animation-delay: 0.4s; }
.card-slot.card-breathe:nth-child(3) .card-inner.flipped { animation-delay: 0.8s; }
@keyframes card-breathe-flipped {
    0%, 100% {
        transform: rotateY(180deg) scale(1);
        box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    }
    50% {
        transform: rotateY(180deg) scale(1.03);
        box-shadow: 0 0 14px 4px rgba(255,215,0,0.2), 2px 2px 10px rgba(0,0,0,0.5);
    }
}

/* Center card highlight */
.center-card { margin: 0 8px; }

/* Peek animation on pass */
.card-inner.peek {
    opacity: 1;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
}
.card-inner.peek-fade {
    opacity: 0.3;
    transition: opacity 0.6s ease-out;
}
.peek-result {
    font-weight: 700;
    font-size: 14px;
}
.peek-miss { color: var(--green); }
.peek-safe { color: var(--text-muted); }

/* ---- Overlay Texts ---- */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-weight: 900;
    font-size: 56px;
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
}
#hitPostText {
    color: var(--red);
    text-shadow: 0 0 20px rgba(192,57,43,0.8), 0 0 40px rgba(192,57,43,0.4), 2px 2px 0 #000;
}
.overlay-win {
    color: var(--green);
    text-shadow: 0 0 20px rgba(39,174,96,0.8), 2px 2px 0 #000;
}
.overlay-lose {
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231,76,60,0.6), 2px 2px 0 #000;
}
.overlay-triple {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255,215,0,0.8), 2px 2px 0 #000;
}
.overlay-flush {
    color: #00e5ff;
    text-shadow: 0 0 20px rgba(0,229,255,0.8), 0 0 40px rgba(0,229,255,0.4), 2px 2px 0 #000;
}
.overlay-straight {
    color: #ff9800;
    text-shadow: 0 0 20px rgba(255,152,0,0.8), 0 0 40px rgba(255,152,0,0.4), 2px 2px 0 #000;
}
.overlay-straightflush {
    color: #e040fb;
    text-shadow: 0 0 20px rgba(224,64,251,0.8), 0 0 40px rgba(224,64,251,0.4), 2px 2px 0 #000;
}

.overlay-text.active {
    animation: text-slam 1.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes text-slam {
    0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15%  { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    25%  { transform: translate(-50%, -50%) scale(0.95); }
    35%  { transform: translate(-50%, -50%) scale(1.05); }
    45%  { transform: translate(-50%, -50%) scale(1); }
    80%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* ---- Spread Info ---- */
.spread-info {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    z-index: 20;
    text-align: center;
    line-height: 1.5;
}
.bonus-hint {
    color: var(--gold);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    animation: bonus-pulse 1.2s ease-in-out infinite;
}
.bonus-multiplier-text {
    color: #fff;
    text-shadow: 0 0 6px var(--gold);
}
.pair-hint {
    color: var(--gold);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
    animation: pair-glow 0.8s ease-in-out infinite;
}
@keyframes bonus-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); text-shadow: 0 0 12px rgba(255,215,0,0.7), 0 0 24px rgba(255,215,0,0.3); }
}
@keyframes pair-glow {
    0%, 100% { transform: scale(1); text-shadow: 0 0 8px rgba(255,215,0,0.4); }
    50% { transform: scale(1.06); text-shadow: 0 0 20px rgba(255,215,0,0.9), 0 0 40px rgba(255,215,0,0.4); }
}

/* ---- Player HUD ---- */
.player-hud {
    text-align: center;
    margin: 16px 0 8px;
}
.balance-display {
    font-size: 14px;
    color: var(--text-muted);
}
.ante-display {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ---- Hand Progress Bar ---- */
.hand-progress {
    max-width: 420px;
    margin: 0 auto 10px;
}
.hand-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.hand-progress-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.hand-bar-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid #333;
    border-radius: 8px;
    padding: 4px;
    position: relative;
    margin-bottom: 50px;
    overflow: hidden;
}
.hand-bar-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px);
    pointer-events: none;
    mix-blend-mode: overlay;
}
.hand-segments {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 3px;
    position: relative;
    z-index: 1;
}
.hand-seg {
    height: 10px;
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.hand-seg.on {
    background: linear-gradient(90deg, var(--green), #2ecc71);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 0 6px rgba(39,174,96,0.4);
}
.hand-seg.on-warn {
    background: linear-gradient(90deg, #e6a800, var(--gold));
    border-color: rgba(255,215,0,0.3);
    box-shadow: 0 0 6px rgba(255,215,0,0.4);
}
.hand-seg.on-danger {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    border-color: rgba(231,76,60,0.3);
    box-shadow: 0 0 6px rgba(231,76,60,0.4);
}
.hand-seg.on::before, .hand-seg.on-warn::before, .hand-seg.on-danger::before {
    content: "";
    position: absolute;
    inset: -40% -30%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(15deg) translateX(-120%);
    animation: seg-sheen 2.5s linear infinite;
    opacity: 0.5;
}
@keyframes seg-sheen {
    0% { transform: rotate(15deg) translateX(-120%); }
    100% { transform: rotate(15deg) translateX(120%); }
}

/* Session Complete */
.session-complete-box {
    border-color: var(--green);
}
.session-complete-title {
    color: var(--green) !important;
    font-size: 32px !important;
    text-shadow: 0 0 20px rgba(39,174,96,0.5);
}
.session-final-stats {
    margin: 16px auto;
    max-width: 240px;
}
.session-final-stats table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.session-final-stats td {
    padding: 5px 0;
}
.session-final-stats td:first-child {
    color: var(--text-muted);
    text-align: left;
}
.session-final-stats td:last-child {
    color: #fff;
    font-weight: 700;
    text-align: right;
}
.balance-label { margin-right: 4px; }
.balance-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--gold);
    transition: color 0.3s;
}
.balance-amount.flash-green { color: var(--green); }
.balance-amount.flash-red { color: var(--red); }
.lives-display {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.lives-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: #1a1a2e;
    color: #ccc;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    white-space: normal;
    width: 200px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    line-height: 1.4;
}
.lives-display.tooltip-open .lives-tooltip {
    display: block;
}
.lives-icons {
    display: flex;
    gap: 4px;
}
.life-icon {
    width: 32px;
    height: 32px;
    transition: opacity 0.3s, transform 0.3s;
}
.life-icon.used {
    opacity: 0.15;
    filter: grayscale(1);
}
.life-icon.consuming {
    animation: life-consume 0.6s ease-out forwards;
}
@keyframes life-consume {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(0.5); opacity: 0.15; filter: grayscale(1); }
}
/* ---- Betting Controls ---- */
.betting-controls {
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid #333;
}
.bet-slider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}
.bet-label {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
}
#betSlider {
    flex: 1;
    max-width: 240px;
    accent-color: var(--gold);
}
#betInput {
    width: 70px;
    padding: 6px 8px;
    font-size: 14px;
    font-family: var(--font);
    text-align: center;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: var(--gold);
    font-weight: 700;
    outline: none;
}
#betInput:focus { border-color: var(--gold); }
.quick-bet-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ---- Deal Controls ---- */
.deal-controls {
    text-align: center;
    margin: 16px 0;
}

/* ---- Result Message ---- */
.result-message {
    text-align: center;
    min-height: 28px;
    font-size: 15px;
    font-weight: 600;
    margin: 8px 0;
    transition: opacity 0.3s;
}
.result-message.win { color: var(--green); }
.result-message.lose { color: var(--red); }
.result-message.post { color: var(--red); }
.result-message.pass { color: var(--text-muted); }
.result-message.triple {
    color: var(--gold);
    font-size: 17px;
    font-weight: 800;
    animation: result-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes result-bounce {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.15); opacity: 1; }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); opacity: 1; }
}

/* Float-up animation for +/- amounts */
.shower-coin {
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(255,215,0,0.6), inset 0 -2px 3px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    opacity: 0;
}

.float-amount {
    position: fixed;
    font-size: 22px;
    font-weight: 800;
    pointer-events: none;
    z-index: 100;
    animation: float-up 1.2s ease-out forwards;
}
.float-amount.positive { color: var(--green); }
.float-amount.negative { color: var(--red); }
@keyframes float-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-60px); }
}

/* ---- Tab Bar ---- */
.tab-bar {
    display: flex;
    gap: 0;
    margin-top: 24px;
    border-bottom: 2px solid #333;
}
.tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: -2px;
}
.tab-btn:hover { color: #ccc; }
.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ---- Tab Panels ---- */
.tab-panel {
    padding: 16px 0;
}

/* ---- Leaderboard ---- */
.htp-leaderboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.htp-leaderboard caption {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
    caption-side: top;
    text-align: center;
}
.htp-leaderboard th {
    padding: 8px 12px;
    text-align: left;
    color: var(--text-muted);
    border-bottom: 1px solid #333;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.htp-leaderboard td {
    padding: 10px 12px;
    border-bottom: 1px solid #222;
}
.htp-leaderboard tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.htp-leaderboard tr:hover { background: rgba(255,215,0,0.05); }
.htp-leaderboard .rank-1 td:first-child,
.htp-leaderboard .rank-2 td:first-child,
.htp-leaderboard .rank-3 td:first-child {
    font-weight: 700;
}
.htp-leaderboard .rank-1 td { color: var(--gold); }
.htp-leaderboard .rank-2 td { color: #c0c0c0; }
.htp-leaderboard .rank-3 td { color: #cd7f32; }
.leaderboard-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-style: italic;
}

/* ---- Leaderboard Overlay ---- */
.lb-overlay {
    z-index: 1100;
}
.lb-box {
    max-width: 520px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 24px 20px;
}
.lb-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
.lb-close:hover { color: #fff; }
.lb-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 6px;
    border: 1px solid var(--gold);
}
.lb-player-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}
.lb-player-cell:hover {
    color: var(--gold);
}
#viewerProfileModal {
    z-index: 1200;
}
.lb-highlight {
    background: rgba(255,215,0,0.1);
    border-left: 3px solid var(--gold);
}
.lb-highlight td:first-child {
    padding-left: 5px;
}

/* ---- Rules ---- */
.rules-content {
    font-size: 13px;
    line-height: 1.7;
    color: #bbb;
}
.rules-content h3 {
    color: var(--gold);
    margin: 0 0 12px;
}
.rules-content ol { padding-left: 20px; }
.rules-content li { margin-bottom: 8px; }
.rules-content ul { margin: 6px 0; padding-left: 20px; }
.rules-content em { color: var(--text-muted); }

/* ---- Screen shake ---- */
.shake {
    animation: shake 0.4s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) and (min-width: 601px) {
    :root {
        --card-width: 100px;
        --card-height: 140px;
    }
}

@media (max-width: 600px) {
    :root {
        --card-width: 80px;
        --card-height: 112px;
    }

    /* Full-height flex layout — no wasted space */
    .htp-game-wrapper {
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - 60px);
        padding: 8px 10px 12px;
    }

    /* Header */
    .htp-header { padding: 8px 12px 5px; }
    .htp-title { font-size: 20px; letter-spacing: 1.5px; margin: 0; }
    .htp-logo-img { height: 80px; }
    .htp-subtitle { display: none; }
    .header-buttons {
        position: absolute;
        top: 8px;
        right: 8px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        margin-top: 0;
    }

    /* Lives — top-left, smaller on mobile */
    .lives-display { position: absolute; top: 8px; left: 8px; }
    .life-icon { width: 24px; height: 24px; }
    .hdr-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        background: rgba(255,255,255,0.04);
    }

    /* Pot — inside table on mobile */
    .pot-display { padding: 0; top: 4px; }
    .pot-amount { font-size: 20px; }
    .pot-label { font-size: 10px; letter-spacing: 1px; }
    .pot-chips img { height: 30px; }

    /* Card table — fixed vh height so it never changes size */
    .card-table {
        border-radius: 20px;
        padding: 48px 16px 46px;
        border-width: 4px;
        height: calc(90dvh - 340px);
        min-height: 240px;
        flex: none;
        width: 94%;
        margin: 0 auto;
        box-shadow: inset 0 0 30px rgba(0,0,0,0.4), 0 4px 20px rgba(0,0,0,0.5);
    }
    .card-area { gap: 10px; }

    /* Players on table — larger avatars */
    .tp-top-left { top: 6px; left: 8px; }
    .tp-top-right { top: 6px; right: 8px; }
    .tp-bottom-left { bottom: 6px; left: 8px; }
    .tp-bottom-right { bottom: 6px; right: 8px; }
    .tp-avatar { width: 72px; height: 72px; }
    .tp-name { font-size: 13px; opacity: 0.85; }
    .tp-balance { font-size: 12px; }

    /* Spread info — below cards, above bottom players */
    .spread-info {
        top: auto;
        bottom: 42px;
        font-size: clamp(9px, 2.2vw, 12px);
        background: rgba(0,0,0,0.25);
        padding: 2px 8px;
        border-radius: 6px;
        &:empty { display: none; }
        max-width: 75%;
        white-space: normal;
        line-height: 1.3;
    }
    .bonus-hint { font-size: clamp(9px, 2.2vw, 13px); }
    .pair-hint { font-size: clamp(10px, 2.5vw, 15px); }

    .overlay-text { font-size: 26px; }

    /* Balance — compact */
    .player-hud { margin: 10px 0 6px; }
    .balance-amount { font-size: 24px; }
    .balance-display .cc-unit { font-size: 10px; }
    .hand-progress { margin-top: 6px; max-width: 92%; }
    .hand-progress-row { padding: 0 4px; gap: 12px; }
    .hand-progress-label { font-size: 11px; font-weight: 700; color: #fff; }
    .ante-display { font-size: 11px; font-weight: 700; color: #fff; }
    .hand-bar-shell { margin-bottom: 0; }
    .hand-seg { height: 8px; }
    .hand-segments { gap: 2px; }

    /* Betting controls — full width, bigger touch targets */
    .betting-controls {
        width: 94%;
        margin: 8px auto 0;
        padding: 12px 14px;
        box-sizing: border-box;
    }
    .bet-slider-row {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }
    .bet-label { font-size: 13px; }
    #betSlider {
        max-width: 100%;
        order: 2;
        flex-basis: 100%;
        margin-top: 2px;
    }
    #betInput { width: 65px; font-size: 15px; padding: 8px; }

    /* Quick-bet buttons — stretch to fill */
    .quick-bet-row {
        gap: 8px;
        margin-bottom: 12px;
    }
    .btn-quick {
        flex: 1;
        padding: 10px 0;
        font-size: 13px;
        font-weight: 600;
        min-height: 42px;
        border-radius: 8px;
    }

    /* BET / PASS — full width, big touch targets */
    .action-buttons { gap: 10px; }
    .btn-bet {
        flex: 1;
        padding: 14px 0;
        font-size: 17px;
        font-weight: 800;
        min-height: 50px;
        border-radius: 10px;
        letter-spacing: 1px;
    }
    .btn-pass {
        flex: 1;
        padding: 14px 0;
        font-size: 16px;
        font-weight: 700;
        min-height: 50px;
        border-radius: 10px;
        letter-spacing: 1px;
    }

    /* Deal button — match sizing */
    .btn-deal {
        width: 94%;
        padding: 14px 0;
        font-size: 17px;
        min-height: 50px;
        border-radius: 10px;
    }
    .deal-controls { text-align: center; }

    .modal-box { padding: 24px 20px; }
}

@media (max-width: 400px) {
    :root {
        --card-width: 68px;
        --card-height: 95px;
    }
    .card-area { gap: 6px; }
    .overlay-text { font-size: 22px; letter-spacing: 1px; }
    .tp-avatar { width: 38px; height: 38px; }
    .tp-name { font-size: 10px; }
    .tp-balance { font-size: 9px; }
    .balance-amount { font-size: 20px; }
}

/* ---- Badge Toast ---- */
.badge-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e, #2a2a4a);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    box-shadow: 0 0 20px rgba(255,215,0,0.3), 0 4px 16px rgba(0,0,0,0.5);
    max-width: 300px;
}
.badge-toast.toast-in {
    animation: toast-slide-in 0.4s ease-out forwards;
}
.badge-toast.toast-out {
    animation: toast-slide-out 0.4s ease-in forwards;
}
@keyframes toast-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(120%); opacity: 0; }
}
.badge-toast-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
}
.badge-toast-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    font-weight: 700;
}
.badge-toast-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.badge-toast-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Player Profile Modal ---- */
.profile-box {
    max-width: 700px;
}
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.profile-stats {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}
.profile-stats table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.profile-stats td {
    padding: 4px 0;
}
.profile-stats td:first-child {
    color: var(--text-muted);
    text-align: left;
}
.profile-stats td:last-child {
    color: #fff;
    font-weight: 600;
    text-align: right;
}
.profile-stats .pin-reveal {
    margin-top: 10px;
}

/* Badge Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 12px;
    max-height: 750px;
    overflow-y: auto;
}
.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: default;
    transition: background 0.2s;
}
.badge-item:hover {
    background: rgba(255,255,255,0.05);
}
.badge-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
}
.badge-item.locked img {
    filter: grayscale(1) brightness(0.3);
}
.badge-item.locked .badge-name {
    color: #555;
}
.badge-name {
    font-size: 12px;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.2;
}
.badge-item.earned .badge-name {
    color: var(--gold);
}

/* Badge tooltip (tap/click popup) */
.badge-tooltip {
    position: absolute;
    background: #1a1a2e;
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 1100;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    max-width: 200px;
    text-align: center;
}
.badge-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.badge-tooltip-name {
    font-weight: bold;
    color: var(--gold);
    font-size: 12px;
    margin-bottom: 2px;
}
.badge-tooltip-desc {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.3;
}

/* ---- Bot Profile Modal ---- */
.bot-profile-box {
    max-width: 360px;
}
.bot-bio {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin: 12px 0 20px;
    line-height: 1.5;
}
.bot-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bot-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bot-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}
.bot-stat-bar {
    flex: 1;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}
.bot-stat-fill {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.6s ease-out;
}
.bot-stat-fill.aggression {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    box-shadow: 0 0 6px rgba(231,76,60,0.4);
}
.bot-stat-fill.luck {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    box-shadow: 0 0 6px rgba(46,204,113,0.4);
}
.bot-stat-fill.skill {
    background: linear-gradient(90deg, #2980b9, #3498db);
    box-shadow: 0 0 6px rgba(52,152,219,0.4);
}

/* Mobile adjustments for badge/profile */
@media (max-width: 600px) {
    .badge-toast { top: 10px; right: 10px; max-width: 260px; padding: 10px 12px; }
    .badge-toast-icon { width: 36px; height: 36px; }
    .badge-toast-name { font-size: 14px; }
    .badge-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 400px; }
    .badge-item img { width: 56px; height: 56px; }
    .badge-name { font-size: 10px; }
    .profile-avatar { width: 64px; height: 64px; }
}
