/* ============================================================
   Teen Patti 3 - Casino Classic Theme
   Green felt table, gold trim, wood border, card animations
   ============================================================ */

:root {
    --tp3-felt-1: #1e7a46;
    --tp3-felt-2: #14532d;
    --tp3-felt-3: #0b3d20;
    --tp3-gold: #d4af37;
    --tp3-gold-light: #f3d27a;
    --tp3-gold-dark: #9c7c1e;
    --tp3-wood-1: #5d4037;
    --tp3-wood-2: #3e2723;
    --tp3-red: #c0392b;
    --tp3-black: #1a1a2e;
    --tp3-cream: #fdf6e3;
    --tp3-text: #f5f0e1;
    --tp3-muted: #b8c4b0;
    --tp3-danger: #e74c3c;
    --tp3-success: #2ecc71;
}

.tp3-app {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(ellipse at 50% 0%, #2c3e50 0%, #1a252f 70%, #0f1519 100%);
    border-radius: 18px;
    overflow: hidden;
    color: var(--tp3-text);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    user-select: none;
    -webkit-user-select: none;
}

.tp3-app * { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Boot screen ---------- */
.tp3-boot {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.tp3-boot-logo {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold), var(--tp3-gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 12px rgba(212,175,55,.25);
}
.tp3-boot-suit { -webkit-text-fill-color: initial; }
.tp3-boot-suit.red { color: var(--tp3-red); }
.tp3-boot-suit.black { color: #cfd8dc; }
.tp3-boot-msg { color: var(--tp3-muted); animation: tp3-pulse 1.4s infinite; }

@keyframes tp3-pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* ---------- Top bar ---------- */
.tp3-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;          /* v1.5.2: never wrap to a 2nd line */
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.15));
    border-bottom: 2px solid var(--tp3-gold-dark);
}
.tp3-topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
}
.tp3-brand {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--tp3-gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.tp3-brand .tp3-mini-card {
    width: 26px; height: 36px;
    border-radius: 4px;
    background: linear-gradient(135deg, #fff, #e8e0c8);
    color: var(--tp3-red);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    transform: rotate(-8deg);
}
.tp3-tb-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.tp3-tb-label {
    /* On narrow screens this label is hidden so only the icon shows - keeps
       the whole topbar on ONE horizontal line. */
    display: inline;
}
.tp3-balance-chip {
    background: linear-gradient(180deg, #2a3b2f, #1c2a20);
    border: 1px solid var(--tp3-gold);
    border-radius: 999px;
    padding: 7px 16px;
    display: flex; align-items: center; gap: 8px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.35);
}
.tp3-coin-ico {
    width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--tp3-gold) 60%, var(--tp3-gold-dark));
    box-shadow: 0 1px 3px rgba(0,0,0,.5);
    display: inline-block;
}
.tp3-login-btn {
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold));
    color: #2c2404;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    padding: 9px 22px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(212,175,55,.35);
}

/* ---------- Generic buttons ---------- */
.tp3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: .4px;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s;
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
    font-family: inherit;
}
.tp3-btn:active { transform: translateY(2px) scale(.98); }
.tp3-btn:disabled { opacity: .45; cursor: not-allowed; }
.tp3-btn-gold {
    background: linear-gradient(180deg, #f7dd8b, var(--tp3-gold) 55%, var(--tp3-gold-dark));
    color: #33290a;
    text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.tp3-btn-green {
    background: linear-gradient(180deg, #34d27b, #1e9e54 60%, #136f3a);
    color: #06220f;
}
.tp3-btn-red {
    background: linear-gradient(180deg, #ef6a5a, var(--tp3-red) 60%, #8f2318);
    color: #fff;
}
.tp3-btn-ghost {
    background: rgba(255,255,255,.08);
    color: var(--tp3-text);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: none;
}
.tp3-btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 9px; }
.tp3-btn-block { width: 100%; }

/* ---------- Views ---------- */
.tp3-view { padding: 18px; }

/* ---------- Lobby ---------- */
.tp3-lobby-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto;
}
@media (max-width: 820px) { .tp3-lobby-grid { grid-template-columns: 1fr; } }

.tp3-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
    border: 1px solid rgba(212,175,55,.35);
    border-radius: 16px;
    padding: 18px;
    backdrop-filter: blur(4px);
}
.tp3-panel h3 {
    color: var(--tp3-gold-light);
    margin-bottom: 14px;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}
.tp3-table-list { display: flex; flex-direction: column; gap: 10px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.tp3-table-list::-webkit-scrollbar { width: 6px; }
.tp3-table-list::-webkit-scrollbar-thumb { background: rgba(212,175,55,.4); border-radius: 3px; }

.tp3-lobby-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(20,83,45,.55), rgba(11,61,32,.65));
    border: 1px solid rgba(212,175,55,.25);
    border-radius: 12px;
    padding: 12px 14px;
}
.tp3-lobby-row .tp3-tname { font-weight: 700; font-size: 15px; }
.tp3-lobby-row .tp3-tmeta { color: var(--tp3-muted); font-size: 12px; margin-top: 2px; }
.tp3-lobby-row .tp3-tcode {
    background: rgba(212,175,55,.15);
    color: var(--tp3-gold-light);
    border: 1px dashed rgba(212,175,55,.5);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}
.tp3-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--tp3-success);
    box-shadow: 0 0 8px var(--tp3-success);
    animation: tp3-pulse 1.2s infinite;
    display: inline-block;
    margin-right: 6px;
}
.tp3-live-dot.wait { background: var(--tp3-gold-light); box-shadow: 0 0 8px var(--tp3-gold-light); }
.tp3-pot-badge {
    color: var(--tp3-gold-light);
    font-weight: 800;
    display: flex; align-items: center; gap: 5px;
    font-size: 14px;
}
.tp3-lobby-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

