:root {
    --bg-dark: #0f141c;
    --table-felt: #1a4d2e;
    --table-felt-dark: #0f331d;
    --table-felt-highlight: #22643c;
    --wood-rim: #3d2314;
    --gold: #facc15;
    --gold-light: #fef08a;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --card-w: 42px;
    --card-h: 62px;
    --card-radius: 5px;
    --table-slot-w: 38px;
    --table-slot-h: 56px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
    height: var(--tg-viewport-height, 100vh);
    height: 100dvh;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100%;
    height: var(--tg-viewport-height, 100vh);
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    touch-action: manipulation;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Header bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(15, 20, 28, 0.85);
    backdrop-filter: blur(10px);
    z-index: 50;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.brand {
    font-size: clamp(11.5px, 3.2vw, 13.5px);
    font-weight: 700;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.brand span, .brand-text {
    white-space: nowrap;
}

.brand-icon {
    font-size: 1.15em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 380px) {
    .top-nav {
        padding: 6px 8px;
    }
    .brand {
        font-size: 11px;
        gap: 3px;
        letter-spacing: 0;
    }
    .nav-controls {
        gap: 4px;
    }
    .nav-btn {
        padding: 5px 7px;
        font-size: 12px;
    }
    .chips-badge {
        padding: 2px 6px;
        font-size: 12px;
        gap: 4px;
    }
}

.nav-controls {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.nav-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

/* Poker Table (Felt canvas area) */
.poker-table-wrapper {
    flex: 1;
    display: flex;
    position: relative;
    padding: 6px 8px;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

.poker-table {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, var(--table-felt-highlight) 0%, var(--table-felt) 60%, var(--table-felt-dark) 100%);
    border: 6px solid var(--wood-rim);
    box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.5);
    border-radius: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

.table-inner-rim {
    position: absolute;
    inset: 6px;
    border: 1.5px dashed rgba(212, 175, 55, 0.35);
    border-radius: 32px;
    pointer-events: none;
}

/* Opponent bar */
.opponents-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 8px 6px 8px;
    position: relative;
    width: 100%;
    z-index: 600;
}

.player-pod {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: none;
}

.pod-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated Move Callout stretched to the right edge of the table */
.opponent-action-callout {
    position: absolute;
    left: calc(50% + 28px);
    right: 8px;
    top: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1.3px solid var(--gold);
    border-radius: 9px;
    padding: 5px 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.65), 0 0 10px rgba(250, 204, 21, 0.35);
    opacity: 0;
    transform: scale(0.92);
    transform-origin: left center;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 610;
}

/* Triangle speech arrow pointing directly to avatar center */
.opponent-action-callout::before {
    content: '';
    position: absolute;
    left: -5.5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 5.5px 5px 0;
    border-style: solid;
    border-color: transparent var(--gold) transparent transparent;
}

.opponent-action-callout.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.callout-icon {
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1.25;
}

.callout-text {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    word-break: normal;
    overflow-wrap: break-word;
}

.callout-cursor {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    margin-left: 1px;
    animation: blinkCursor 0.5s infinite alternate;
}

@media (max-width: 360px) {
    .opponent-action-callout {
        left: calc(50% + 28px);
        right: 6px;
        padding: 4px 7px;
    }
    .callout-text {
        font-size: 10px;
    }
}

@media (min-width: 480px) {
    .opponent-action-callout {
        max-width: 320px;
    }
}

@keyframes blinkCursor {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.callout-cursor.done {
    display: none;
}

.pod-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #252e3d;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
}

.pod-avatar.active-turn {
    box-shadow: 0 0 16px 4px var(--accent-green);
    border-color: #a7f3d0;
    animation: pulse 1.5s infinite;
}

/* Persona Avatar Ring Glows */
.pod-avatar.bot-persona-bot-classic,
.pod-avatar.evil-bot {
    background: radial-gradient(circle, #2d0b0b 0%, #120303 100%);
    border: 2px solid #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.7), inset 0 0 8px rgba(220, 38, 38, 0.5);
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6));
}

.pod-avatar.bot-persona-bot-demon {
    background: radial-gradient(circle, #3b0712 0%, #170206 100%);
    border: 2px solid #f43f5e;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.8), inset 0 0 8px rgba(225, 29, 72, 0.5);
    filter: drop-shadow(0 0 5px rgba(244, 63, 94, 0.7));
}

.pod-avatar.bot-persona-bot-gentleman,
.pod-avatar.bot-persona-bot-joker {
    background: radial-gradient(circle, #2b1f0d 0%, #0d0a04 100%);
    border: 2px solid #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.85), inset 0 0 8px rgba(217, 119, 6, 0.5);
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.7));
}

.pod-avatar.bot-persona-bot-hacker {
    background: radial-gradient(circle, #022c22 0%, #011510 100%);
    border: 2px solid #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.8), inset 0 0 8px rgba(5, 150, 105, 0.5);
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.7));
}

.pod-avatar.bot-persona-bot-shuler {
    background: radial-gradient(circle, #27272a 0%, #09090b 100%);
    border: 2px solid #e2e8f0;
    box-shadow: 0 0 16px rgba(226, 232, 240, 0.75), inset 0 0 8px rgba(148, 163, 184, 0.4);
    filter: drop-shadow(0 0 5px rgba(226, 232, 240, 0.6));
}

.pod-avatar.evil-bot.active-turn,
.pod-avatar[class*="bot-persona-"].active-turn {
    animation: botTurnPulse 1.4s infinite;
}

@keyframes botTurnPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.09); filter: brightness(1.35); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.pod-name {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
    color: #e2e8f0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.pod-cards-count {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}

.pod-diff-badge {
    font-size: 9px;
    font-weight: 800;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 1px 6px;
    margin-top: 2px;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
}

.pod-diff-badge.diff-hardcore {
    color: #fca5a5;
    border-color: #ef4444;
    background: rgba(50, 10, 10, 0.85);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

/* Center Table: Deck, Pot, Rank status */

.center-table-area {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 15;
    pointer-events: none;
}

.game-status-pill {
    background: rgba(15, 20, 28, 0.92);
    border: 1px solid var(--gold);
    color: #fff;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: min(340px, 92vw);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
}

.game-status-pill strong {
    color: var(--gold-light);
}

.table-cards-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Бито (Discard Pile) - у правого борта, повёрнута влево на 90 градусов */
.bito-container {
    position: absolute;
    right: 8px;
    top: 48%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 25;
    pointer-events: none;
}

.bito-deck-stack {
    position: relative;
    width: var(--table-slot-h);
    height: var(--table-slot-w);
    cursor: default;
}

.bito-deck-stack .deck-card {
    position: absolute;
    width: var(--table-slot-w);
    height: var(--table-slot-h);
    left: calc((var(--table-slot-h) - var(--table-slot-w)) / 2);
    top: calc((var(--table-slot-w) - var(--table-slot-h)) / 2);
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    border: 1.5px solid #93c5fd;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
    transform-origin: center center;
    transform: rotate(-90deg);
}

.bito-deck-stack .deck-card:nth-child(1) { transform: translate(-2px, -2px) rotate(-90deg); }
.bito-deck-stack .deck-card:nth-child(2) { transform: translate(-1px, -1px) rotate(-90deg); }
.bito-deck-stack .deck-card:nth-child(3) { transform: translate(0, 0) rotate(-90deg); }

.bito-count {
    position: relative;
    background: rgba(10, 15, 30, 0.94);
    border: 1.5px solid var(--gold);
    color: #fef08a;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(234, 179, 8, 0.3);
    text-align: center;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Deck stack (компактный размер) */
.deck-stack {
    position: relative;
    width: var(--table-slot-w);
    height: var(--table-slot-h);
}

.deck-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--card-radius);
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    border: 1.5px solid #93c5fd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.deck-card:nth-child(1) { transform: translate(-2px, -2px); }
.deck-card:nth-child(2) { transform: translate(-1px, -1px); }
.deck-card:nth-child(3) { transform: translate(0, 0); }

.deck-count {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    border: 1px solid var(--gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 5;
}

/* Pot stack (компактный размер) */
.pot-stack {
    position: relative;
    width: var(--table-slot-w);
    height: var(--table-slot-h);
    min-width: var(--table-slot-w);
    min-height: var(--table-slot-h);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pot-placeholder {
    width: 100%;
    height: 100%;
    border: 1.5px dashed rgba(255, 255, 255, 0.25);
    border-radius: var(--card-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    padding: 2px;
}

.pot-card-item {
    position: absolute;
    width: var(--table-slot-w);
    height: var(--table-slot-h);
    border-radius: var(--card-radius);
    transition: all 0.3s ease-out;
}

/* Playing Card styling */
.playing-card {
    width: var(--card-w);
    height: var(--card-h);
    border-radius: var(--card-radius);
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    touch-action: none;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.15s ease;
    position: relative;
    user-select: none;
    flex-shrink: 0;
}

.playing-card.face-down {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    border: 1.5px solid #60a5fa;
}

.card-back-pattern {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--card-radius) - 1px);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 2px, transparent 0, transparent 4px);
}

.card-inner {
    width: 100%;
    height: 100%;
    padding: 2px 3px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-radius: var(--card-radius);
    border: 1px solid #d1d5db;
}

.suit-red { color: #dc2626; }
.suit-black { color: #111827; }

.card-corner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 0.95;
}

.card-corner.bottom-right {
    align-items: flex-end;
    transform: rotate(180deg);
}

.card-rank {
    font-size: 12px;
    font-weight: 800;
}

.card-suit {
    font-size: 8.5px;
}

.card-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.card-big-suit {
    font-size: 16px;
}

/* Card Selection & Drag */
.playing-card.selected {
    transform: translateY(-18px) scale(1.06) !important;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.5) !important;
    border: 2px solid var(--accent-green) !important;
    z-index: 100 !important;
}

.selected-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: var(--accent-green);
    border: 1.5px solid #fff;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.playing-card.selected .selected-badge {
    display: flex;
}

.playing-card.dragging {
    z-index: 200 !important;
    opacity: 0.95;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5) !important;
    transition: none !important;
}

