/**
 * OLAMI Multiplayer — Lobby & Table Styles
 * Matches mockup: dark premium casino theme
 */

/* Dark theme for lobby and table views (mockup) */
.arena-games-dark {
    background: #0f0f1a;
    min-height: 100vh;
    padding: 24px;
}

.arena-games-dark .arena-front-header {
    background: #1a1a2e;
    margin: -24px -24px 24px -24px;
    padding: 20px 24px;
    border-radius: 0 0 16px 16px;
}

.arena-games-dark .arena-back-link {
    color: rgba(255,255,255,0.8);
}

.arena-games-dark .arena-back-link:hover {
    color: #fff;
}

.arena-games-dark .arena-wallet,
.arena-games-dark .wallet-balance {
    color: #ffd700;
}

.mp-lobby,
.mp-table-view {
    font-family: var(--font-sans);
    max-width: 1000px;
    margin: 0 auto;
}

/* ─── Dark Lobby (Mockup) ───────────────────────────────────────── */
.mp-lobby-dark,
.mp-lobby-wrap {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.9) 0%, rgba(20, 20, 34, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.08);
}

.mp-lobby-hero {
    text-align: center;
    margin-bottom: 28px;
}

.mp-lobby-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.mp-lobby-hero p {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.65);
}

.mp-lobby-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.mp-lobby-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-lobby-tabs,
.mp-tabs {
    display: flex;
    gap: 8px;
}

/* Reset theme overrides — span buttons avoid theme button styles */
.mp-btn-el, .mp-tab {
    all: unset;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.mp-tab {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-tab:hover {
    background: rgba(255,255,255,0.08);
    color: #f5f5f7;
    transform: translateY(-1px);
}

.mp-tab.active {
    background: rgba(180, 31, 81, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.mp-create-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #c44569 100%);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(180, 31, 81, 0.3);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-refresh-btn {
    padding: 10px 16px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-refresh-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.mp-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(180, 31, 81, 0.5);
}

/* Multiplayer tables list — match mockup identically */
.mp-tables-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mp-table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mp-table-row:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
    border-color: rgba(180, 31, 81, 0.3);
}

.mp-table-game {
    font-weight: 700;
    min-width: 120px;
    font-size: 14px;
    color: #f5f5f7;
}

.mp-table-players {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
}

.mp-table-min {
    font-size: 12px;
    color: #ffd60a;
}

.mp-table-host {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    flex: 1;
}

.mp-join-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #c44569 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(180, 31, 81, 0.3);
}

.mp-join-btn:hover {
    opacity: 0.95;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(180, 31, 81, 0.45);
}

.mp-loading,
.mp-empty {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
}

/* Modals — Create Table & Join Table (forced dark, high-contrast) */
.mp-create-modal,
.mp-join-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.mp-create-modal .mp-modal-inner,
.mp-join-modal .mp-modal-inner {
    background: #1e1e2e !important;
    padding: 28px !important;
    border-radius: 16px !important;
    max-width: 400px !important;
    width: 90% !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5) !important;
}

.mp-create-modal .mp-modal-inner h3,
.mp-join-modal .mp-modal-inner h3 {
    margin: 0 0 20px !important;
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 700 !important;
}

.mp-create-modal .mp-form-group label,
.mp-join-modal .mp-form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #e8e8ed !important;
    font-size: 14px !important;
}

.mp-create-modal .mp-form-group input,
.mp-create-modal .mp-form-group select,
.mp-join-modal .mp-form-group input,
.mp-join-modal .mp-form-group select {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: #2a2a3c !important;
    color: #fff !important;
}

.mp-create-modal .mp-form-group select option,
.mp-join-modal .mp-form-group select option {
    background: #2a2a3c !important;
    color: #fff !important;
}

.mp-create-modal .mp-hint,
.mp-join-modal .mp-hint,
.mp-join-modal .mp-join-info {
    display: block !important;
    margin-top: 6px !important;
    font-size: 13px !important;
    color: #a0a0b0 !important;
}