.tp3-create-form { display: flex; flex-direction: column; gap: 12px; }
.tp3-field label { display: block; font-size: 12px; color: var(--tp3-muted); margin-bottom: 5px; letter-spacing: .5px; }
.tp3-field input, .tp3-field select {
    width: 100%;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(212,175,55,.35);
    color: var(--tp3-text);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.tp3-field input:focus, .tp3-field select:focus { border-color: var(--tp3-gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }

.tp3-empty {
    text-align: center;
    color: var(--tp3-muted);
    padding: 26px 10px;
    font-size: 14px;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 12px;
}

/* ---------- Waiting room ---------- */
.tp3-room {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.tp3-room h2 { color: var(--tp3-gold-light); margin-bottom: 6px; letter-spacing: 1px; }
.tp3-room-sub { color: var(--tp3-muted); font-size: 13px; margin-bottom: 22px; }
.tp3-room-seats {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 22px 0;
}
.tp3-seat {
    width: 132px;
    background: linear-gradient(180deg, rgba(20,83,45,.6), rgba(11,61,32,.7));
    border: 1px solid rgba(212,175,55,.35);
    border-radius: 14px;
    padding: 16px 10px;
    position: relative;
}
.tp3-seat .tp3-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    margin: 0 auto 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 22px; color: #fff;
    border: 2px solid var(--tp3-gold);
    overflow: hidden;
}
.tp3-seat .tp3-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tp3-seat .tp3-pname { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp3-seat .tp3-host-crown {
    position: absolute; top: -10px; right: -6px;
    font-size: 20px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.tp3-seat.tp3-empty-seat {
    border-style: dashed;
    opacity: .5;
    display: flex; align-items: center; justify-content: center;
    color: var(--tp3-muted);
    font-size: 26px;
}
.tp3-room-rules {
    text-align: left;
    background: rgba(0,0,0,.25);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 13px;
    color: var(--tp3-muted);
    line-height: 1.9;
    margin: 18px 0;
    border: 1px solid rgba(255,255,255,.08);
}
.tp3-room-rules b { color: var(--tp3-gold-light); }

/* ---------- Game table ---------- */
.tp3-game-wrap { max-width: 900px; margin: 0 auto; }

.tp3-opponents {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tp3-opp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
    min-width: 108px;
    position: relative;
    transition: all .3s;
}
.tp3-opp .tp3-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 17px; color: #fff;
    border: 2px solid rgba(212,175,55,.6);
}
.tp3-opp .tp3-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tp3-opp .tp3-pname { font-size: 12px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp3-opp .tp3-card-backs { display: flex; gap: 3px; }
.tp3-opp.tp3-active {
    border-color: var(--tp3-gold);
    box-shadow: 0 0 22px rgba(212,175,55,.4), inset 0 0 14px rgba(212,175,55,.12);
    transform: translateY(-3px);
}
.tp3-opp.tp3-away { opacity: .55; }
.tp3-away-tag {
    font-size: 10px;
    background: var(--tp3-danger);
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* Turn timer ring */
.tp3-turn-ring { position: relative; width: 34px; height: 34px; }
.tp3-turn-ring svg { transform: rotate(-90deg); }
.tp3-turn-ring circle { fill: none; stroke-width: 4; }
.tp3-turn-ring .tp3-ring-bg { stroke: rgba(255,255,255,.15); }
.tp3-turn-ring .tp3-ring-fg {
    stroke: var(--tp3-gold);
    stroke-linecap: round;
    transition: stroke-dashoffset .25s linear, stroke .3s;
}
.tp3-turn-ring .tp3-ring-txt {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; color: var(--tp3-gold-light);
}
.tp3-turn-ring.danger .tp3-ring-fg { stroke: var(--tp3-danger); }
.tp3-turn-ring.danger .tp3-ring-txt { color: var(--tp3-danger); }

/* The felt table */
.tp3-felt {
    position: relative;
    margin: 14px 0;
    padding: 26px 20px 22px;
    border-radius: 46% 46% 44% 44% / 34% 34% 46% 46%;
    background:
        radial-gradient(ellipse at 50% 38%, var(--tp3-felt-1) 0%, var(--tp3-felt-2) 58%, var(--tp3-felt-3) 100%);
    border: 10px solid transparent;
    background-clip: padding-box;
    box-shadow:
        inset 0 0 60px rgba(0,0,0,.45),
        inset 0 0 8px 6px rgba(212,175,55,.28),
        0 18px 40px rgba(0,0,0,.45);
}
.tp3-felt::before {
    content: '';
    position: absolute; inset: -10px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--tp3-wood-1), var(--tp3-wood-2) 40%, #6d4c41 70%, var(--tp3-wood-2));
    z-index: -1;
    box-shadow: inset 0 0 12px rgba(0,0,0,.6), 0 4px 0 rgba(0,0,0,.3);
}
.tp3-felt::after {
    content: '3 PATTI';
    position: absolute;
    left: 50%; top: 55%;
    transform: translate(-50%, -50%);
    font-size: clamp(26px, 6vw, 44px);
    font-weight: 900;
    letter-spacing: 12px;
    color: rgba(255,255,255,.05);
    pointer-events: none;
    white-space: nowrap;
}

.tp3-table-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    min-height: 150px;
    flex-wrap: wrap;
}

/* Deck pile */
.tp3-pile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
    cursor: pointer;
    border-radius: 14px;
    padding: 8px;
    transition: all .2s;
}
.tp3-pile-label { font-size: 11px; color: var(--tp3-muted); letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.tp3-pile .tp3-fee-tag {
    font-size: 11px;
    font-weight: 800;
    color: #2c2404;
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold));
    border-radius: 999px;
    padding: 3px 10px;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.tp3-pile .tp3-free-tag {
    font-size: 11px; font-weight: 800;
    color: #06220f;
    background: linear-gradient(180deg, #58e296, var(--tp3-success));
    border-radius: 999px;
    padding: 3px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.tp3-pile.tp3-can-pick {
    animation: tp3-glow 1.6s infinite;
}
@keyframes tp3-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.0); }
    50% { box-shadow: 0 0 24px 4px rgba(212,175,55,.55); }
}

.tp3-deck-stack { position: relative; width: 74px; height: 104px; }
.tp3-deck-stack .tp3-card-back {
    position: absolute; left: 0; top: 0;
}
.tp3-deck-stack .tp3-card-back:nth-child(1) { transform: translate(4px, 4px); }
.tp3-deck-stack .tp3-card-back:nth-child(2) { transform: translate(2px, 2px); }

.tp3-pile.tp3-disabled { opacity: .45; cursor: not-allowed; }
.tp3-deck-count {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--tp3-black);
    border: 1px solid var(--tp3-gold);
    color: var(--tp3-gold-light);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    z-index: 3;
}