/* Player Hand area (2 Rows layout) */
.player-hand-section {
    position: relative;
    width: 100%;
    padding: 2px 0 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    box-sizing: border-box;
}

.swipe-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
    animation: bounceUp 1.8s infinite;
}

@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.cards-fan-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 4px 10px 2px 10px;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.hand-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.hand-row.row-top {
    z-index: 10;
}

.hand-row.row-bottom {
    z-index: 20;
    margin-top: -14px;
}

.cards-fan-container::-webkit-scrollbar {
    display: none;
}

/* Actions Bar (Footer) */
.action-dock {
    padding: 10px 16px;
    background: rgba(15, 20, 28, 0.92);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 40;
}

.action-btn {
    flex: 1;
    max-width: 170px;
    padding: 12px 14px;
    border-radius: 16px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid #34d399;
}

.btn-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid #f87171;
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid #60a5fa;
}

.btn-gold {
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 50%, #d97706 100%) !important;
    border: 1.5px solid #fde047 !important;
    color: #1a0f00 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

.btn-gold:hover, .btn-gold:active {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
    color: #000000 !important;
}

.btn-gray {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 14px 10px 32px 10px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #1e2634;
    border: 2px solid var(--gold);
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    padding: 18px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    margin: auto 0;
    flex-shrink: 0;
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: pan-y;
    word-break: break-word;
    overflow-wrap: break-word;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-card::-webkit-scrollbar {
    width: 4px;
}

.modal-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.modal-card::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.modal-card .action-btn {
    max-width: 100%;
    width: 100%;
    flex: none;
    padding: 11px 14px;
    font-size: 13px;
    border-radius: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold-light);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.modal-desc {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Rank Picker Modal - Casino Mini-Cards Style */
.rank-picker-card {
    max-width: 380px !important;
    width: 95% !important;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0a0f1d 100%) !important;
    border: 2px solid #d4af37 !important;
    border-radius: 22px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.25) !important;
    padding: 18px 16px !important;
    color: #ffffff;
}

.rank-modal-header {
    text-align: center;
    margin-bottom: 12px;
}

.rank-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #d4af37;
    margin: 10px 0 6px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), transparent);
}

.rank-royals-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 6px;
}

.rank-numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.mini-card-btn {
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 10px;
    aspect-ratio: 1 / 1.25;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    cursor: pointer;
    position: relative;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 #ffffff;
    transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-card-btn:hover, .mini-card-btn:active, .mini-card-btn.selected {
    transform: translateY(-3px) scale(1.04);
    border-color: #f59e0b;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.45), inset 0 0 0 1px #f59e0b;
}

.mini-card-btn.royal-card {
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(212, 175, 55, 0.3), inset 0 1px 0 #ffffff;
}

.mini-card-btn.ace-card {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35), inset 0 1px 0 #ffffff;
}

.mini-card-btn .card-corner {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 2px;
}

.mini-card-btn .card-corner.red {
    color: #dc2626;
}

.mini-card-btn .card-corner .suit-mini {
    font-size: 9px;
}

.mini-card-btn .card-center-rank {
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.5px;
}

.mini-card-btn .card-center-rank.red {
    color: #dc2626;
}

.mini-card-btn .card-name-sub {
    font-size: 9.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1;
}

.mini-card-btn .card-name-sub.gold {
    color: #b45309;
}

/* Reveal Stamp Overlay */
.stamp-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
    opacity: 0;
    transform: scale(1.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stamp-overlay.active {
    opacity: 1;
    transform: scale(1);
}

.big-stamp {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 12px 32px;
    border-radius: 16px;
    text-transform: uppercase;
    transform: rotate(-10deg);
    border: 5px solid;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.stamp-truth {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
}

.stamp-bluff {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: rotate(-10deg) translate(0, 0); }
    25% { transform: rotate(-12deg) translate(-6px, 4px); }
    75% { transform: rotate(-8deg) translate(6px, -4px); }
}

.reveal-cards-display {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

/* ==================== THEMES & SKINS ==================== */
body.theme-classic-green {
    --table-felt: #1a4d2e;
    --table-felt-dark: #0f331d;
    --table-felt-highlight: #22643c;
    --wood-rim: #3d2314;
}

body.theme-monte-carlo {
    --table-felt: #0a1c4a;
    --table-felt-dark: #050e26;
    --table-felt-highlight: #1d4ed8;
    --wood-rim: #06b6d4;
}

body.theme-royal-burgundy {
    --table-felt: #470415;
    --table-felt-dark: #2b020c;
    --table-felt-highlight: #6b0822;
    --wood-rim: #2d1810;
}

body.theme-vip-noir,
body.theme-midnight-black {
    --table-felt: #121214;
    --table-felt-dark: #08080a;
    --table-felt-highlight: #1a1a20;
    --wood-rim: #d4af37;
}

body.theme-vip-noir .table-inner-rim,
body.theme-midnight-black .table-inner-rim {
    border: 2px dashed rgba(212, 175, 55, 0.7) !important;
    box-shadow: inset 0 0 16px rgba(212, 175, 55, 0.3) !important;
}

body.theme-royal-burgundy .table-inner-rim {
    border: 2px solid rgba(225, 29, 72, 0.55) !important;
    box-shadow: inset 0 0 20px rgba(190, 18, 60, 0.3) !important;
}

body.theme-monte-carlo .table-inner-rim {
    border: 2px solid rgba(56, 189, 248, 0.65) !important;
    box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.35), 0 0 12px rgba(6, 182, 212, 0.35) !important;
}

body.theme-cyberpunk {
    --table-felt: #1e113a;
    --table-felt-dark: #100824;
    --table-felt-highlight: #3b1b68;
    --wood-rim: #06b6d4;
}

/* Card back themes */
body.cardback-gold-dragon .deck-card,
body.cardback-gold-dragon .playing-card.face-down,
body.cardback-gold-dragon .flying-card-fly.face-down {
    background: linear-gradient(135deg, #18181b 0%, #09090b 100%) !important;
    border: 1.5px solid #d4af37 !important;
}

body.cardback-gold-dragon .card-back-pattern {
    background-image: repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.2) 0, rgba(212, 175, 55, 0.2) 3px, transparent 0, transparent 6px) !important;
}

body.cardback-dark-marble .deck-card,
body.cardback-dark-marble .playing-card.face-down,
body.cardback-dark-marble .flying-card-fly.face-down {
    background: linear-gradient(135deg, #27272a 0%, #111827 100%) !important;
    border: 1.5px solid #94a3b8 !important;
}

body.cardback-dark-marble .card-back-pattern {
    background-image: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 4px, transparent 0, transparent 8px) !important;
}

/* ==================== SPEECH BUBBLES & MOOD ==================== */
.bot-speech-bubble {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%) scale(0.7);
    background: rgba(15, 20, 28, 0.94);
    border: 1.5px solid var(--gold);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    z-index: 100;
}

.bot-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--gold) transparent;
}