.mp-create-modal .mp-modal-actions,
.mp-join-modal .mp-modal-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 24px !important;
}

.mp-create-modal .mp-btn,
.mp-join-modal .mp-btn {
    padding: 14px 24px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    flex: 1 !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mp-create-modal .mp-btn-primary,
.mp-join-modal .mp-btn-primary {
    background: var(--primary, #7c3aed) !important;
    color: #fff !important;
    border: none !important;
}

.mp-create-modal .mp-btn-secondary,
.mp-join-modal .mp-btn-secondary {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
}

/* Table view */
.mp-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.mp-back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 600;
}

.mp-back-link:hover { color: #fff; }

.mp-leave-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(255,255,255,0.2);
    margin-left: auto;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-leave-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.mp-table-wallet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(145deg, rgba(255,213,79,0.12) 0%, rgba(255,213,79,0.06) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255,213,79,0.25);
    color: #ffd54f;
    font-weight: 800;
    font-size: 16px;
}

.mp-table-felt {
    min-height: 500px;
    background:
        radial-gradient(ellipse 140% 120% at 50% 30%, #117a48 0%, #0a5230 40%, #063d22 70%, #042918 100%),
        repeating-radial-gradient(circle at 20% 30%, rgba(0,0,0,0.03) 0%, transparent 1px),
        repeating-radial-gradient(circle at 80% 70%, rgba(0,0,0,0.02) 0%, transparent 1px);
    border-radius: 32px;
    padding: 36px;
    position: relative;
    border: 12px solid #3d2817;
    box-shadow:
        inset 0 0 100px rgba(0,0,0,0.35),
        inset 0 2px 0 rgba(255,255,255,0.08),
        0 0 0 2px #2a1c10,
        0 12px 40px rgba(0,0,0,0.6);
}
.mp-table-felt::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    pointer-events: none;
}
.mp-table-felt::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none;
}

.mp-dealer-zone,
.mp-center,
.mp-pot,
.mp-community {
    text-align: center;
    margin-bottom: 28px;
}
.mp-community .mp-zone-label {
    display: block;
    margin-bottom: 8px;
}
.mp-community-cards {
    justify-content: center;
    margin-top: 4px;
}