/* Pot */
.tp3-pot-box {
    text-align: center;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(212,175,55,.5);
    border-radius: 14px;
    padding: 10px 22px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,.4);
}
.tp3-pot-box .tp3-pot-label { font-size: 11px; letter-spacing: 2px; color: var(--tp3-muted); text-transform: uppercase; }
.tp3-pot-box .tp3-pot-value {
    font-size: 26px; font-weight: 900;
    color: var(--tp3-gold-light);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-shadow: 0 2px 10px rgba(212,175,55,.35);
}
.tp3-pot-box .tp3-pot-value.bump { animation: tp3-bump .45s ease; }
@keyframes tp3-bump { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* v1.4.0: VIP chaal chip - current stake pot box ke niche dikhta hai */
.tp3-stake-chip {
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1c1305;
    background: linear-gradient(135deg, #f3d27a, #d4af37);
    border-radius: 999px;
    padding: 2px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.tp3-stake-chip b { font-size: 13px; }

.tp3-pot-chips { display: flex; justify-content: center; margin-top: 5px; }
.tp3-chip {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,.85);
    box-shadow: 0 2px 5px rgba(0,0,0,.5);
    margin-left: -7px;
}
.tp3-chip:first-child { margin-left: 0; }
.tp3-chip.c1 { background: #c0392b; }
.tp3-chip.c2 { background: #2471a3; }
.tp3-chip.c3 { background: #1e8449; }
.tp3-chip.c4 { background: #7d3c98; }

/* Turn banner */
.tp3-turn-banner {
    text-align: center;
    margin: 8px 0 2px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    min-height: 24px;
    color: var(--tp3-gold-light);
}
.tp3-turn-banner.me { color: var(--tp3-success); animation: tp3-pulse 1.5s infinite; }

/* ---------- Cards ---------- */
.tp3-card {
    width: 74px;
    height: 104px;
    border-radius: 9px;
    background: linear-gradient(160deg, #ffffff 0%, #f4ecd8 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08);
    position: relative;
    flex-shrink: 0;
    font-family: Georgia, 'Times New Roman', serif;
}
.tp3-card .tp3-c-corner {
    position: absolute;
    top: 5px; left: 6px;
    line-height: 1;
    text-align: center;
    font-weight: 900;
    font-size: 15px;
}
.tp3-c-corner small { display: block; font-size: 13px; margin-top: 1px; }
.tp3-c-corner.br { top: auto; left: auto; right: 6px; bottom: 5px; transform: rotate(180deg); }
.tp3-card .tp3-c-suit-big {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 38px;
    opacity: .92;
}
.tp3-card.red { color: var(--tp3-red); }
.tp3-card.black { color: var(--tp3-black); }

.tp3-card-back {
    width: 74px;
    height: 104px;
    border-radius: 9px;
    background:
        repeating-linear-gradient(45deg, rgba(212,175,55,.22) 0 6px, transparent 6px 12px),
        linear-gradient(160deg, #8e2430 0%, #5d1520 60%, #430e17 100%);
    border: 3px solid var(--tp3-cream);
    outline: 1px solid rgba(0,0,0,.35);
    box-shadow: 0 4px 12px rgba(0,0,0,.45);
    position: relative;
    flex-shrink: 0;
}
.tp3-card-back::after {
    content: '\2665';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: rgba(243,210,122,.8);
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* My hand */
.tp3-my-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.tp3-my-cards { display: flex; gap: 12px; }
.tp3-my-cards .tp3-card {
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.tp3-my-cards .tp3-card:hover { transform: translateY(-8px); }
.tp3-my-cards .tp3-card.tp3-selectable {
    box-shadow: 0 4px 12px rgba(0,0,0,.45), 0 0 0 3px rgba(212,175,55,.75), 0 0 22px rgba(212,175,55,.5);
    animation: tp3-card-wiggle 1.4s infinite;
}
@keyframes tp3-card-wiggle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.tp3-my-cards .tp3-card.tp3-new { animation: tp3-card-in .5s ease; }
@keyframes tp3-card-in {
    from { transform: translateY(-40px) scale(.6); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.tp3-my-cards .tp3-card.tp3-dim { filter: brightness(.6); }

.tp3-hand-hint {
    font-size: 13px;
    color: var(--tp3-gold-light);
    background: rgba(212,175,55,.12);
    border: 1px solid rgba(212,175,55,.35);
    border-radius: 999px;
    padding: 4px 14px;
    font-weight: 700;
    letter-spacing: .5px;
}

.tp3-action-hint {
    font-size: 13px;
    color: var(--tp3-text);
    background: rgba(0,0,0,.35);
    border-radius: 999px;
    padding: 6px 16px;
    animation: tp3-pulse 1.6s infinite;
}

/* ---------- Showdown reveal ---------- */
.tp3-reveal-hand {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    justify-content: center;
}
.tp3-reveal-hand .tp3-card { width: 44px; height: 62px; border-radius: 6px; }
.tp3-reveal-hand .tp3-card .tp3-c-corner { font-size: 10px; top: 3px; left: 4px; }
.tp3-reveal-hand .tp3-card .tp3-c-corner small { font-size: 9px; }
.tp3-reveal-hand .tp3-card .tp3-c-suit-big { font-size: 21px; }
.tp3-reveal-hand .tp3-card .tp3-c-corner.br { right: 4px; bottom: 3px; }

.tp3-flip { perspective: 700px; }
.tp3-flip .tp3-flip-inner {
    transition: transform .6s cubic-bezier(.4,.2,.2,1);
    transform-style: preserve-3d;
    position: relative;
}
.tp3-flip.tp3-flipped .tp3-flip-inner { transform: rotateY(360deg); }

.tp3-hand-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--tp3-gold-light);
    background: rgba(0,0,0,.4);
    border-radius: 999px;
    padding: 2px 9px;
    margin-top: 5px;
}

/* ---------- Winner banner (v1.2.1: inline banner, NO opaque overlay -
   purana fullscreen overlay sab revealed cards ko cover kar leta tha) ---------- */
.tp3-result-trophy { font-size: 44px; filter: drop-shadow(0 6px 14px rgba(212,175,55,.5)); animation: tp3-trophy 1.6s infinite; }
@keyframes tp3-trophy {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
.tp3-result-title { font-size: 22px; font-weight: 900; color: var(--tp3-gold-light); margin: 4px 0 2px; letter-spacing: 1px; line-height: 1.25; }
.tp3-result-hand { color: var(--tp3-muted); font-size: 13px; margin-bottom: 6px; }
.tp3-result-pot {
    font-size: 18px;
    font-weight: 900;
    color: var(--tp3-gold-light);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.tp3-result-pot small { font-weight: 600; }
.tp3-result-cards { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }

.tp3-confetti {
    position: absolute;
    width: 9px; height: 16px;
    top: -20px;
    z-index: 51;
    opacity: .9;
    animation: tp3-conf-fall linear forwards;
}
@keyframes tp3-conf-fall {
    to { transform: translateY(110vh) rotate(720deg); opacity: .2; }
}

/* ---------- Toasts ----------
   v1.3.0: z-index fullscreen app se upar (pehle 99999 tha -> mobile pe
   fullscreen game ke piche chhup jaate the). */
.tp3-toasts {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483640;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: max-content;
    max-width: 92vw;
}
.tp3-toast {
    background: rgba(20,25,30,.95);
    color: #fff;
    border-radius: 12px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 26px rgba(0,0,0,.45);
    border-left: 4px solid var(--tp3-gold);
    animation: tp3-toast-in .3s ease;
    max-width: 92vw;
}
.tp3-toast.err { border-left-color: var(--tp3-danger); }
.tp3-toast.ok { border-left-color: var(--tp3-success); }
@keyframes tp3-toast-in {
    from { transform: translateY(-14px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Coin float animation */
.tp3-coin-float {
    position: fixed;
    z-index: 2147483630;
    font-weight: 900;
    font-size: 18px;
    color: var(--tp3-danger);
    text-shadow: 0 2px 6px rgba(0,0,0,.6);
    pointer-events: none;
    animation: tp3-coin-float 1.1s ease forwards;
}
.tp3-coin-float.gain { color: var(--tp3-success); }
@keyframes tp3-coin-float {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-70px); opacity: 0; }
}

/* ---------- History panel ---------- */
.tp3-history-list { display: flex; flex-direction: column; gap: 8px; }
.tp3-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,.25);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
}
.tp3-history-row .tp3-h-badge {
    min-width: 48px;
    text-align: center;
    font-weight: 900;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    letter-spacing: 1px;
}
.tp3-h-badge.won { background: rgba(46,204,113,.2); color: var(--tp3-success); border: 1px solid var(--tp3-success); }
.tp3-h-badge.lost { background: rgba(231,76,60,.15); color: #f1948a; border: 1px solid var(--tp3-danger); }
.tp3-history-row .tp3-h-meta { color: var(--tp3-muted); font-size: 12px; }

/* ---------- Waiting overlay in game ---------- */
.tp3-waiting-strip {
    text-align: center;
    padding: 10px;
    color: var(--tp3-muted);
    font-size: 14px;
}

/* ============================================================
   v1.2.0 - Streak bonus / Side show / Chat / Sounds
   ============================================================ */

/* ---------- Streak bonus (lobby) ---------- */
.tp3-streak-box {
    margin-top: 12px;
    padding: 12px;
    background: rgba(212, 175, 55, .07);
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 12px;
}
.tp3-streak-head {
    font-weight: 800;
    font-size: 14px;
    color: var(--tp3-gold-light);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.tp3-streak-head span {
    font-size: 11px;
    font-weight: 700;
    color: var(--tp3-muted);
    background: rgba(0, 0, 0, .25);
    border-radius: 20px;
    padding: 3px 9px;
}
.tp3-streak-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.tp3-streak-chip {
    flex: 1;
    min-width: 40px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--tp3-muted);
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    padding: 6px 2px;
}
.tp3-streak-chip small {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: .75;
    margin-bottom: 2px;
}
.tp3-streak-chip.next {
    color: #10241a;
    background: linear-gradient(180deg, var(--tp3-success), #1f9d55);
    border-color: var(--tp3-success);
    box-shadow: 0 0 12px rgba(46, 204, 113, .35);
    animation: tp3-pulse 1.4s infinite;
}
.tp3-streak-chip.done {
    color: var(--tp3-gold-light);
    border-color: rgba(212, 175, 55, .4);
    opacity: .8;
}

/* ---------- Side show ---------- */
.tp3-ss-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 10px;
    max-width: 560px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, .16), rgba(212, 175, 55, .06));
    border: 1px solid var(--tp3-gold);
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(212, 175, 55, .25);
    animation: tp3-pulse 1.6s infinite;
}
.tp3-ss-banner .tp3-ss-txt {
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}
.tp3-ss-banner .tp3-ss-txt small {
    display: block;
    color: var(--tp3-muted);
    font-size: 11px;
}
.tp3-ss-result {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .12);
}
.tp3-ss-result.ok {
    color: var(--tp3-success);
    border-color: var(--tp3-success);
    background: rgba(46, 204, 113, .12);
}
.tp3-ss-result.bad {
    color: #f1948a;
    border-color: var(--tp3-danger);
    background: rgba(231, 76, 60, .12);
}
.tp3-my-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ---------- Modal (side show target picker / raise picker / avatar picker) ----------
   v1.3.0 Z-INDEX FIX: modal fullscreen app (z 2147483000) ke UPAR hona chahiye
   - pehle 99990 tha, isliye mobile pe Side Show modal app ke PEECHHE khul
   raha tha aur "button kaam nahi kar raha" lagta tha. */
.tp3-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483600;
    padding: 16px;
}
.tp3-modal-box {
    background: linear-gradient(180deg, #22303c, #18242e);
    border: 1px solid var(--tp3-gold);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
.tp3-modal-box h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--tp3-gold-light);
}
.tp3-modal-box .tp3-modal-sub {
    font-size: 12px;
    color: var(--tp3-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}
.tp3-modal-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

/* ---------- Chat bar (v1.3.0 compact - log box removed, live bubbles only).
   Touch targets >= 36px taaki mobile pe emoji buttons easily hit ho sakein. */
.tp3-chatbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px auto 0;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.tp3-chat-emo {
    width: 42px;
    height: 38px;
    font-size: 21px;
    line-height: 1;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    cursor: pointer;
    transition: transform .12s, background .12s;
    padding: 0;
    flex-shrink: 0;
}
.tp3-chat-emo:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px) scale(1.08); }
.tp3-chat-emo:active { transform: scale(.92); }
.tp3-chat-toggle {
    height: 38px;
    min-width: 42px;
    font-size: 17px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    color: var(--tp3-text);
    cursor: pointer;
    padding: 0 10px;
    flex-shrink: 0;
}
.tp3-chat-toggle:hover { background: rgba(255, 255, 255, .16); }
.tp3-chat-more-panel {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px auto 0;
    max-width: 560px;
    flex-shrink: 0;
}
.tp3-chat-msg-btn {
    font-size: 14px;
    font-weight: 700;
    color: var(--tp3-text);
    background: rgba(212, 175, 55, .12);
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background .12s, transform .12s;
}
.tp3-chat-msg-btn:hover { background: rgba(212, 175, 55, .25); transform: translateY(-1px); }

/* ---------- Chat bubbles (v1.3.0: anchored above sender's seat).
   Position JS se aati hai (seat ke avatar ke upar, centered + clamped).
   Transform sirf centering ke liye; animation margin-top use karta hai
   taaki translate se conflict na ho. */
.tp3-bubbles {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 30px;
    pointer-events: none;
    z-index: 40;
    overflow: visible;
}
.tp3-bubble {
    position: absolute;
    max-width: 220px;
    background: rgba(16, 24, 32, .94);
    border: 1px solid var(--tp3-gold);
    color: var(--tp3-text);
    font-size: 13px;
    line-height: 1.4;
    border-radius: 14px;
    padding: 8px 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    transform: translate(-50%, -100%);
    animation: tp3-bubble-in .3s ease-out;
}
.tp3-bubble b { color: var(--tp3-gold-light); margin-right: 4px; }
.tp3-bubble.emo { font-size: 30px; text-align: center; border-radius: 18px; padding: 8px 14px; }
.tp3-bubble.out { opacity: 0; transition: opacity .5s; }
@keyframes tp3-bubble-in {
    from { margin-top: 14px; opacity: 0; }
    to   { margin-top: 0; opacity: 1; }
}


/* ---------- v1.3.0: Lobby tabs / badges / profile / history ---------- */
.tp3-lobby-tabs {
    display: flex;
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto 14px;
}
.tp3-tab {
    flex: 1;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--tp3-muted);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.tp3-tab.on {
    color: #2c2404;
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold));
    border-color: var(--tp3-gold);
    box-shadow: 0 4px 14px rgba(212, 175, 55, .35);
}

.tp3-mode-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 6px;
    padding: 2px 7px;
    vertical-align: middle;
    background: rgba(255, 255, 255, .12);
    color: var(--tp3-muted);
    border: 1px solid rgba(255, 255, 255, .2);
}
.tp3-mode-badge.vip {
    color: #2c2404;
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold));
    border-color: var(--tp3-gold-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}

.tp3-bot-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
    border-radius: 5px;
    padding: 1px 5px;
    vertical-align: middle;
    color: #06220f;
    background: linear-gradient(180deg, #58e296, var(--tp3-success));
}
.tp3-away-tag.packed {
    background: #b9770e;
    color: #fff;
}

/* Emoji avatars (boys/girls pool) */
.tp3-av-e {
    font-size: 26px;
    line-height: 1;
}
.tp3-av-big {
    width: 64px !important;
    height: 64px !important;
    cursor: pointer;
    font-size: inherit;
    border: 2px solid var(--tp3-gold);
    transition: transform .15s, box-shadow .15s;
}
.tp3-av-big:hover { transform: scale(1.06); box-shadow: 0 0 18px rgba(212, 175, 55, .5); }
.tp3-av-big .tp3-av-e { font-size: 36px; }
.tp3-profile-box .tp3-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tp3-profile-note { color: var(--tp3-muted); font-size: 13px; }
.tp3-av-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tp3-muted);
    margin: 10px 0 6px;
    text-align: left;
}
.tp3-av-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}
.tp3-av-pick {
    font-size: 30px;
    line-height: 1;
    padding: 8px 0;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    cursor: pointer;
    transition: all .12s;
}
.tp3-av-pick:hover { background: rgba(212, 175, 55, .2); border-color: var(--tp3-gold); transform: scale(1.1); }