.bot-speech-bubble.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.mood-bounce {
    animation: moodBounceAnim 0.4s ease;
}

@keyframes moodBounceAnim {
    0% { transform: scale(1); }
    40% { transform: scale(1.25) rotate(-8deg); }
    70% { transform: scale(0.92) rotate(4deg); }
    100% { transform: scale(1); }
}

/* ==================== FLYING CARDS & PHYSICS ==================== */
.flying-card-fly {
    position: fixed;
    width: var(--card-w);
    height: var(--card-h);
    border-radius: var(--card-radius);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s ease;
    transform-style: preserve-3d;
}

.flying-card-fly.face-down {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    border: 1.5px solid #60a5fa;
}

/* ==================== CASINO POKER CHIPS & BADGE ==================== */
.poker-chip {
    display: inline-block;
    vertical-align: -4.5px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poker-chip.sm {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.poker-chip.lg {
    width: 28px;
    height: 28px;
    vertical-align: -6px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.chips-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px 3px 7px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1.5px solid var(--gold);
    color: var(--gold-light);
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chips-badge .poker-chip {
    position: relative;
    top: 2px;
}

.chips-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.45);
}

.chips-badge:active {
    transform: scale(0.96);
}

.chips-badge.chip-bump {
    animation: chipBump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chipBump {
    0% { transform: scale(1); }
    35% { transform: scale(1.18) rotate(12deg); }
    70% { transform: scale(0.96) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}


.victory-reward-badge .poker-chip {
    position: relative;
    top: 1.5px;
}

.victory-reward-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--gold-light);
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid var(--gold);
    border-radius: 20px;
    padding: 8px 16px;
    margin: 14px 0 20px 0;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}

/* ==================== FLOATING EMOJIS & REACTION BAR ==================== */
.reaction-bar {
    position: absolute;
    left: 8px;
    top: 36%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 25;
}

.reaction-trigger-wrap {
    position: relative;
}

.reaction-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 20, 28, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, background-color 0.15s;
}

.reaction-btn:active {
    transform: scale(1.2);
    background: rgba(212, 175, 55, 0.3);
}

.reaction-btn.reaction-main-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
    border: 1.5px solid var(--gold);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.4), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.reaction-btn.reaction-main-btn.active {
    transform: scale(1.12);
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.25);
}

.reactions-popover {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.96);
    border: 1.5px solid var(--gold);
    border-radius: 20px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(250, 204, 21, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

.reactions-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.reaction-pop-item {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.reaction-pop-item:hover, .reaction-pop-item:active {
    transform: scale(1.25);
    background: rgba(250, 204, 21, 0.25);
    border-color: var(--gold);
}

.reaction-btn.surrender-reaction-btn {
    border: 1.5px solid rgba(239, 68, 68, 0.7) !important;
    background: rgba(239, 68, 68, 0.22) !important;
    color: #fca5a5 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
    margin-top: 3px;
}

.reaction-btn.surrender-reaction-btn:active {
    background: rgba(239, 68, 68, 0.55) !important;
    transform: scale(1.2);
}

/* ==================== FULLSCREEN FLYING REACTIONS ==================== */
.reactions-fly-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.flying-reaction {
    position: absolute;
    font-size: 52px;
    user-select: none;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 16px rgba(250, 204, 21, 0.6));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    pointer-events: none;
}

.flying-reaction.from-player {
    animation: flyFromBottom 2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.flying-reaction.from-opponent {
    animation: flyFromTop 2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.flying-reaction-author {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: rgba(15, 23, 42, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

@keyframes flyFromBottom {
    0% {
        opacity: 0;
        transform: translate(-50%, 60px) scale(0.3) rotate(-15deg);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -40px) scale(1.35) rotate(10deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -90px) scale(1.15) rotate(-5deg);
    }
    80% {
        opacity: 0.9;
        transform: translate(-50%, -150px) scale(1) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -220px) scale(0.6) rotate(0deg);
    }
}

@keyframes flyFromTop {
    0% {
        opacity: 0;
        transform: translate(-50%, -60px) scale(0.3) rotate(15deg);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, 40px) scale(1.35) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, 90px) scale(1.15) rotate(5deg);
    }
    80% {
        opacity: 0.9;
        transform: translate(-50%, 150px) scale(1) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 220px) scale(0.6) rotate(0deg);
    }
}

/* ==================== TURN TIMER & AFK ==================== */
.turn-timer-container {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 20;
}

.turn-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.92);
    border: 1.2px solid rgba(250, 204, 21, 0.6);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.turn-timer-pill.warning {
    border-color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
    animation: timerPulse 0.6s infinite alternate;
}

@keyframes timerPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.turn-timer-icon {
    font-size: 13px;
    line-height: 1;
}

.turn-timer-track {
    width: 90px;
    height: 6px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    overflow: hidden;
}

.turn-timer-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #facc15);
    border-radius: 4px;
    transition: width 0.25s linear, background 0.25s;
}

.turn-timer-pill.warning .turn-timer-fill {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.turn-timer-sec {
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    min-width: 24px;
    text-align: right;
}

.turn-timer-pill.warning .turn-timer-sec {
    color: #fca5a5;
}

/* ==================== MUSIC BUTTON ==================== */
#btnMusic.active {
    background: rgba(250, 204, 21, 0.25) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.6) !important;
    color: #fef08a !important;
    animation: musicBeat 1.8s infinite ease-in-out;
}

@keyframes musicBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.floating-table-emoji {
    position: fixed;
    font-size: 26px;
    pointer-events: none;
    z-index: 999;
    animation: floatEmojiUp 1.6s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes floatEmojiUp {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6);
    }
    40% {
        transform: translate(calc(var(--dx) * 0.5), -70px) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), -170px) scale(1);
    }
}

/* ==================== ACHIEVEMENT TOAST ==================== */
.achievement-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1e2634 0%, #0f141c 100%);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ach-icon {
    font-size: 28px;
}

.ach-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-light);
}

.ach-desc {
    font-size: 11px;
    color: #94a3b8;
}

/* ==================== DIFFICULTY & 18+ CONTROLS ==================== */
.difficulty-group {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-bottom: 8px;
}

.diff-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    padding: 9px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.diff-btn:active {
    transform: scale(0.96);
}

.diff-btn.selected {
    background: rgba(234, 179, 8, 0.2);
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.35);
}

.diff-btn[data-diff="hardcore"].selected {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.diff-reward-val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 3px;
    opacity: 0.9;
    line-height: 1;
}

.diff-reward-val .poker-chip.sm {
    width: 12px;
    height: 12px;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.toxic-toggle-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.toxic-toggle-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.toxic-title {
    font-size: 12px;
    font-weight: 800;
    color: #fca5a5;
    letter-spacing: 0.2px;
}

.toxic-sub {
    font-size: 10px;
    color: #cbd5e1;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.25);
    transition: .25s ease;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .25s ease;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

input:checked + .slider {
    background-color: #ef4444;
    border-color: #f87171;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ==================== CUSTOMIZATION MODAL ==================== */
.skin-selector-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.skin-option {
    flex: 1;
    min-width: 60px;
    padding: 8px 4px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    color: #fff;
    transition: all 0.15s ease;
}

.skin-option.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
}

.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(340px, 48vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-right: 4px;
}

.ach-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 9px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.ach-item.unlocked {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}


/* ==================== ADDITIONAL SHOP THEMES & CARDBACKS ==================== */
body.theme-vip-gold {
    --table-felt: #2b2108;
    --table-felt-dark: #191204;
    --table-felt-highlight: #45360f;
    --wood-rim: #d4af37;
}

body.theme-midnight-black {
    --table-felt: #11141a;
    --table-felt-dark: #0a0c10;
    --table-felt-highlight: #1e2430;
    --wood-rim: #3b82f6;
}

body.cardback-cyber-neon .deck-card,
body.cardback-cyber-neon .playing-card.face-down,
body.cardback-cyber-neon .flying-card-fly.face-down {
    background: linear-gradient(135deg, #09090b 0%, #1e113a 100%) !important;
    border: 1.5px solid #a855f7 !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}
body.cardback-cyber-neon .card-back-pattern {
    background-image: repeating-linear-gradient(0deg, rgba(168, 85, 247, 0.25) 0, rgba(168, 85, 247, 0.25) 2px, transparent 0, transparent 6px) !important;
}

body.cardback-ruby-luxury .deck-card,
body.cardback-ruby-luxury .playing-card.face-down,
body.cardback-ruby-luxury .flying-card-fly.face-down {
    background: linear-gradient(135deg, #370c19 0%, #581c2f 100%) !important;
    border: 1.5px solid #f43f5e !important;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3) !important;
}
body.cardback-ruby-luxury .card-back-pattern {
    background-image: repeating-linear-gradient(45deg, rgba(244, 63, 94, 0.2) 0, rgba(244, 63, 94, 0.2) 3px, transparent 0, transparent 8px) !important;
}

/* ==================== SHOP UI MODAL ==================== */
#shopModal {
    overflow-y: hidden !important;
}

.shop-modal-card {
    width: 95%;
    max-width: 420px;
    height: 100%;
    max-height: calc(var(--tg-viewport-height, 100vh) - 28px) !important;
    max-height: calc(100dvh - 28px) !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    margin: auto 0;
    padding: 14px 12px !important;
    box-sizing: border-box;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.2) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

.shop-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.shop-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.modal-close-x {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-x:hover {
    color: #ffffff;
}

.shop-balance-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

.shop-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 2px 2px 8px 2px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y !important;
    scrollbar-width: thin;
    flex-shrink: 0;
}

.shop-tabs::-webkit-scrollbar {
    height: 3px;
}

.shop-tabs::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 2px;
}

.shop-tab {
    flex: 0 0 auto;
    text-align: center;
    padding: 6px 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    touch-action: manipulation !important;
}

.shop-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.shop-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(245, 158, 11, 0.15));
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.shop-catalog {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-right: 4px;
}

.shop-catalog::-webkit-scrollbar {
    width: 5px;
}
.shop-catalog::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.shop-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.shop-item-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}

.shop-item-card.is-active {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.08);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.15);
}