.mp-zone-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mp-cards,
.mp-seat-cards {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.mp-card {
    width: 62px;
    height: 88px;
    background: linear-gradient(165deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow:
        0 6px 20px rgba(0,0,0,0.4),
        0 3px 6px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,0.05);
    position: relative;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.08);
}
.mp-card-rank {
    font-size: 17px;
    line-height: 1;
    letter-spacing: -0.5px;
}
.mp-card-suit {
    font-size: 26px;
    margin-top: 4px;
    line-height: 1;
}
.mp-card-red { color: #b91c3c; }
.mp-card-black { color: #111827; }

/* Card entrance animation — only when new cards appear */
.game-card {
    animation: mpCardIn 0.45s cubic-bezier(0.34, 1.3, 0.64, 1) backwards;
}
.game-card:nth-child(1) { animation-delay: 0.02s; }
.game-card:nth-child(2) { animation-delay: 0.06s; }
.game-card:nth-child(3) { animation-delay: 0.1s; }
.game-card:nth-child(4) { animation-delay: 0.14s; }
.game-card:nth-child(5) { animation-delay: 0.18s; }
.game-card:nth-child(6) { animation-delay: 0.22s; }
.game-card:nth-child(7) { animation-delay: 0.26s; }
@keyframes mpCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card back — premium casino style */
.mp-card-back {
    background: linear-gradient(145deg, #1a3a6e 0%, #0f2444 50%, #0a1830 100%);
    border: 2px solid #2d4a7a;
    color: transparent;
    box-shadow:
        0 6px 20px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(0,0,0,0.3);
}
.mp-card-back::before {
    content: '';
    position: absolute;
    inset: 8px;
    background:
        linear-gradient(135deg, transparent 48%, rgba(255,255,255,0.04) 50%, transparent 52%),
        repeating-linear-gradient(45deg, transparent 0px, transparent 4px, rgba(255,255,255,0.03) 4px, rgba(255,255,255,0.03) 8px);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events: none;
}
.mp-card-back::after {
    content: '♠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: rgba(255,255,255,0.15);
    pointer-events: none;
}

.mp-card-placeholder {
    color: rgba(255,255,255,0.4);
}

.mp-center {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mp-pot {
    font-size: 26px;
    font-weight: 800;
    color: #ffd54f;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,213,79,0.15);
}
.mp-pot-amount { font-variant-numeric: tabular-nums; }
.mp-pot-amount.pulse { animation: mpPotPulse 0.5s ease-out; }
@keyframes mpPotPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #22c55e; }
    100% { transform: scale(1); }
}
.mp-coin-icon { font-size: 0.9em; opacity: 0.95; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

.mp-players-zone {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.mp-seat {
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.4) 100%);
    border-radius: 18px;
    padding: 18px 28px;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.mp-seat.folded { opacity: 0.6; }
.mp-seat-turn {
    border-color: rgba(255,213,79,0.5);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 2px rgba(255,213,79,0.25);
}

.mp-seat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary, #7c3aed) 0%, #5b21b6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 12px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.2);
}

.mp-seat-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.mp-seat-chips {
    font-size: 14px;
    color: #ffd700;
    font-weight: 600;
}

.mp-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 28px;
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.4) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

.mp-action-btn {
    padding: 14px 24px;
    background: linear-gradient(145deg, var(--primary, #7c3aed) 0%, #6d28d9 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.mp-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}

.mp-action-btn-danger {
    background: linear-gradient(145deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

.mp-action-btn-danger:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.mp-raise-input {
    width: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 14px;
}

.mp-table-timer {
    text-align: center;
    margin-top: 14px;
    padding: 10px 20px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 10px;
    color: rgba(255,255,255,0.95);
    font-weight: 700;
    font-size: 15px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.mp-error {
    color: #f87171;
    padding: 24px;
    text-align: center;
}

/* Round result overlay — winner announcement */
.mp-round-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: mpOverlayIn 0.35s ease-out;
}
@keyframes mpOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.mp-round-result-modal {
    background: linear-gradient(180deg, #1e1e2e 0%, #16162a 100%);
    border-radius: 24px;
    padding: 36px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    border: 2px solid rgba(255,213,79,0.3);
    box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
    animation: mpModalIn 0.5s cubic-bezier(0.34, 1.3, 0.64, 1);
}
@keyframes mpModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.mp-round-result-modal.win {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 60px rgba(34, 197, 94, 0.25);
}
.mp-round-result-modal.loss {
    border-color: rgba(239, 68, 68, 0.3);
}
.mp-round-result-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}
.mp-round-result-winner {
    font-size: 28px;
    font-weight: 800;
    color: #ffd54f;
    margin-bottom: 8px;
}
.mp-round-result-hand {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}
.mp-round-result-pot {
    font-size: 22px;
    font-weight: 800;
    color: #22c55e;
}
.mp-round-result-cards {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}
.mp-round-result-modal .mp-card {
    animation: mpCardReveal 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) backwards;
}
.mp-round-result-modal .mp-card:nth-child(1) { animation-delay: 0.1s; }
.mp-round-result-modal .mp-card:nth-child(2) { animation-delay: 0.2s; }
.mp-round-result-modal .mp-card:nth-child(3) { animation-delay: 0.3s; }
.mp-round-result-modal .mp-card:nth-child(4) { animation-delay: 0.4s; }
.mp-round-result-modal .mp-card:nth-child(5) { animation-delay: 0.5s; }
@keyframes mpCardReveal {
    from { opacity: 0; transform: rotateY(-90deg) scale(0.8); }
    to { opacity: 1; transform: rotateY(0) scale(1); }
}
.mp-round-result-dismiss {
    margin-top: 24px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mp-round-result-dismiss:hover {
    background: rgba(255,255,255,0.15);
}

/* Blackjack multi-result */
.mp-round-result-bj-list {
    text-align: left;
    margin: 16px 0;
    max-height: 200px;
    overflow-y: auto;
}
.mp-round-result-bj-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    border-left: 4px solid rgba(255,255,255,0.2);
}
.mp-round-result-bj-item.win { border-left-color: #22c55e; }
.mp-round-result-bj-item.loss { border-left-color: #ef4444; }
.mp-round-result-bj-item.push { border-left-color: #f59e0b; }
.mp-round-result-bj-item.blackjack { border-left-color: #a78bfa; }
.mp-round-result-bj-item.mp-result-you { background: rgba(34, 197, 94, 0.15); border-left-color: #22c55e; }

/* Phase announcement banner */
.mp-phase-announcement {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    padding: 16px 32px;
    background: rgba(0,0,0,0.85);
    border-radius: 12px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.mp-phase-announcement.visible {
    opacity: 1;
    animation: mpPhasePulse 0.6s ease-out;
}
.mp-phase-announcement.mp-phase-turn.visible {
    background: linear-gradient(135deg, rgba(255,213,79,0.25) 0%, rgba(124, 58, 237, 0.3) 100%);
    border: 2px solid rgba(255,213,79,0.6);
    box-shadow: 0 0 30px rgba(255,213,79,0.3);
}
@keyframes mpPhasePulse {
    0% { transform: translate(-50%, -50%) scale(0.95); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Card flip animation for showdown */
.mp-card-flip {
    animation: mpCardFlip 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}
@keyframes mpCardFlip {
    from { transform: rotateY(-90deg); opacity: 0.5; }
    to { transform: rotateY(0); opacity: 1; }
}

/* Toast for feedback */
.mp-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 24px;
    background: rgba(0,0,0,0.9);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.mp-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Game choice buttons - mockup style */
.mp-game-choice {
    display: flex;
    gap: 12px;
    margin: 14px 20px 20px;
}

.mp-game-choice .mp-btn-solo,
.mp-game-choice .mp-btn-multi,
.mp-game-choice .game-play-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    margin: 0 !important;
}

.mp-btn-solo {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
}

.mp-btn-multi {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: #fff !important;
}

a.mp-btn-multi,
a.game-play-btn.mp-btn-multi {
    text-decoration: none !important;
    pointer-events: auto;
}

/* ─── Position Badges (D / SB / BB) ────────────────────────── */
.mp-seat-badges {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 6px;
    min-height: 22px;
}
.mp-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 22px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.mp-pos-d {
    background: linear-gradient(135deg, #ffd60a, #f59e0b);
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(255, 214, 10, 0.35);
}
.mp-pos-sb {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}
.mp-pos-bb {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

/* ─── "YOU" Tag ───────────────────────────────────────────── */
.mp-you-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--primary, #7c3aed);
    color: #fff;
    vertical-align: middle;
    margin-left: 4px;
}

/* ─── Own Seat Highlight ──────────────────────────────────── */
.mp-seat-me {
    border-color: rgba(124, 58, 237, 0.45) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* ─── Turn Indicator (hourglass) ──────────────────────────── */
.mp-turn-indicator {
    font-size: 22px;
    animation: mpTurnPulse 1.2s ease-in-out infinite;
    margin-bottom: 4px;
}
@keyframes mpTurnPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* ─── Seat Bet Display ────────────────────────────────────── */
.mp-seat-bet {
    font-size: 12px;
    font-weight: 700;
    color: #ffd60a;
    margin-top: 4px;
    padding: 2px 10px;
    background: rgba(255, 214, 10, 0.12);
    border-radius: 8px;
    display: inline-block;
}

/* ─── Hand Value Display (Blackjack) ─────────────────────── */
.mp-hand-value {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
}
.mp-hand-value.blackjack {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(124, 58, 237, 0.3));
    border-color: rgba(167, 139, 250, 0.5);
    color: #c4b5fd;
    animation: mpBJGlow 1.5s ease-in-out infinite alternate;
}
@keyframes mpBJGlow {
    from { box-shadow: 0 0 8px rgba(167, 139, 250, 0.3); }
    to { box-shadow: 0 0 20px rgba(167, 139, 250, 0.5); }
}
.mp-hand-value.bust {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    text-decoration: line-through;
}
.mp-hand-value.dealer-val {
    margin-top: 8px;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
}

/* ─── Seat Status Labels ─────────────────────────────────── */
.mp-seat-status {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.mp-seat-status.fold {
    background: rgba(107, 114, 128, 0.25);
    color: rgba(255,255,255,0.5);
}
.mp-seat-status.bust {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.mp-seat-status.stood {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}
.mp-seat-status.allin-label {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.2));
    color: #fcd34d;
    animation: mpAllInPulse 1s ease-in-out infinite alternate;
}
@keyframes mpAllInPulse {
    from { box-shadow: none; }
    to { box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }
}

/* ─── All-in seat style ──────────────────────────────────── */
.mp-seat.allin {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* ─── Turn Info Bar ───────────────────────────────────────── */
.mp-turn-bar {
    text-align: center;
    padding: 10px 20px;
    margin: 16px auto;
    max-width: 400px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}
.mp-turn-bar.mp-your-turn {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.15), rgba(124, 58, 237, 0.15));
    border-color: rgba(255, 214, 10, 0.4);
    color: #ffd60a;
    animation: mpYourTurnGlow 1.5s ease-in-out infinite alternate;
}
@keyframes mpYourTurnGlow {
    from { box-shadow: 0 0 10px rgba(255, 214, 10, 0.15); }
    to { box-shadow: 0 0 25px rgba(255, 214, 10, 0.3); }
}

/* ─── Hidden Cards Indicator ──────────────────────────────── */
.mp-cards-hidden-count {
    font-size: 24px;
    opacity: 0.5;
    letter-spacing: 4px;
}

/* ─── Deal Button ─────────────────────────────────────────── */
.mp-deal-btn {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255,255,255,0.2) !important;
    font-size: 16px !important;
    padding: 16px 32px !important;
}
.mp-deal-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.5), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

/* ─── Share Button ────────────────────────────────────────── */
.mp-share-btn {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    box-shadow: none !important;
}
.mp-share-btn:hover {
    background: rgba(255,255,255,0.15) !important;
}

/* ─── Waiting Message ─────────────────────────────────────── */
.mp-waiting-msg {
    padding: 12px 24px;
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
}

/* ─── Raise Group ─────────────────────────────────────────── */
.mp-raise-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mp-raise-group .mp-raise-input {
    width: 90px;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}
.mp-raise-group .mp-raise-input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* ─── Action Button Colors ────────────────────────────────── */
/* Blackjack */
.mp-action-hit {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.mp-action-stand {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.mp-action-double {
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* Poker */
.mp-action-fold {
    background: linear-gradient(145deg, #6b7280 0%, #4b5563 100%) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.mp-action-check {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.mp-action-call {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.mp-action-raise {
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.mp-action-allin {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hover lift on all colored action buttons */
.mp-action-hit:hover,
.mp-action-stand:hover,
.mp-action-double:hover,
.mp-action-fold:hover,
.mp-action-check:hover,
.mp-action-call:hover,
.mp-action-raise:hover,
.mp-action-allin:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Disabled state */
.mp-action-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    filter: none !important;
}

/* ─── Timer Enhancements ──────────────────────────────────── */
.mp-timer-mine {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(255, 214, 10, 0.1) 100%) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    color: #ffd60a !important;
    font-size: 17px !important;
}
.mp-timer-urgent {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
    animation: mpTimerUrgent 0.5s ease-in-out infinite alternate !important;
}
@keyframes mpTimerUrgent {
    from { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
    to { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
}

/* ─── Join at Table Button ────────────────────────────────── */
.mp-join-at-table-btn {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255,255,255,0.2) !important;
    font-size: 16px !important;
    padding: 16px 32px !important;
}

/* ─── Waiting Text ────────────────────────────────────────── */
.mp-waiting-text {
    color: rgba(255,255,255,0.4);
    font-style: italic;
    font-size: 14px;
}

/* ============================================================
   MOBILE RESPONSIVE — Table Felt & Game UI
   ============================================================ */
@media (max-width: 768px) {
    /* Table felt: tighter on mobile */
    .mp-table-felt {
        padding: 20px 14px;
        border-radius: 20px;
        border-width: 6px;
        min-height: 350px;
    }
    .mp-table-felt::before { inset: 4px; border-radius: 14px; }
    .mp-table-felt::after { inset: 6px; border-radius: 12px; }

    /* Cards slightly smaller */
    .mp-card {
        width: 50px;
        height: 72px;
        border-radius: 8px;
    }
    .mp-card-rank { font-size: 14px; }
    .mp-card-suit { font-size: 20px; margin-top: 2px; }

    /* Players zone: wraps to rows */
    .mp-players-zone {
        gap: 12px;
    }
    .mp-seat {
        padding: 12px 16px;
        border-radius: 14px;
        min-width: 120px;
        flex: 1 1 auto;
    }
    .mp-seat-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-bottom: 8px;
    }
    .mp-seat-name { font-size: 12px; }
    .mp-seat-chips { font-size: 12px; }

    /* Pot smaller */
    .mp-pot { font-size: 20px; }
    .mp-center { font-size: 16px; }

    /* Actions bar: full-width, wrap */
    .mp-table-actions {
        padding: 14px 12px;
        gap: 8px;
        border-radius: 12px;
    }
    .mp-action-btn {
        padding: 12px 16px;
        font-size: 13px;
        flex: 1 1 auto;
        min-width: 0;
    }
    .mp-deal-btn {
        padding: 14px 20px !important;
        font-size: 14px !important;
    }
    .mp-raise-group {
        flex: 1 1 100%;
    }
    .mp-raise-group .mp-raise-input {
        flex: 1;
        width: auto;
    }

    /* Timer: full-width */
    .mp-table-timer {
        font-size: 13px;
        padding: 8px 14px;
    }

    /* Lobby controls: stack */
    .mp-lobby-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .mp-lobby-actions { justify-content: center; }

    /* Table header */
    .mp-table-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .mp-table-wallet { font-size: 14px; padding: 8px 14px; }

    /* Round result modal */
    .mp-round-result-modal {
        padding: 24px 20px;
    }
    .mp-round-result-winner { font-size: 22px; }
    .mp-round-result-pot { font-size: 18px; }
}

@media (max-width: 480px) {
    .mp-table-felt {
        padding: 14px 10px;
        border-radius: 16px;
        border-width: 4px;
        min-height: 300px;
    }
    .mp-card {
        width: 42px;
        height: 60px;
        border-radius: 6px;
    }
    .mp-card-rank { font-size: 12px; }
    .mp-card-suit { font-size: 16px; margin-top: 1px; }

    .mp-seat {
        padding: 10px 12px;
        min-width: 100px;
    }
    .mp-seat-avatar {
        width: 34px;
        height: 34px;
        font-size: 14px;
        margin-bottom: 6px;
    }
    .mp-pos-badge {
        width: 22px;
        height: 18px;
        font-size: 8px;
    }
    .mp-hand-value { font-size: 12px; padding: 2px 8px; }
    .mp-seat-status { font-size: 8px; padding: 2px 6px; }
    .mp-turn-bar { font-size: 12px; padding: 8px 14px; }

    .mp-table-actions {
        flex-direction: column;
        padding: 10px;
    }
    .mp-action-btn {
        width: 100%;
        padding: 14px;
    }
    .mp-raise-group {
        width: 100%;
    }

    /* Lobby */
    .mp-table-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .mp-table-host { flex: none; }
}