/* History summary */
.tp3-hist-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tp3-hist-stat {
    flex: 1;
    min-width: 80px;
    text-align: center;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 12px 8px;
}
.tp3-hist-stat b { display: block; font-size: 22px; font-weight: 900; color: var(--tp3-gold-light); }
.tp3-hist-stat b.pos { color: var(--tp3-success); }
.tp3-hist-stat b.neg { color: #f1948a; }
.tp3-hist-stat small { font-size: 11px; color: var(--tp3-muted); letter-spacing: .5px; }
.tp3-history-row { align-items: center; }
.tp3-h-main { flex: 1; min-width: 0; font-size: 13px; }
.tp3-h-net { text-align: right; }
.tp3-h-net small { display: block; color: var(--tp3-muted); font-size: 11px; }
.tp3-h-net b { font-size: 15px; }
.tp3-h-net b.pos { color: var(--tp3-success); }
.tp3-h-net b.neg { color: #f1948a; }

.tp3-vip-hint {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #2c2404;
    background: linear-gradient(180deg, var(--tp3-gold-light), var(--tp3-gold));
    border-radius: 6px;
    padding: 1px 7px;
}
.tp3-bots-note {
    text-align: center;
    font-size: 12px;
    color: var(--tp3-muted);
    background: rgba(46, 204, 113, .08);
    border: 1px dashed rgba(46, 204, 113, .4);
    border-radius: 10px;
    padding: 7px 10px;
    margin: 8px auto 0;
    max-width: 560px;
}
.tp3-vip-note {
    font-size: 12px;
    color: var(--tp3-gold-light);
    background: rgba(212, 175, 55, .1);
    border: 1px solid rgba(212, 175, 55, .4);
    border-radius: 10px;
    padding: 9px 11px;
    line-height: 1.6;
}

/* ============================================================
   v1.3.0 - FULLSCREEN GAME FIT (DESKTOP + MOBILE)
   Game/showdown screen AB SAB devices pe poore screen par fit:
   pehle sirf <=820px pe tha, isliye desktop pe page scroll hota tha.
   Ab .tp3-fs rules global hain - niche wala media query sirf AUR
   compact mobile sizes deta hai.
   ============================================================ */
body.tp3-fs-body { overflow: hidden !important; }

.tp3-app.tp3-fs {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: manipulation;
}
.tp3-app.tp3-fs .tp3-topbar { flex-shrink: 0; padding: 9px 16px; }
.tp3-app.tp3-fs .tp3-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}
.tp3-app.tp3-fs .tp3-game-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

/* Desktop fullscreen sizes (slightly compact but comfortable) */
.tp3-app.tp3-fs .tp3-opponents { gap: 10px; margin-bottom: 4px; flex-wrap: wrap; justify-content: center; }
.tp3-app.tp3-fs .tp3-opp { min-width: 0; padding: 7px 10px; gap: 4px; }
.tp3-app.tp3-fs .tp3-opp .tp3-avatar { width: 40px; height: 40px; font-size: 16px; }
.tp3-app.tp3-fs .tp3-opp .tp3-av-e { font-size: 24px; }
.tp3-app.tp3-fs .tp3-opp .tp3-pname { font-size: 11px; max-width: 96px; }
.tp3-app.tp3-fs .tp3-opp .tp3-card-backs .tp3-card-back { width: 26px; height: 37px; border-width: 2px; }
.tp3-app.tp3-fs .tp3-opp .tp3-card-backs .tp3-card-back::after { font-size: 14px; }
.tp3-app.tp3-fs .tp3-opp .tp3-card-backs { gap: 3px; }

.tp3-app.tp3-fs .tp3-felt { margin: 8px 0; padding: 16px 12px 14px; border-width: 8px; border-radius: 34px; }
.tp3-app.tp3-fs .tp3-felt::after { font-size: 34px; letter-spacing: 9px; }
.tp3-app.tp3-fs .tp3-table-center { gap: 22px; min-height: 0; flex-wrap: nowrap; }
.tp3-app.tp3-fs .tp3-pile { padding: 5px; gap: 4px; }
.tp3-app.tp3-fs .tp3-pile .tp3-card,
.tp3-app.tp3-fs .tp3-pile .tp3-card-back { width: 56px; height: 79px; }
.tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-suit-big { font-size: 26px; }
.tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-corner { font-size: 11px; }
.tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-corner small { font-size: 10px; }
.tp3-app.tp3-fs .tp3-deck-stack { width: 56px; height: 79px; }
.tp3-app.tp3-fs .tp3-deck-count { font-size: 10px; padding: 2px 7px; top: -6px; right: -6px; }
.tp3-app.tp3-fs .tp3-pile-label { font-size: 10px; letter-spacing: .5px; }
.tp3-app.tp3-fs .tp3-pile .tp3-fee-tag,
.tp3-app.tp3-fs .tp3-pile .tp3-free-tag { font-size: 10px; padding: 2px 8px; }
.tp3-app.tp3-fs .tp3-pile .tp3-empty { padding: 20px 8px; font-size: 11px; min-width: 60px; }
.tp3-app.tp3-fs .tp3-pot-box { padding: 7px 16px; }
.tp3-app.tp3-fs .tp3-pot-box .tp3-pot-label { font-size: 10px; }
.tp3-app.tp3-fs .tp3-pot-box .tp3-pot-value { font-size: 21px; gap: 6px; }
.tp3-app.tp3-fs .tp3-pot-chips { display: none; }

.tp3-app.tp3-fs .tp3-turn-banner { font-size: 14px; min-height: 20px; margin: 4px 0 2px; }
.tp3-app.tp3-fs .tp3-hint-row { margin: 2px 0 6px; min-height: 17px; }
.tp3-app.tp3-fs .tp3-hint-row.tight { margin: -2px 0 6px; }
.tp3-app.tp3-fs .tp3-action-hint { font-size: 12px; padding: 5px 12px; }
.tp3-app.tp3-fs .tp3-ss-banner { padding: 8px 12px; gap: 9px; margin: 5px 0; }
.tp3-app.tp3-fs .tp3-ss-banner .tp3-ss-txt { font-size: 12px; }
.tp3-app.tp3-fs .tp3-ss-banner .tp3-btn-sm { padding: 7px 12px; font-size: 12px; }
.tp3-app.tp3-fs .tp3-ss-result { font-size: 12px; }

.tp3-app.tp3-fs .tp3-my-area { gap: 6px; margin-top: 4px; flex-shrink: 0; }
.tp3-app.tp3-fs .tp3-my-cards { gap: 9px; }
.tp3-app.tp3-fs .tp3-my-cards .tp3-card { width: 62px; height: 87px; }
.tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-suit-big { font-size: 28px; }
.tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-corner { font-size: 12px; }
.tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-corner small { font-size: 11px; }
.tp3-app.tp3-fs .tp3-hand-hint { font-size: 12px; padding: 3px 11px; }
.tp3-app.tp3-fs .tp3-turns-info { font-size: 11px; }
.tp3-app.tp3-fs .tp3-btn-sm { padding: 8px 14px; font-size: 13px; }

/* Showdown screen */
.tp3-app.tp3-fs .tp3-win-banner { padding: 14px 18px; gap: 14px; }
.tp3-app.tp3-fs .tp3-win-banner .tp3-result-trophy { font-size: 38px; }
.tp3-app.tp3-fs .tp3-win-banner .tp3-result-title { font-size: 19px; }
.tp3-app.tp3-fs .tp3-win-banner .tp3-result-pot { font-size: 16px; }
.tp3-app.tp3-fs .tp3-show-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 9px; }
.tp3-app.tp3-fs .tp3-show-card { padding: 9px 11px; gap: 7px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card { width: 38px; height: 54px; border-radius: 5px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card .tp3-c-suit-big { font-size: 18px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card .tp3-c-corner { font-size: 9px; top: 2px; left: 3px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card .tp3-c-corner small { font-size: 8px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card .tp3-c-corner.br { right: 3px; bottom: 2px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand { gap: 4px; }
.tp3-app.tp3-fs .tp3-show-head .tp3-avatar { width: 32px; height: 32px; font-size: 13px; }
.tp3-app.tp3-fs .tp3-show-who .tp3-pname { font-size: 12px; }
.tp3-app.tp3-fs .tp3-show-card .tp3-hand-tag { font-size: 10px; margin-top: 0; }
.tp3-app.tp3-fs .tp3-show-foot .tp3-btn { padding: 10px 22px; font-size: 14px; }

/* ---------- Small tablets / phones: aur compact ---------- */
@media (max-width: 820px) {
    .tp3-app.tp3-fs .tp3-topbar { padding: 8px 12px; }
    .tp3-app.tp3-fs .tp3-brand { font-size: 15px; letter-spacing: 1px; }
    .tp3-app.tp3-fs .tp3-brand .tp3-mini-card { width: 21px; height: 29px; font-size: 12px; }
    .tp3-app.tp3-fs .tp3-balance-chip { padding: 5px 12px; font-size: 13px; }
    .tp3-app.tp3-fs .tp3-btn-sm { font-size: 11px; padding: 5px 8px; }
    .tp3-app.tp3-fs .tp3-topbar .tp3-btn-sm { padding: 6px 9px; font-size: 12px; }
    .tp3-app.tp3-fs .tp3-view { padding: 8px 8px 10px; }

    .tp3-app.tp3-fs .tp3-opponents { gap: 7px; margin-bottom: 2px; }
    .tp3-app.tp3-fs .tp3-opp { padding: 5px 7px; gap: 3px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-avatar { width: 32px; height: 32px; font-size: 13px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-av-e { font-size: 19px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-pname { font-size: 10px; max-width: 74px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-card-backs .tp3-card-back { width: 23px; height: 33px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-card-backs .tp3-card-back::after { font-size: 13px; }
    .tp3-app.tp3-fs .tp3-away-tag { font-size: 9px; padding: 1px 5px; }

    .tp3-app.tp3-fs .tp3-felt { margin: 6px 0; padding: 12px 6px 10px; border-width: 6px; border-radius: 26px; }
    .tp3-app.tp3-fs .tp3-felt::after { font-size: 30px; letter-spacing: 7px; }
    .tp3-app.tp3-fs .tp3-table-center { gap: 10px; }
    .tp3-app.tp3-fs .tp3-pile .tp3-card,
    .tp3-app.tp3-fs .tp3-pile .tp3-card-back { width: 44px; height: 62px; }
    .tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-suit-big { font-size: 20px; }
    .tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-corner { font-size: 10px; }
    .tp3-app.tp3-fs .tp3-pile .tp3-card .tp3-c-corner small { font-size: 9px; }
    .tp3-app.tp3-fs .tp3-deck-stack { width: 44px; height: 62px; }
    .tp3-app.tp3-fs .tp3-pot-box { padding: 5px 12px; }
    .tp3-app.tp3-fs .tp3-pot-box .tp3-pot-value { font-size: 17px; }

    .tp3-app.tp3-fs .tp3-turn-banner { font-size: 12px; min-height: 18px; }
    .tp3-app.tp3-fs .tp3-action-hint { font-size: 11px; padding: 4px 10px; }
    .tp3-app.tp3-fs .tp3-ss-banner .tp3-ss-txt { font-size: 11px; }

    .tp3-app.tp3-fs .tp3-my-area { gap: 5px; margin-top: 3px; }
    .tp3-app.tp3-fs .tp3-my-cards { gap: 8px; }
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card { width: 52px; height: 73px; }
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-suit-big { font-size: 24px; }
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-corner { font-size: 11px; }
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-corner small { font-size: 10px; }

    .tp3-app.tp3-fs .tp3-chat-emo { width: 38px; height: 34px; font-size: 17px; }
    .tp3-app.tp3-fs .tp3-chat-toggle { width: 36px; height: 34px; font-size: 15px; }
    .tp3-app.tp3-fs .tp3-show-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
    .tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card { width: 34px; height: 48px; }

    /* Lobby + waiting room normal (page scroll OK) */
    .tp3-lobby-grid { grid-template-columns: 1fr; }
    .tp3-lobby-row { flex-wrap: wrap; }
    .tp3-lobby-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    .tp3-win-banner { flex-direction: column; text-align: center; gap: 6px; padding: 14px 16px; }
    .tp3-show-grid { grid-template-columns: 1fr; }
    .tp3-ss-banner { flex-wrap: wrap; text-align: center; }
    .tp3-ss-banner .tp3-ss-txt { text-align: center; }
    .tp3-bubble { max-width: 160px; font-size: 12px; }
    .tp3-bubble.emo { font-size: 24px; }
    .tp3-av-grid { grid-template-columns: repeat(4, 1fr); }
}

/* General mobile (non-fullscreen views) */
@media (max-width: 640px) {
    .tp3-card, .tp3-card-back { width: 56px; height: 80px; }
    .tp3-deck-stack { width: 56px; height: 80px; }
    .tp3-card .tp3-c-suit-big { font-size: 27px; }
    .tp3-card .tp3-c-corner { font-size: 12px; }
    .tp3-my-cards { gap: 7px; }
    .tp3-felt { padding: 20px 8px 18px; border-width: 8px; }
    .tp3-table-center { gap: 16px; }
    .tp3-pot-box .tp3-pot-value { font-size: 20px; }
    .tp3-topbar { padding: 10px 12px; }
    .tp3-opp { min-width: 88px; padding: 8px 10px; }
    .tp3-turn-banner { font-size: 13px; }
    .tp3-streak-chip { min-width: 34px; font-size: 11px; }
}

/* Very short landscape phones - aur bhi compact */
@media (max-width: 820px) and (max-height: 480px) {
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card { width: 40px; height: 56px; }
    .tp3-app.tp3-fs .tp3-my-cards .tp3-card .tp3-c-suit-big { font-size: 18px; }
    .tp3-app.tp3-fs .tp3-pile .tp3-card,
    .tp3-app.tp3-fs .tp3-pile .tp3-card-back { width: 34px; height: 48px; }
    .tp3-app.tp3-fs .tp3-deck-stack { width: 34px; height: 48px; }
    .tp3-app.tp3-fs .tp3-opp .tp3-card-backs .tp3-card-back { width: 17px; height: 25px; }
    .tp3-app.tp3-fs .tp3-turns-info { display: none; }
    .tp3-app.tp3-fs .tp3-felt { margin: 4px 0; padding: 8px 6px 8px; }
    .tp3-app.tp3-fs .tp3-table-center { gap: 8px; }
    .tp3-app.tp3-fs .tp3-show-card .tp3-reveal-hand .tp3-card { width: 28px; height: 40px; }
}

/* 8-player tables: opponents rows wrap neatly */
.tp3-opponents { row-gap: 6px; }

/* ============================================================
   v1.5.0 - Coin Dashboard modal (JoJo-style) + user-id badge
   ============================================================ */
.tp3-user-id-badge {
    display: inline-block;
    background: rgba(212, 175, 55, .15);
    color: var(--tp3-gold-light);
    border: 1px solid rgba(212, 175, 55, .35);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    letter-spacing: .5px;
    vertical-align: middle;
}

/* Make the dashboard modal wider so the transaction table fits */
.tp3-coin-dash-modal .tp3-coin-dash-box {
    max-width: 540px;
    text-align: left;
    max-height: 88vh;
    overflow-y: auto;
}
.tp3-coin-dash-body { font-size: 13px; color: var(--tp3-fg, #d8e6dc); }

.tp3-cd-userinfo {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--tp3-muted);
    background: rgba(0, 0, 0, .25);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
}
.tp3-cd-userinfo code {
    background: rgba(212, 175, 55, .18);
    color: var(--tp3-gold-light);
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 700;
}
.tp3-cd-mode {
    margin-left: auto;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(125, 220, 154, .15);
    color: var(--tp3-success, #7ddc9a);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(125, 220, 154, .35);
}

.tp3-cd-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
/* v1.5.2: Single-stat layout (only Balance is shown now) */
.tp3-cd-stats-single {
    grid-template-columns: 1fr;
}
.tp3-cd-stat-balance {
    border-left-width: 4px;
    padding: 14px 8px;
}
.tp3-cd-stat-balance b {
    font-size: 24px;
}
.tp3-cd-stat-balance small {
    font-size: 11px;
}
.tp3-cd-stat {
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .06);
    border-left: 3px solid var(--tp3-gold);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}
.tp3-cd-stat b {
    display: block;
    font-size: 16px;
    color: var(--tp3-gold-light);
    margin-bottom: 2px;
}
.tp3-cd-stat small {
    display: block;
    font-size: 10px;
    color: var(--tp3-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tp3-cd-stat .pos { color: var(--tp3-success, #7ddc9a); }
.tp3-cd-stat .neg { color: #f1948a; }

.tp3-cd-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    background: rgba(0, 0, 0, .2);
}
.tp3-cd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    font-size: 12px;
}
.tp3-cd-row:last-child { border-bottom: 0; }
.tp3-cd-dir {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    flex-shrink: 0;
    letter-spacing: .5px;
    align-self: flex-start;
    margin-top: 1px;
}
.tp3-cd-dir.in { background: rgba(125, 220, 154, .2); color: var(--tp3-success, #7ddc9a); }
.tp3-cd-dir.out { background: rgba(241, 148, 138, .2); color: #f1948a; }
.tp3-cd-main { flex: 1; min-width: 0; }
.tp3-cd-when {
    font-size: 11px;
    color: var(--tp3-muted);
}
.tp3-cd-meta {
    color: var(--tp3-muted);
    font-size: 11px;
    margin-top: 2px;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
}
/* v1.5.2: Note on its own line so long notes are never truncated. */
.tp3-cd-note {
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(212, 175, 55, .08);
    border-left: 2px solid rgba(212, 175, 55, .5);
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--tp3-text, #d8e6dc);
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tp3-cd-amt {
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 1px;
}
.tp3-cd-amt.pos { color: var(--tp3-success, #7ddc9a); }
.tp3-cd-amt.neg { color: #f1948a; }

/* v1.5.1: Transfer Coins form inside Coin Dashboard modal */
.tp3-cd-transfer {
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 10px;
    padding: 12px;
    margin: 14px 0;
}
.tp3-cd-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tp3-cd-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}
.tp3-cd-field label {
    font-size: 11px;
    color: var(--tp3-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
}
.tp3-cd-field input,
.tp3-cd-field select {
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--tp3-fg, #d8e6dc);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.tp3-cd-field input:focus,
.tp3-cd-field select:focus {
    outline: 0;
    border-color: var(--tp3-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, .25);
}
.tp3-cd-field input::placeholder { color: rgba(216, 230, 220, .35); }

#tp3-cd-uid-info {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}
.tp3-cd-uid-ok {
    background: rgba(125, 220, 154, .15);
    color: var(--tp3-success, #7ddc9a);
    border-left: 3px solid var(--tp3-success, #7ddc9a);
    padding-left: 8px;
    display: block;
}
.tp3-cd-uid-bad {
    background: rgba(241, 148, 138, .15);
    color: #f1948a;
    border-left: 3px solid #f1948a;
    padding-left: 8px;
    display: block;
}

.tp3-cd-msg {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    min-height: 16px;
    text-align: center;
}
.tp3-cd-msg.ok {
    background: rgba(125, 220, 154, .15);
    color: var(--tp3-success, #7ddc9a);
    border: 1px solid rgba(125, 220, 154, .35);
}
.tp3-cd-msg.err {
    background: rgba(241, 148, 138, .15);
    color: #f1948a;
    border: 1px solid rgba(241, 148, 138, .35);
}

@media (max-width: 600px) {
    .tp3-cd-stats { grid-template-columns: repeat(2, 1fr); }
    .tp3-cd-stats-single { grid-template-columns: 1fr; }
    .tp3-coin-dash-modal .tp3-coin-dash-box { max-width: 100%; }
    .tp3-cd-mode { margin-left: 0; }

    /* v1.5.2: Hide button text labels on narrow screens so the topbar
       (3 Patti brand + Balance chip + Coin Dashboard button + EN/HIN +
       Speaker) all stay on ONE horizontal line. Only icons/emojis remain. */
    .tp3-tb-label { display: none !important; }
    .tp3-topbar { padding: 8px 10px; gap: 6px; }
    .tp3-brand { font-size: 14px; letter-spacing: 1px; gap: 5px; }
    .tp3-brand .tp3-mini-card { width: 20px; height: 28px; font-size: 11px; }
    .tp3-balance-chip { padding: 5px 10px; font-size: 12px; gap: 5px; }
    .tp3-coin-ico { width: 14px; height: 14px; }
    .tp3-topbar-right { gap: 4px; }
    .tp3-topbar .tp3-btn-sm { padding: 6px 9px; font-size: 12px; }
}

/* v1.5.2: Even narrower (<=380px) - shrink brand further if needed */
@media (max-width: 380px) {
    .tp3-brand { font-size: 12px; letter-spacing: .5px; }
    .tp3-brand .tp3-mini-card { width: 18px; height: 24px; font-size: 10px; }
    .tp3-balance-chip { padding: 4px 8px; font-size: 11px; }
    .tp3-topbar .tp3-btn-sm { padding: 5px 7px; font-size: 11px; }
}

/* v1.5.8: table voice controls */
.tp3-voice-panel{margin:10px auto 0;padding:10px 12px;max-width:520px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(0,0,0,.18);text-align:center}
.tp3-voice-title{font-size:12px;font-weight:700;color:var(--tp3-gold-light);margin-bottom:7px;text-transform:uppercase;letter-spacing:.05em}
.tp3-voice-actions{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}
.tp3-voice-on{border-color:var(--tp3-success)!important;color:var(--tp3-success)!important}
.tp3-voice-users{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:7px}
.tp3-voice-user{border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.06);color:var(--tp3-text);padding:5px 9px;font-size:11px;cursor:pointer}
.tp3-voice-user.is-muted{border-color:rgba(255,120,120,.55);color:#ff9b9b}
.tp3-voice-note{font-size:10px;color:var(--tp3-muted);margin-top:7px}
@media(max-width:520px){.tp3-voice-panel{margin-left:4px;margin-right:4px}.tp3-voice-user{font-size:10px;padding:5px 8px}}