.shop-item-preview {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.shop-item-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
}

.shop-item-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
}

.shop-item-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
}

.shop-item-btn {
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.shop-item-btn:active {
    transform: scale(0.96);
}

.shop-item-btn.btn-equipped {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
    cursor: default;
}

.shop-item-btn.btn-equip {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.shop-item-btn.btn-buy {
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: #000000;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
}

.shop-item-btn.btn-locked {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

.player-title-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #fde047;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.header-chips-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.header-chips-clickable:active {
    transform: scale(0.95);
}


/* ==================== CARD FACES THEMES ==================== */
body.cardface-dark-noir .playing-card:not(.face-down) {
    background: #18181b !important;
    border: 1px solid #3f3f46 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6) !important;
}
body.cardface-dark-noir .playing-card:not(.face-down) .card-inner {
    border-color: #27272a !important;
}
body.cardface-dark-noir .playing-card:not(.face-down) .suit-black {
    color: #e2e8f0 !important;
}
body.cardface-dark-noir .playing-card:not(.face-down) .suit-red {
    color: #f43f5e !important;
    text-shadow: 0 0 6px rgba(244, 63, 94, 0.45);
}

body.cardface-royal-gold .playing-card:not(.face-down) {
    background: linear-gradient(135deg, #fefce8 0%, #fef08a 100%) !important;
    border: 1px solid #ca8a04 !important;
    box-shadow: 0 3px 8px rgba(202, 138, 4, 0.3) !important;
}
body.cardface-royal-gold .playing-card:not(.face-down) .card-inner {
    border-color: #eab308 !important;
}
body.cardface-royal-gold .playing-card:not(.face-down) .suit-black {
    color: #422006 !important;
}
body.cardface-royal-gold .playing-card:not(.face-down) .suit-red {
    color: #b91c1c !important;
}

body.cardface-cyber-neon .playing-card:not(.face-down) {
    background: #09090b !important;
    border: 1px solid #06b6d4 !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4) !important;
}
body.cardface-cyber-neon .playing-card:not(.face-down) .card-inner {
    border-color: #3b82f6 !important;
}
body.cardface-cyber-neon .playing-card:not(.face-down) .suit-black {
    color: #06b6d4 !important;
    text-shadow: 0 0 6px rgba(6, 182, 212, 0.6);
}
body.cardface-cyber-neon .playing-card:not(.face-down) .suit-red {
    color: #f43f5e !important;
    text-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

/* ==================== ADDITIONAL DECKS ==================== */
body.cardback-deck-galaxy .deck-card,
body.cardback-deck-galaxy .playing-card.face-down,
body.cardback-deck-galaxy .flying-card-fly.face-down {
    background: radial-gradient(circle at 50% 50%, #312e81 0%, #0f172a 100%) !important;
    border: 1.5px solid #818cf8 !important;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.4) !important;
}
body.cardback-deck-galaxy .card-back-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1px) !important;
    background-size: 8px 8px !important;
}

body.cardback-deck-samurai .deck-card,
body.cardback-deck-samurai .playing-card.face-down,
body.cardback-deck-samurai .flying-card-fly.face-down {
    background: linear-gradient(135deg, #1c1917 0%, #7f1d1d 100%) !important;
    border: 1.5px solid #dc2626 !important;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3) !important;
}
body.cardback-deck-samurai .card-back-pattern {
    background-image: repeating-linear-gradient(60deg, rgba(220, 38, 38, 0.25) 0, rgba(220, 38, 38, 0.25) 2px, transparent 0, transparent 6px) !important;
}

/* ==================== TABLE BUY-IN & POT STAKES ==================== */
.table-buyin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.buyin-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    text-align: center;
    color: #e2e8f0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.buyin-btn:active {
    transform: scale(0.96);
}

.buyin-btn.selected {
    background: rgba(250, 204, 21, 0.18);
    border-color: var(--gold);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.3);
    color: #ffffff;
}

.buyin-title {
    font-size: 11.5px;
    font-weight: 800;
}

.buyin-cost {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.buyin-pot {
    font-size: 9.5px;
    opacity: 0.8;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.table-pot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    padding: 3px 12px;
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    margin-top: 4px;
    animation: potPulse 2.5s infinite ease-in-out;
}

@keyframes potPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 12px rgba(250, 204, 21, 0.4); }
}

.campaign-stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(79, 70, 229, 0.9));
    border: 1.5px solid #c084fc;
    border-radius: 14px;
    padding: 3px 12px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

/* ==================== BOSS ARENA CAMPAIGN ==================== */
#bossCampaignModal {
    overflow-y: hidden !important;
}

.boss-campaign-modal-card {
    width: 95%;
    max-width: 420px;
    height: 100%;
    max-height: calc(var(--tg-viewport-height, 100vh) - 28px) !important;
    max-height: calc(100dvh - 28px) !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    margin: auto 0;
    padding: 14px 12px !important;
    box-sizing: border-box;
}

.boss-chain-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-right: 4px;
    padding-bottom: 8px;
    margin: 6px 0;
}

.boss-chain-container::-webkit-scrollbar {
    width: 4px;
}
.boss-chain-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.boss-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0 !important;
    height: auto !important;
    min-height: fit-content;
    box-sizing: border-box;
    overflow: visible;
}

.boss-card.beaten {
    border-color: #10b981;
    background: rgba(6, 78, 59, 0.28);
}

.boss-card.active {
    border-color: #a855f7;
    background: rgba(88, 28, 135, 0.38);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.boss-card.locked {
    opacity: 0.65;
    filter: grayscale(0.35);
}

.boss-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.boss-avatar-box {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.boss-card.active .boss-avatar-box {
    border-color: #c084fc;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
}

.boss-card.beaten .boss-avatar-box {
    border-color: #34d399;
}

.boss-title-col {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.boss-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
}

.boss-stage-sub {
    font-size: 11px;
    font-weight: 700;
    color: #e9d5ff;
    margin-top: 2px;
    display: block;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.boss-card.active .boss-stage-sub {
    color: #f5d0fe;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.7);
}

.boss-card.beaten .boss-stage-sub {
    color: #a7f3d0;
    font-weight: 700;
}

.boss-card.locked .boss-stage-sub {
    color: #94a3b8;
    font-weight: 600;
}

.boss-status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
    align-self: flex-start;
}

.boss-status-badge.beaten {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

.boss-status-badge.current {
    background: rgba(168, 85, 247, 0.25);
    border: 1px solid #a855f7;
    color: #d8b4fe;
    animation: statusPulse 2s infinite ease-in-out;
}

.boss-status-badge.locked {
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid #64748b;
    color: #94a3b8;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.boss-flavor-quote {
    font-size: 11.5px;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.4;
    padding: 4px 6px 4px 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.28);
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.boss-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.35;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
}

.boss-reward-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
}

.boss-reward-val {
    color: var(--gold-light);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-fight-boss {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #ffffff;
    border: 1px solid #c084fc;
    border-radius: 8px;
    padding: 6px 13px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-fight-boss:active {
    transform: scale(0.96);
}

.btn-purple {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

/* ==================== LOADING SPLASH SCREEN ==================== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 38%, #1a2538 0%, #0d1422 55%, #05070c 100%);
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.04);
}

.splash-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.splash-logo-badge {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(250, 204, 21, 0.55);
    border-radius: 22px;
    padding: 18px 20px 20px 20px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(250, 204, 21, 0.25);
    width: 100%;
    box-sizing: border-box;
}

/* ==================== SPLASH SCREEN CARDS FAN ==================== */
.splash-cards-fan {
    position: relative;
    width: 110px;
    height: 62px;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    animation: cardFanFloat 2.6s ease-in-out infinite;
}

@keyframes cardFanFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.splash-card {
    width: 38px;
    height: 54px;
    background: linear-gradient(150deg, #ffffff 0%, #f8fafc 75%, #e2e8f0 100%);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.65), 0 0 10px rgba(250, 204, 21, 0.3);
    position: absolute;
    bottom: 0;
    transform-origin: 50% 95%;
    padding: 2.5px 3.5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none;
    pointer-events: none;
}

.splash-card-left {
    transform: translateX(-20px) translateY(2px) rotate(-22deg);
    z-index: 1;
}

.splash-card-center {
    transform: translateY(-6px) rotate(0deg);
    z-index: 3;
    border-color: #fef08a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75), 0 0 14px rgba(250, 204, 21, 0.5);
}

.splash-card-right {
    transform: translateX(20px) translateY(2px) rotate(22deg);
    z-index: 2;
}

.sc-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    width: fit-content;
    color: #0f172a;
}

.sc-corner.red {
    color: #dc2626;
}

.sc-rank {
    font-size: 11px;
    font-weight: 900;
    font-family: inherit;
    line-height: 1;
}

.sc-suit {
    font-size: 8.5px;
    line-height: 1;
    margin-top: 1px;
}

.sc-center-suit {
    font-size: 19px;
    line-height: 1;
    align-self: center;
    color: #0f172a;
    margin-bottom: 8px;
    transform: translateY(-2px);
}

.sc-center-suit.red {
    color: #dc2626;
}

.splash-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #facc15 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    margin: 0;
}

.splash-loading-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.splash-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

.splash-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #facc15, #fef08a);
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.85);
    transition: width 0.25s ease-out;
}

.splash-status-text {
    font-size: 11.5px;
    font-weight: 700;
    color: #f1f5f9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    letter-spacing: 0.3px;
}

.splash-enter-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 1.5px solid #34d399;
    border-radius: 14px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.55);
    transition: transform 0.15s ease;
}

.splash-enter-btn:active {
    transform: scale(0.96);
}

/* ==================== MODE SEPARATION CARDS ==================== */
.mode-separation-card {
    border-radius: 14px;
    padding: 12px 10px;
    text-align: left;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
}

.mode-card-arena {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(79, 70, 229, 0.15));
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

.mode-card-classic {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(30, 58, 138, 0.12));
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.18);
}

.mode-separation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mode-tag-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-tag-badge.tag-purple {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.mode-tag-badge.tag-blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.mode-stage-indicator {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

.mode-card-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.35;
    margin-bottom: 9px;
}

.btn-purple-sub {
    background: rgba(124, 58, 237, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.45);
    color: #e9d5ff;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-purple-sub:active {
    background: rgba(124, 58, 237, 0.45);
    transform: scale(0.98);
}

.campaign-stage-pill.solo-pill {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(30, 64, 175, 0.85));
    border: 1.5px solid #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    cursor: pointer;
}

.mode-play-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 12px !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
}

.mode-play-btn .btn-main-title {
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.mode-play-btn .btn-sub-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #f3e8ff;
    letter-spacing: 0.3px;
    line-height: 1.25;
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}

.solo-mode-card .mode-play-btn .btn-sub-title {
    color: #bfdbfe;
    text-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}


/* ==================== PLAYER PERSONAL CABINET (PROFILE MODAL) ==================== */
.profile-modal-card {
    max-width: 420px !important;
    width: 95% !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 80%) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.18) !important;
    border-radius: 22px !important;
    padding: 18px 16px !important;
    color: #f8fafc;
}

.profile-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

.profile-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 13px 14px;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.profile-avatar-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 2.5px solid #d4af37;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-level-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, #d4af37, #f59e0b);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1.5px solid #0f172a;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.profile-info-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-player-name {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}

.profile-rank-tag {
    font-size: 10px;
    font-weight: 800;
    background: rgba(212, 175, 55, 0.18);
    color: #fde047;
    border: 1px solid rgba(212, 175, 55, 0.45);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

.profile-username {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.profile-id-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
    margin-top: 2px;
}

.profile-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #cbd5e1;
    font-size: 11px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.profile-chips-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.profile-chips-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-chips-icon {
    font-size: 26px;
}

.profile-chips-val {
    font-size: 20px;
    font-weight: 900;
    color: #fde047;
    text-shadow: 0 0 10px rgba(253, 224, 71, 0.35);
    line-height: 1.1;
}

.profile-chips-label {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
}

.profile-shop-btn, #btnProfileOpenShop {
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    width: auto !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 60%, #d97706 100%) !important;
    color: #1a0f00 !important;
    border: 1.5px solid #fef08a !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.45) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer;
    transition: all 0.15s ease !important;
}

.profile-shop-btn:active, #btnProfileOpenShop:active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3) !important;
}

#btnProfileShare {
    width: 100% !important;
    max-width: 100% !important;
    padding: 13px 16px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 50%, #d97706 100%) !important;
    color: #1a0f00 !important;
    border: 1.5px solid #fef08a !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer;
    transition: all 0.15s ease !important;
}

#btnProfileShare:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25) !important;
}

.profile-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 12px 0 8px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}

.profile-stat-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 9px 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.profile-stat-icon {
    font-size: 17px;
    margin-bottom: 1px;
}

.profile-stat-val {
    font-size: 15px;
    font-weight: 800;
    color: #f8fafc;
}

.profile-stat-win {
    color: #4ade80 !important;
}

.profile-stat-gold {
    color: #facc15 !important;
}

.profile-stat-lbl {
    font-size: 9.5px;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.15;
}

.profile-equip-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.profile-equip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.equip-lbl {
    color: #94a3b8;
    font-weight: 600;
}

.equip-val {
    color: #e2e8f0;
    font-weight: 700;
    max-width: 175px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.profile-actions-row .action-btn {
    margin: 0 !important;
    padding: 9px 8px !important;
    font-size: 12px !important;
}

/* Player Custom Name Editing UI */
.profile-edit-name-btn {
    background: rgba(212, 175, 55, 0.16);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 6px;
    color: #fde047;
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.profile-edit-name-btn:hover, .profile-edit-name-btn:active {
    background: rgba(212, 175, 55, 0.35);
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.profile-player-name {
    cursor: pointer;
    transition: color 0.2s ease;
}

.profile-player-name:hover {
    color: #fde047;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.edit-name-modal-card {
    max-width: 360px !important;
    width: 90% !important;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 90%) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(212, 175, 55, 0.2) !important;
    border-radius: 20px !important;
    padding: 18px 16px !important;
}

.edit-name-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 12px;
}

.edit-name-input-box {
    margin-bottom: 12px;
}

.edit-name-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.edit-name-input:focus {
    border-color: #fde047;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.45), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.edit-name-sugg-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 7px;
}

.edit-name-sugg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.name-sugg-chip {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.name-sugg-chip:hover, .name-sugg-chip:active {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fde047;
    transform: translateY(-1px);
}

.edit-name-btn-row {
    display: flex;
    gap: 10px;
}

/* ========================================================
   ⚡ QUICK MATCH & MATCHMAKING RADAR STYLES
   ======================================================== */
.btn-quick-match {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.45) !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-quick-match:hover, .btn-quick-match:active {
    transform: scale(0.98);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6) !important;
    filter: brightness(1.1);
}

.qm-pulse-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: qm-pulse 1.2s infinite alternate;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes qm-pulse {
    0% { opacity: 0.4; transform: scale(0.85); box-shadow: 0 0 4px #4ade80; }
    100% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 12px #4ade80, 0 0 20px #22c55e; }
}

.matchmaking-modal-card {
    background: linear-gradient(180deg, #131726 0%, #0d101d 100%) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.25) !important;
    max-width: 360px;
    padding: 22px 18px;
    border-radius: 20px;
    text-align: center;
}

.mm-header {
    margin-bottom: 12px;
}

.mm-title {
    font-size: 19px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.mm-subtitle {
    font-size: 12px;
    color: #a78bfa;
    margin-top: 2px;
    font-weight: 600;
}

/* Radar Container */
.mm-radar-wrap {
    width: 124px;
    height: 124px;
    margin: 14px auto 16px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-radar-wave {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 50%;
    animation: mm-radar-expand 2.4s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.mm-radar-wave.wave-1 { animation-delay: 0s; }
.mm-radar-wave.wave-2 { animation-delay: 0.8s; }
.mm-radar-wave.wave-3 { animation-delay: 1.6s; }

.mm-radar-sweep {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(168, 85, 247, 0.35) 0deg, transparent 70deg, transparent 360deg);
    animation: mm-radar-spin 2.2s linear infinite;
    pointer-events: none;
}

.mm-radar-center {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 2px solid #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.7);
}

.mm-radar-icon {
    font-size: 24px;
}

@keyframes mm-radar-expand {
    0% { transform: scale(0.35); opacity: 0.9; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes mm-radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Player VS Player Box */
.mm-vs-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 14px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 10px;
}

.mm-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.mm-player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
}

.mm-player-avatar.searching {
    background: rgba(30, 41, 59, 0.85);
    border: 2px dashed #a855f7;
    animation: mm-opp-pulse 1.4s infinite alternate;
}

@keyframes mm-opp-pulse {
    0% { border-color: rgba(168, 85, 247, 0.4); transform: scale(0.96); }
    100% { border-color: rgba(245, 158, 11, 0.9); transform: scale(1.04); box-shadow: 0 0 14px rgba(245, 158, 11, 0.4); }
}

.mm-search-spinner {
    display: inline-block;
    animation: mm-radar-spin 2s linear infinite;
}

.mm-player-name {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mm-player-status.ready {
    font-size: 11px;
    color: #4ade80;
    font-weight: 700;
}

.mm-player-status.searching {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 600;
}

.mm-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.mm-vs-text {
    font-size: 15px;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* Info Bar */
.mm-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 11.5px;
}

.mm-info-item {
    display: flex;
    gap: 4px;
    align-items: center;
}

.mm-info-label {
    color: #94a3b8;
}

.mm-info-val {
    font-weight: 700;
    color: #f8fafc;
}

.mm-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#matchmakingModal {
    z-index: 1200 !important;
}

#btnCancelMatchmaking {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 11px !important;
}
#btnCancelMatchmaking:hover, #btnCancelMatchmaking:active {
    background: rgba(239, 68, 68, 0.3) !important;
    color: #ffffff !important;
}

#btnPlayBotInstead {
    background: rgba(99, 102, 241, 0.18) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.45) !important;
    color: #c4b5fd !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 10px !important;
}
#btnPlayBotInstead:hover, #btnPlayBotInstead:active {
    background: rgba(99, 102, 241, 0.3) !important;
    color: #ffffff !important;
}

/* ========================================================
   🎯 POKERSTARS THROWABLES & INTERACTIVE EMOTIONS
   ======================================================== */

/* Redesigned Popover Menu */
.reactions-popover {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(20, 26, 42, 0.97) 0%, rgba(11, 15, 26, 0.98) 100%);
    border: 1.5px solid var(--gold);
    border-radius: 18px;
    padding: 10px 12px;
    width: 250px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reactions-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

/* Tabs Header */
.ps-hub-header {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

.ps-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ps-tab-btn:hover {
    color: #f8fafc;
}

.ps-tab-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(245, 158, 11, 0.2));
    color: #fde047;
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.ps-tab-content {
    display: none;
}

.ps-tab-content.active {
    display: block;
}

/* Throwables Grid (PokerStars items) */
.throwables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.throwable-btn {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.throwable-btn:hover, .throwable-btn:active {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.throwable-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.throwable-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
}

/* Taunts Grid */
.taunts-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 140px;
    overflow-y: auto;
}

.taunt-btn {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    color: #f1f5f9;
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.taunt-btn:hover, .taunt-btn:active {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
    color: #fde047;
    transform: translateX(3px);
}

/* Emojis Grid */
.emojis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.reaction-pop-item {
    font-size: 24px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.reaction-pop-item:hover, .reaction-pop-item:active {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--gold);
    transform: scale(1.15);
}

/* Fullscreen Throwables Layer */
.throwables-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1250;
    overflow: hidden;
}

/* Flying Projectile */
.throwable-flying-projectile {
    position: fixed;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    z-index: 1260;
    pointer-events: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
    will-change: transform;
}

/* Avatar Pod Shake on Impact */
.pod-hit-shake {
    animation: pod-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@keyframes pod-shake {
    0% { transform: scale(1) translate(0, 0); }
    15% { transform: scale(1.18) translate(-10px, -5px) rotate(-8deg); }
    30% { transform: scale(1.12) translate(10px, 5px) rotate(8deg); }
    45% { transform: scale(1.08) translate(-7px, 3px) rotate(-5deg); }
    60% { transform: scale(1.04) translate(7px, -3px) rotate(4deg); }
    75% { transform: scale(1.02) translate(-3px, 1px) rotate(-2deg); }
    100% { transform: scale(1) translate(0, 0) rotate(0deg); }
}

/* Splatter & Hit Overlays on Target Avatar */
.throwable-impact-fx {
    position: absolute;
    inset: -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
    animation: fx-fade-out 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fx-fade-out {
    0% { opacity: 0; transform: scale(0.4); }
    12% { opacity: 1; transform: scale(1.15); }
    20% { transform: scale(1); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9) translateY(12px); }
}

/* Tomato Splatter Decal */
.tomato-splat-graphic {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.9) 50%, rgba(153, 27, 27, 0.8) 75%, transparent 100%);
    border-radius: 46% 54% 50% 50% / 35% 61% 39% 65%;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.6);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.tomato-splat-drip {
    position: absolute;
    width: 10px;
    height: 35px;
    background: #dc2626;
    border-radius: 6px;
    bottom: -22px;
    animation: tomato-drip-flow 2.2s ease-out forwards;
}

.tomato-splat-drip.drip-1 { left: 24%; height: 38px; animation-delay: 0.1s; }
.tomato-splat-drip.drip-2 { left: 52%; height: 46px; animation-delay: 0.2s; }
.tomato-splat-drip.drip-3 { left: 74%; height: 32px; animation-delay: 0.15s; }

@keyframes tomato-drip-flow {
    0% { transform: scaleY(0.2); opacity: 0.9; }
    100% { transform: scaleY(1); opacity: 0.95; }
}

.tomato-seed {
    position: absolute;
    width: 5px;
    height: 7px;
    background: #fde047;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Champagne Toast FX */
.champagne-toast-fx {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.champagne-toast-clink {
    font-size: 58px;
    animation: clink-shake 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    filter: drop-shadow(0 0 16px rgba(250, 204, 21, 0.8));
}

@keyframes clink-shake {
    0% { transform: scale(0.3) rotate(-30deg); }
    50% { transform: scale(1.3) rotate(15deg); }
    75% { transform: scale(0.95) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.champagne-bubble {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #fef08a 0%, #eab308 100%);
    box-shadow: 0 0 8px #fef08a;
    animation: bubble-float 1.6s ease-out forwards;
}

@keyframes bubble-float {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    100% { transform: translateY(-65px) scale(1.3); opacity: 0; }
}

/* Applause Ovation FX */
.applause-ovation-fx {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.applause-hands {
    font-size: 54px;
    animation: clap-bounce 0.6s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

@keyframes clap-bounce {
    0% { transform: scale(0.85); }
    100% { transform: scale(1.25); }
}

.applause-star {
    position: absolute;
    font-size: 20px;
    animation: star-spray 1.5s ease-out forwards;
}

@keyframes star-spray {
    0% { transform: translate(0, 0) scale(0.2) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--sx), var(--sy)) scale(1.2) rotate(360deg); opacity: 0; }
}

/* Bomb Explosion Blast */
.bomb-blast-fx {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bomb-blast-core {
    font-size: 64px;
    animation: bomb-flash 0.8s ease-out forwards;
    filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.9));
}

@keyframes bomb-flash {
    0% { transform: scale(0.3); opacity: 1; }
    40% { transform: scale(1.45); opacity: 1; filter: drop-shadow(0 0 45px #f59e0b); }
    100% { transform: scale(1.1); opacity: 0.9; }
}

/* Comic Speech Taunt Bubble */
.taunt-speech-bubble {
    position: absolute;
    z-index: 1100;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.35);
    pointer-events: none;
    animation: taunt-pop-in 3.0s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.taunt-speech-bubble.bubble-opp {
    top: 65px;
    left: 50%;
    transform-origin: top center;
}

.taunt-speech-bubble.bubble-player {
    bottom: 110px;
    left: 50%;
    transform-origin: bottom center;
}

@keyframes taunt-pop-in {
    0% { opacity: 0; transform: translateX(-50%) scale(0.2); }
    12% { opacity: 1; transform: translateX(-50%) scale(1.1); }
    18% { transform: translateX(-50%) scale(1); }
    85% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-15px) scale(0.85); }
}

.reactions-popover {
    background: #0d1322 !important;
    z-index: 1500 !important;
    border: 1.5px solid var(--gold) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.4) !important;
}

.reaction-bar { z-index: 990 !important; }

.taunts-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    max-height: 160px !important;
    overflow-y: auto !important;
}

.taunt-btn {
    padding: 6px 6px !important;
    font-size: 11px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Bito and Destination Landing Bounce Animations */
.bito-bounce {
    animation: bito-landing-bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}

@keyframes bito-landing-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.18) rotate(3deg); filter: drop-shadow(0 0 16px var(--gold)); }
    100% { transform: scale(1) rotate(0deg); }
}

.dest-bounce {
    animation: dest-landing-bounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}

@keyframes dest-landing-bounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.14); filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.7)); }
    100% { transform: scale(1); }
}

.flying-card-fly {
    position: fixed !important;
    z-index: 2200 !important;
    pointer-events: none !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65) !important;
    will-change: transform !important;
}

/* ==========================================================================
   CYBER-BALATRO / NEON ARCANA LOBBY (VARIANT 2)
   ========================================================================== */

.cyber-lobby {
    position: fixed;
    inset: 0;
    z-index: 995;
    background: #06020d radial-gradient(ellipse at 50% 30%, #1e113a 0%, #110925 50%, #06020d 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    color: #f8fafc;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    opacity: 1;
    visibility: visible;
}

body.in-lobby .opponents-row,
body.in-lobby .reaction-bar,
body.in-lobby .game-table-wrap,
body.in-lobby .player-hand-section,
body.in-lobby .action-dock-container,
body.in-lobby .top-nav {
    display: none !important;
}

.cyber-lobby.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.97);
}

/* Background Cyber Grid & Glow Orbs */
.cb-bg-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.cb-cyber-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.75;
}

.cb-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.32;
    pointer-events: none;
}

.cb-glow-orb.orb-1 {
    width: 280px;
    height: 280px;
    background: #ec4899;
    top: 12%;
    left: -40px;
}

.cb-glow-orb.orb-2 {
    width: 290px;
    height: 290px;
    background: #8b5cf6;
    bottom: 18%;
    right: -50px;
}

/* Top Neon Status Bar */
.cb-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(13, 8, 24, 0.88);
    border-bottom: 1px solid rgba(168, 85, 247, 0.28);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
    gap: 8px;
}

.cb-profile-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 20, 50, 0.85);
    border: 1.5px solid rgba(168, 85, 247, 0.45);
    padding: 4px 10px 4px 4px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 175px;
}

.cb-profile-pill:hover, .cb-profile-pill:active {
    border-color: #f472b6;
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.4);
    transform: scale(1.02);
}

.cb-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.cb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e879f9, #a855f7);
    border: 1.5px solid #facc15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    overflow: hidden;
}

.cb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cb-level-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #f59e0b;
    color: #0f172a;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 6px;
    border: 1px solid #ffffff;
    line-height: 1;
}

.cb-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cb-name {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.cb-rank {
    font-size: 9.5px;
    font-weight: 700;
    color: #c084fc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.cb-arrow-mini {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 2px;
}

.cb-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cb-currency-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(30, 20, 50, 0.85);
    border: 1.5px solid rgba(250, 204, 21, 0.5);
    padding: 4px 8px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 800;
    color: #fef08a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cb-currency-pill.diamond {
    border-color: rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
}

.cb-currency-pill:active {
    transform: scale(0.96);
}

.cb-plus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    line-height: 1;
    color: #fff;
    margin-left: 2px;
}

.cb-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(30, 20, 50, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cb-icon-btn:active {
    transform: scale(0.92);
    border-color: #f472b6;
}

/* Central Arcana Stage */
.cb-arcana-stage {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px 0 10px;
    flex: 1;
    min-height: 270px;
    justify-content: center;
}

.cb-stage-title-wrap {
    text-align: center;
    margin-bottom: 6px;
}

.cb-cyber-tag {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #a855f7;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.cb-stage-title {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(244, 114, 182, 0.4);
}

.cb-fan-viewport {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 900px;
    perspective-origin: center 55%;
    user-select: none;
    touch-action: pan-y;
}

.cb-cards-fan {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.cb-arcana-card {
    position: absolute;
    width: 136px;
    height: 202px;
    border-radius: 18px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity, box-shadow;
}

.cb-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(26, 16, 48, 0.96), rgba(46, 16, 74, 0.96));
    border: 2px solid rgba(192, 132, 252, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(168, 85, 247, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    position: relative;
    overflow: hidden;
}

.cb-arcana-card::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
    transform: rotate(25deg);
    pointer-events: none;
    transition: transform 0.6s ease;
}

.cb-arcana-card.active::before {
    animation: cbSheenSweep 3.5s infinite;
}

@keyframes cbSheenSweep {
    0% { transform: translateY(-100%) rotate(25deg); }
    30%, 100% { transform: translateY(150%) rotate(25deg); }
}

.cb-card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cb-card-badge {
    font-size: 8.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.cb-card-badge.neon-cyan {
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #38bdf8;
}

.cb-card-badge.neon-pink {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(244, 114, 182, 0.6);
    color: #f472b6;
}

.cb-card-badge.neon-gold {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(250, 204, 21, 0.6);
    color: #facc15;
}

.cb-card-badge.neon-green {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.6);
    color: #34d399;
}

.cb-card-badge.neon-purple {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(192, 132, 252, 0.6);
    color: #c084fc;
}

.cb-card-roman {
    font-size: 11px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    font-family: serif;
}

.cb-card-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

.cb-card-icon-glow {
    font-size: 44px;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.6));
    animation: cbFloat 3s ease-in-out infinite alternate;
}

@keyframes cbFloat {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(4px); }
}

.cb-card-footer {
    width: 100%;
    text-align: center;
}

.cb-card-name {
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

.cb-card-sub {
    font-size: 9.5px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 3D Arcana Fan Positions */
.cb-arcana-card.active {
    transform: translateX(0) translateZ(40px) scale(1.08) rotate(0deg);
    z-index: 10;
    opacity: 1;
}

.cb-arcana-card.active .cb-card-inner {
    border-color: #f472b6;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 28px rgba(244, 114, 182, 0.55), inset 0 0 20px rgba(244, 114, 182, 0.25);
}

.cb-arcana-card.prev {
    transform: translateX(-88px) translateZ(-20px) scale(0.88) rotateY(16deg) rotateZ(-5deg);
    z-index: 4;
    opacity: 0.75;
}

.cb-arcana-card.next {
    transform: translateX(88px) translateZ(-20px) scale(0.88) rotateY(-16deg) rotateZ(5deg);
    z-index: 4;
    opacity: 0.75;
}

.cb-arcana-card.queue-left {
    transform: translateX(-155px) translateZ(-60px) scale(0.74) rotateY(24deg) rotateZ(-10deg);
    z-index: 2;
    opacity: 0.35;
    pointer-events: none;
}

.cb-arcana-card.queue-right {
    transform: translateX(155px) translateZ(-60px) scale(0.74) rotateY(-24deg) rotateZ(10deg);
    z-index: 2;
    opacity: 0.35;
    pointer-events: none;
}

.cb-arcana-card.hidden-card {
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
}

/* Nav Arrows */
.cb-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 10, 26, 0.75);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
}

.cb-nav-arrow:active {
    transform: translateY(-50%) scale(0.9);
    background: rgba(168, 85, 247, 0.3);
}

.cb-arrow-left { left: 4px; }
.cb-arrow-right { right: 4px; }

/* Dots */
.cb-dots-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.cb-dot {
    width: 7px;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
    cursor: pointer;
}

.cb-dot.active {
    width: 22px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
}

/* Details Card */
.cb-details-card {
    position: relative;
    z-index: 10;
    margin: 8px 14px 6px 14px;
    background: rgba(24, 14, 42, 0.88);
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.cb-details-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cb-details-title {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.cb-details-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #34d399;
}

.cb-details-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.35;
    margin-bottom: 0;
}

.cb-details-meta-row {
    display: flex;
    justify-content: space-between;
    background: rgba(10, 6, 20, 0.5);
    border-radius: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cb-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.cb-meta-lbl {
    color: #94a3b8;
}

.cb-meta-val {
    font-weight: 800;
    color: #fff;
}

.cb-meta-val.gold {
    color: #facc15;
}

/* Primary Action Area */
.cb-action-area {
    position: relative;
    z-index: 10;
    padding: 6px 14px 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.cb-big-play-btn {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(236, 72, 153, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cb-big-play-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 12px rgba(236, 72, 153, 0.6);
}

.cb-play-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: cbBtnShimmer 2.8s infinite;
}

@keyframes cbBtnShimmer {
    0% { left: -100%; }
    30%, 100% { left: 160%; }
}

.cb-sub-action-btn {
    background: rgba(30, 20, 50, 0.7);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cb-sub-action-btn:active {
    background: rgba(168, 85, 247, 0.25);
    color: #fff;
}

/* Bottom Navigation Bar */
.cb-bottom-dock {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 12px 14px 12px;
    background: rgba(11, 7, 20, 0.95);
    border-top: 1px solid rgba(168, 85, 247, 0.25);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.cb-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cb-nav-tab:active {
    color: #f472b6;
    transform: scale(0.92);
}

.cb-nav-icon {
    font-size: 18px;
}

.cb-nav-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Rules Modal */
.rules-modal-card {
    max-width: 360px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
}

.rules-scroll-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.rule-block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(30, 20, 50, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
}

.rule-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rule-text {
    font-size: 12.5px;
    line-height: 1.45;
    color: #cbd5e1;
}

.rule-text strong {
    color: #f8fafc;
}

@media (max-height: 700px) {
    .cb-fan-viewport {
        height: 180px;
    }
    .cb-arcana-card {
        width: 115px;
        height: 170px;
    }
    .cb-card-icon-glow {
        font-size: 34px;
    }
    .cb-big-play-btn {
        padding: 11px;
        font-size: 15px;
    }
    .cb-details-card {
        padding: 8px 10px;
        margin: 4px 10px;
    }
}


/* ==================== ONBOARDING PROFILE MODAL ==================== */
#onboardingProfileModal {
    z-index: 10005;
}

.avatar-choice-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
    padding: 0;
}
.avatar-choice-btn:active {
    transform: scale(0.92);
}
.avatar-choice-btn.active {
    border-color: #ffd700;
    background: rgba(212, 175, 55, 0.25);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
    transform: scale(1.08);
}

.style-pill-btn {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 9px 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}
.style-pill-btn:active {
    transform: scale(0.95);
}
.style-pill-btn.active {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(124, 58, 237, 0.35));
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.35);
}

.onboarding-avatar-grid::-webkit-scrollbar {
    width: 4px;
}
.onboarding-avatar-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}
.onboarding-avatar-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.4);
    border-radius: 4px;
}
.onboarding-avatar-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}


/* ==================== CARD FACES THEMES (V4 VEGAS SHOP) ==================== */
body.cardface-black-gold .playing-card:not(.face-down) {
    background: radial-gradient(circle at 50% 50%, #171821 0%, #0b0c10 100%) !important;
    border: 1.5px solid #d4af37 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), 0 0 8px rgba(212, 175, 55, 0.3) !important;
}
body.cardface-black-gold .playing-card:not(.face-down) .card-inner {
    border-color: rgba(212, 175, 55, 0.4) !important;
}
body.cardface-black-gold .playing-card:not(.face-down) .suit-black,
body.cardface-black-gold .playing-card:not(.face-down) .card-rank {
    color: #ffd700 !important;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}
body.cardface-black-gold .playing-card:not(.face-down) .suit-red {
    color: #f59e0b !important;
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

body.cardface-cyber-holo .playing-card:not(.face-down) {
    background: linear-gradient(135deg, #09090b 0%, #0f172a 100%) !important;
    border: 1.5px solid #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.45) !important;
}
body.cardface-cyber-holo .playing-card:not(.face-down) .card-inner {
    border-color: rgba(0, 240, 255, 0.35) !important;
}
body.cardface-cyber-holo .playing-card:not(.face-down) .suit-black {
    color: #00f0ff !important;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}
body.cardface-cyber-holo .playing-card:not(.face-down) .suit-red {
    color: #ff007f !important;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.7);
}

body.cardface-wild-west .playing-card:not(.face-down) {
    background: linear-gradient(135deg, #fefae0 0%, #e9edc9 50%, #d4a373 100%) !important;
    border: 1.5px solid #8b5a2b !important;
    box-shadow: 0 4px 10px rgba(78, 38, 7, 0.3) !important;
}
body.cardface-wild-west .playing-card:not(.face-down) .card-inner {
    border-color: rgba(139, 90, 43, 0.5) !important;
}
body.cardface-wild-west .playing-card:not(.face-down) .suit-black {
    color: #271c19 !important;
}
body.cardface-wild-west .playing-card:not(.face-down) .suit-red {
    color: #991b1b !important;
}

body.cardface-pixel-art .playing-card:not(.face-down) {
    background: #fdf4ff !important;
    border: 2px solid #8b5cf6 !important;
    box-shadow: 3px 3px 0px #4c1d95 !important;
    border-radius: 6px !important;
}
body.cardface-pixel-art .playing-card:not(.face-down) .card-inner {
    border: 1px dashed #c084fc !important;
}
body.cardface-pixel-art .playing-card:not(.face-down) .suit-black {
    color: #3b0764 !important;
}
body.cardface-pixel-art .playing-card:not(.face-down) .suit-red {
    color: #ec4899 !important;
}

/* ==================== VIP VEGAS CLUB STYLES ==================== */
.is-vip-user #userAvatar,
.is-vip-user #tgAvatar,
.is-vip-user .profile-avatar-box,
.vip-avatar-glow {
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.75), inset 0 0 8px rgba(255, 215, 0, 0.5) !important;
    animation: vipPulseGlow 2.5s infinite ease-in-out !important;
}

@keyframes vipPulseGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6), inset 0 0 6px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.95), inset 0 0 12px rgba(255, 215, 0, 0.6); }
}

.vip-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    color: #0b0f19;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.vip-golden-name {
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 45%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* ==================== TABLE REACTIONS & THROWABLES ==================== */
.btn-table-reactions {
    position: absolute;
    right: 12px;
    bottom: 85px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(255, 215, 0, 0.45);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 10px rgba(245, 158, 11, 0.25);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.2s;
    backdrop-filter: blur(8px);
}
.btn-table-reactions:active {
    transform: scale(0.92);
}

.table-reactions-tray {
    position: absolute;
    right: 12px;
    bottom: 136px;
    display: none;
    flex-direction: row;
    gap: 6px;
    background: rgba(11, 15, 25, 0.94);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    border-radius: 24px;
    padding: 6px 10px;
    z-index: 125;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(12px);
    animation: traySlideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.table-reactions-tray.active {
    display: flex;
}

@keyframes traySlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.throw-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}
.throw-btn:active {
    transform: scale(0.85);
    background: rgba(255, 215, 0, 0.2);
}

.throw-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e11d48;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 8px;
    border: 1px solid #fff;
    line-height: 1;
}
.throw-badge.unlimited {
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    color: #000;
}

/* Flying projectile */
.flying-projectile {
    position: fixed;
    pointer-events: none;
    z-index: 10005;
    font-size: 34px;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
    transition: left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), top 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.55s ease-out;
}

/* Splat impact effects on avatar */
.splat-fx {
    position: absolute;
    inset: -6px;
    pointer-events: none;
    z-index: 10006;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: splatPop 0.85s forwards ease-out;
}

@keyframes splatPop {
    0% { transform: scale(0.3); opacity: 0; }
    30% { transform: scale(1.3) rotate(-10deg); opacity: 1; }
    80% { transform: scale(1.0) rotate(5deg); opacity: 0.9; }
    100% { transform: scale(0.8) translateY(12px); opacity: 0; }
}

@keyframes tableShakeAnim {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-6px, 4px) rotate(-1deg); }
    40% { transform: translate(5px, -5px) rotate(1deg); }
    60% { transform: translate(-4px, 3px); }
    80% { transform: translate(3px, -2px); }
}
.table-shake {
    animation: tableShakeAnim 0.45s ease-in-out !important;
}
