* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.card-suit-icon {
    width: 64px;
    height: 64px;
    background: url('/static/assets/suits_sprite_128px.png') no-repeat;
    background-size: 256px 64px; /* Half the original sprite size */
    position: absolute;
    bottom: 0px;
}

.hearts .card-suit-icon { background-position: 0 0; }
.diamonds .card-suit-icon { background-position: -64px 0; }
.clubs .card-suit-icon { background-position: -128px 0; }
.spades .card-suit-icon { background-position: -192px 0; }

.bot-card-suit-icon {
    width: 24px;
    height: 24px;
    background: url('/static/assets/suits_sprite_128px.png') no-repeat;
    background-size: 96px 24px; /* Scale sprite down proportionally */
    position: absolute;
    bottom: 0px;
}

.hearts .bot-card-suit-icon { background-position: 0 0; }
.diamonds .bot-card-suit-icon { background-position: -24px 0; }
.clubs .bot-card-suit-icon { background-position: -48px 0; }
.spades .bot-card-suit-icon { background-position: -72px 0; }

.community-card-suit-icon {
    width: 32px;
    height: 32px;
    background: url('/static/assets/suits_sprite_128px.png') no-repeat;
    background-size: 128px 32px; /* Scale sprite down proportionally */
    position: absolute;
    bottom: 0px;
}

.hearts .community-card-suit-icon { background-position: 0 0; }
.diamonds .community-card-suit-icon { background-position: -32px 0; }
.clubs .community-card-suit-icon { background-position: -64px 0; }
.spades .community-card-suit-icon { background-position: -96px 0; }

/* Footer Bar */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border-top: 1px solid #444;
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 40px;
    z-index: 100;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.footer-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    border-radius: 4px;
}

.footer-label {
    font-size: 10px;
    font-weight: 500;
    color: #aaa;
}


/* Primary Engine Body */
.game-container {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.table-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    text-align: center;
    background: transparent;
    border: none;
    padding: 15px 20px;
    min-width: 120px;
    gap: 3px;
}

.pot-display {
    display: flex;
    width: 50%;
    background: linear-gradient(145deg, #ffd700, #D4B500);
    border: 2px solid #1a1a1a;
    align-items: center;
    justify-content: center;
}

.player-contributions-container {
    display: flex;
    gap: 1px;
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10000;
}

.contribution-circle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    position: relative;
    transition: all 0.3s ease;
}

.contribution-circle.inactive {
    background: #333;
    opacity: 0.5;
    filter: grayscale(100%);
}

.contribution-circle.all-in {
    background: #dc2626;
    border: 2px solid #ef4444;
    animation: all-in-pulse 2s ease-in-out infinite;
}

@keyframes all-in-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 0 10px rgba(220, 38, 38, 1);
    }
}

.player-contribution {
    font-size: 32px;
    font-weight: 700;
    color: white;
    transition: color 0.3s ease;
}



.pot-display-container {
    display: flex;
    gap: 1px;
}
.pot-circle {
    height: 25px;
    background: black;
    width: 100px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    position: relative;
    background-color: gold;
    border: 1px solid black;
}

.pot-circle.active {
    display: flex;
}

.main-pot.active {
    border-color: black;
}

.pot-dollar {
    font-size: 20px;
    font-weight: 400;
    color: black;
    margin-right: 2px;
}

.pot-amount {
    font-size: 20px;
    font-weight: 700;
    color: black;
}

.pot-odds {
    padding: 3px;
    height: 21px;
    z-index: 999;
    color: #999;
}
.pot-circle.pot-distributing {
    animation: potToWinner 0.8s ease-in-out;
}
@keyframes potToWinner {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}
.winner-popup-subtitle {
    font-size: 0.8em;
    color: #888;
    margin-top: 2px;
}
/* Community cards container */
.community-cards-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    padding: 15px;
    border-radius: 8px;
}

.community-cards {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    padding-left: 20px;
}
.card-slot.flop-1,
.card-slot.dealt-card.flop-1 {
    z-index: 1;
    position: relative;
}

.card-slot.flop-2,
.card-slot.dealt-card.flop-2 {
    z-index: 2;
    top: -5px;
    left: -5px;
    position: relative;
}

.card-slot.flop-3,
.card-slot.dealt-card.flop-3 {
    z-index: 3;
    top: -10px;
    left: -10px;
    position: relative;
}

.card-slot.turn,
.card-slot.dealt-card.turn {
    z-index: 2;
    top: -5px;
    left: -15px;
    position: relative;
}

.card-slot.river,
.card-slot.dealt-card.river {
    z-index: 1;
    left: -20px;
    position: relative;
}

.card-slot {
    width: 70px;
    height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #fff;
}

.card-slot.dealt-card {
    background: #f1f1f1;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-slot .card-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.card-slot .rank {
    font-size: 35px;
    display: flex;
    position: absolute;
    top: 0px;
    left: 4px;
    font-weight: 700;
    color: #1a1a1a;
    z-index: 2;
}

.card-slot .suit {
    font-size: 65px;
    display: flex;
    font-weight: 700;
    z-index: 1;
}

/* Suit colors for community cards */
.card-slot .card-content.hearts .rank,
.card-slot .card-content.hearts .suit {
    color: #EA0700;
}
.card-slot .card-content.diamonds .rank,
.card-slot .card-content.diamonds .suit {
    color: #EA0700;
}
.card-slot .card-content.clubs .rank,
.card-slot .card-content.clubs .suit {
    color: #1a1a1a;
}
.card-slot .card-content.spades .rank,
.card-slot .card-content.spades .suit {
    color: #1a1a1a;
}

.player-position {
    position: absolute;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.player-seat {
    width: 100%;
    height: 100%;
    background: #333;
    border: 3px solid #666;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    padding: 8px;
}

.player-seat.current-actor {
    border-color: #ff6b35 !important;
    transform: scale(1.05);
    animation: current-actor-glow 2s ease-in-out infinite;
}

@keyframes current-actor-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.7);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 53, 1);
    }
}

/* Decision feedback classes */
.player-seat.decision-call {
    border-color: #28a745 !important;
    transform: scale(1.05);
    animation: decision-call-glow 1s ease-in-out;
}

.player-seat.decision-fold {
    border-color: #007bff !important;
    transform: scale(1.05);
    animation: decision-fold-glow 1s ease-in-out;
}

.player-seat.decision-raise {
    border-color: #dc3545 !important;
    transform: scale(1.05);
    animation: decision-raise-glow 1s ease-in-out;
}

.player-seat.decision-allin {
    border-color: #8b0000 !important;
    transform: scale(1.05);
    animation: decision-allin-glow 1s ease-in-out;
}

/* Decision glow animations */
@keyframes decision-call-glow {
    0% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.7); }
    50% { box-shadow: 0 0 40px rgba(40, 167, 69, 1); }
    100% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.3); }
}

@keyframes decision-fold-glow {
    0% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.7); }
    50% { box-shadow: 0 0 40px rgba(0, 123, 255, 1); }
    100% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.3); }
}

@keyframes decision-raise-glow {
    0% { box-shadow: 0 0 20px rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 40px rgba(220, 53, 69, 1); }
    100% { box-shadow: 0 0 20px rgba(220, 53, 69, 0.3); }
}

@keyframes decision-allin-glow {
    0% { box-shadow: 0 0 20px rgba(139, 0, 0, 0.7); }
    50% { box-shadow: 0 0 40px rgba(139, 0, 0, 1); }
    100% { box-shadow: 0 0 20px rgba(139, 0, 0, 0.3); }
}

.player-seat.hero {
    border-color: #4a90a4;
    box-shadow: 0 0 8px rgba(74, 144, 164, 0.3);
}

.player-seat.folded {
    opacity: 0.4;
    filter: grayscale(100%);
}

.player-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 3px;
    color: #fff;
}

.player-stack {
    font-size: 12px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 400;
}

.player-cards {
    position: absolute;
    top: -21px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 15;
}

/* Bot cards - smaller, positioned at top of circle */
.card-back, .card {
    width: 28px;
    height: 40px;
    border: 1px solid #999;
    border-radius: 3px;
    background: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card {
    background: #fff;
    color: #000;
    border-color: #999;
    overflow: hidden;
}

/* Hero Cards */
.hero-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-cards {
    display: flex;
}

.hero-cards .card {
    width: 70px;
    height: 100px;
    border: 1px solid black;
    border-radius: 5px;
    background: #f1f1f1;
    color: #1a1a1a;
    display: flex;
    position: relative;
}

.hero-cards .card-back {
    width: 70px;
    height: 100px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #333;
    border-radius: 3px;
}

/* Card rank - large, centered, white */
.card-rank {
    font-size: 35px;
    display: flex;
    position: absolute;
    top: 0px;
    left: 4px;
    font-weight: 700;
    color: #1a1a1a;
    z-index: 2;
}

/* Card suit - behind rank, slightly offset */
.card-suit {
    font-size: 65px;
    display: flex;
    position: absolute;
    bottom: 0px;
    font-weight: 700;
    z-index: 1;
}

/* Suit colors - GTO Wizard inspired */
.card.hearts .card-rank,
.card.hearts .card-suit {
    color: #EA0700;

}
.card.diamonds .card-rank,
.card.diamonds .card-suit {
    color: #EA0700;
}
.card.clubs .card-rank,
.card.clubs .card-suit {
    color: #1a1a1a;
}
.card.spades .card-rank,
.card.spades .card-suit {
    color: #1a1a1a;
}
.hero-cards.folded .card,
.card.folded {
    opacity: 0.4;
    filter: grayscale(50%);
    position: relative;
}

.hero-cards.folded .card::after,
.card.folded::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.player-bet {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(68, 68, 68, 0.9);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: none;
}

/* Dealer button for each seat */
.dealer-button {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border: 2px solid #333;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: all 0.3s ease;
}

.dealer-button.active {
    display: flex;
}

/* Pot chips for each seat */
.pot-chips {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #0369a1;
    border: 2px solid #0c4a6e;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 10px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 20;
    transition: all 0.3s ease;
}

.pot-chips.show {
    display: flex;
}

/* Desktop seat positions */
.seat-1 { top: 0%; left: 70%; }
.seat-2 { top: 25%; left: 100%; }
.seat-3 { top: 67%; left: 100%; }
.seat-4 { top: 100%; left: 85%; }
.seat-5 { top: 100%; left: 50%; }
.seat-6 { top: 100%; left: 15%; }
.seat-7 { top: 60%; left: 0%; }
.seat-8 { top: 15%; left: 5%; }
.seat-9 { top: 0%; left: 30%; }

/* Seat-specific positioning for dealer buttons */
.seat-1 .dealer-button { bottom: -25px; left: 10px; }
.seat-2 .dealer-button { bottom: 0px; left: -20px; }
.seat-3 .dealer-button { top: 0px; left: -25px; }
.seat-4 .dealer-button { top: -50px; left: 20px; }
.seat-5 .dealer-button { top: -35px; left: 55px; }
.seat-6 .dealer-button { top: -50px; left: 45px; }
.seat-7 .dealer-button { top: 10px; left: 100px; }
.seat-8 .dealer-button { bottom: -20px; left: 70px; }
.seat-9 .dealer-button { bottom: -25px; left: 10px; }

/* Seat-specific positioning for pot chips */
.seat-1 .pot-chips { bottom: -40px; left: 40px; }
.seat-2 .pot-chips { top: 40px; left: -40px; }
.seat-3 .pot-chips { top: 40px; left: -40px; }
.seat-4 .pot-chips { top: -20px; left: -15px; }
.seat-5 .pot-chips { top: -40px; left: 10px; }
.seat-6 .pot-chips { top: -40px; left: 80px; }
.seat-7 .pot-chips { top: 40px; right: -40px; }
.seat-8 .pot-chips { top: 50px; right: -40px; }
.seat-9 .pot-chips { bottom: -40px; left: 40px; }

/* Action Panel */
.action-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    bottom: 40px;
    left: 0px;
    padding: 5px;
    max-width: none;
    background: transparent;
    border: none;
}

.action-panel-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.left-action-container,
.right-action-container {
    display: flex;
    flex-direction: column;
    width: 100px;
    height: 100px;
    gap: 6px;
}

.left-action-container {
    justify-content: space-evenly;
}

.right-action-container {
    justify-content: space-evenly;
}

/* Button styling */
.left-action-container .action-btn {
    width: 100%;
    height: 30px;
    font-size: 13px;
    font-weight: 600;
}

.right-action-container .action-btn {
    width: 100%;
    height: 30px;
    font-size: 14px;
    font-weight: 600;
}

.action-btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Roboto', Arial, sans-serif;
    transition: all 0.2s ease;
    display: none;
}
.action-btn.show {
    display: block;
}

/* Default state - hide next/replay buttons */
.next-hand-btn,
.replay-hand-btn {
    display: none;
}

/* During showdown - hide action buttons and show next/replay buttons */
.game-container.showdown-mode .check-btn,
.game-container.showdown-mode .call-btn,
.game-container.showdown-mode .fold-btn,
.game-container.showdown-mode .bet-raise-btn,
.game-container.showdown-mode .all-in-btn {
    display: none;
}

.game-container.showdown-mode .next-hand-btn,
.game-container.showdown-mode .replay-hand-btn {
    display: block;
}

/* Style the new buttons to match existing action buttons */
.next-hand-btn {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: white;
}

.replay-hand-btn {
    background: linear-gradient(145deg, #6c757d, #495057);
    color: white;
}

.next-hand-btn:hover:not(:disabled),
.replay-hand-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.next-hand-btn:disabled,
.replay-hand-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.fold-btn {
    background: linear-gradient(145deg, #3498db, #4c7c9c);
    color: white;
}

.check-btn {
    background: #27ae60;
    color: white;
}

.call-btn {
    background: linear-gradient(145deg, #27ae60, #106316);
    color: white;
}

.bet-raise-btn {
    background: linear-gradient(145deg, #EA0700, #BE3F31);
    color: white;
}

.all-in-btn {
    background: linear-gradient(145deg, #952C21, #691F17);
    color: white;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Hide buttons when not applicable */
.check-btn:not(.show) {
    display: none;
}

.call-btn:not(.show) {
    display: none;
}

/* Action Popup Styles */
.action-popup-container {
    position: fixed;
    width: 100%;
    display: flex;
    top: 5px;
    left: 5px;
    z-index: 1000;
    padding-right: 5px;

    /* Horizontal scrolling setup */
    height: 25px;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;

    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.action-popup-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Individual action popup - horizontal layout */
.action-popup {
    display: inline-block;
    margin-right: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    vertical-align: top;
}

.action-popup.popup-visible {
    opacity: 1;
    transform: translateY(0);
}

.action-popup-content {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    border-left: 3px solid #4CAF50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.action-popup-text {
    white-space: nowrap;
}

/* Optional: Different colors for different actions */
.action-popup[data-action="fold"] .action-popup-content {
    border-left-color: #3498db;
}

.action-popup[data-action="raise"] .action-popup-content {
    border-left-color: #EA0700;
}

.action-popup[data-action="call"] .action-popup-content {
    border-left-color: #27ae60;
}

.action-popup[data-action="check"] .action-popup-content {
    border-left-color: #27ae60;
}

/* Board card popup styling */
.action-popup.board-card-popup .action-popup-content {
    border-left-color: #9c27b0; /* Purple for board cards */
    background: rgba(156, 39, 176, 0.15);
    color: white;
    font-weight: 600;
}

/* Different colors for each street */
.action-popup[data-action="flop"] .action-popup-content {
    border-left-color: #4CAF50; /* Green for flop */
    background: rgba(76, 175, 80, 0.15);
}

.action-popup[data-action="turn"] .action-popup-content {
    border-left-color: #FF9800; /* Orange for turn */
    background: rgba(255, 152, 0, 0.15);
}

.action-popup[data-action="river"] .action-popup-content {
    border-left-color: #f44336; /* Red for river */
    background: rgba(244, 67, 54, 0.15);
}

/* Hand reveal styling */
.action-popup[data-action="showdown"] .action-popup-content {
    border-left-color: #9c27b0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    min-width: 120px;
}

.action-popup.hand-reveal.winner-hand .action-popup-content {
    border-left-color: #ffd700;
    background: rgba(40, 30, 0, 0.9);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.action-popup .position {
    font-weight: bold;
    margin-right: 4px;
}

.action-popup .cards {
    font-family: monospace;
    font-weight: bold;
    margin: 0 4px;
    color: #fff;
}

.action-popup .hand-strength {
    color: #ccc;
    margin-left: 4px;
    font-size: 10px;
}

/* Showdown Styles */
.player-seat.winner {
    border-color: #ffd700 !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8) !important;
    background: #333;
    animation: winner-pulse 2s ease-in-out infinite;
}

@keyframes winner-pulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 215, 0, 1);
    }
}

.revealed-bot-cards {
    display: flex;
    gap: 4px;
}

.revealed-bot-cards.winner-cards .card {
    border-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.card.bot-revealed {
    background: #f8f9fa;
    border: 1px solid #999;
    color: #000;
    font-size: 8px;
    width: 28px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.bot-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.bot-card-rank {
    display: flex;
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
}

.bot-card-suit {
    display: flex;
    position: absolute;
    top: 33%;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    z-index: 2;
}

.card.bot-revealed.hearts .bot-card-suit,
.card.bot-revealed.hearts .bot-card-rank {
    color: #EA0700 !important;
}

.card.bot-revealed.diamonds .bot-card-suit,
.card.bot-revealed.diamonds .bot-card-rank {
    color: #EA0700; !important;
}

.card.bot-revealed.clubs .bot-card-suit,
.card.bot-revealed.clubs .bot-card-rank {
    color: #1a1a1a; !important;
}

.card.bot-revealed.spades .bot-card-suit,
.card.bot-revealed.spades .bot-card-rank {
    color: #1a1a1a; !important;
}

.revealed-bot-cards.winner-cards .card {
    border-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    background: #fffef7;
}

.winner-text-announcement {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    animation: winner-text-appear 0.5s ease-out;
}

@keyframes winner-text-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.player-seat.winner-halo {
    border: 4px solid #ffd700 !important;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4) !important;
    background: #333;
    animation: winner-halo-glow 2s ease-in-out infinite;
}

@keyframes winner-halo-glow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.8),
            0 0 70px rgba(255, 215, 0, 0.6);
        transform: scale(1.05);
    }
}

.winner-popup {
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    animation: winner-popup-appear 0.5s ease-out;
}

@keyframes winner-popup-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.winner-popup-content {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #b8860b;
    box-shadow:
        0 4px 12px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.winner-popup-text {
    text-align: center;
    white-space: nowrap;
}

.dealer-button.button-moving {
    animation: button-fade-out 0.4s ease-in forwards;
}

.dealer-button.button-arriving {
    animation: button-fade-in 0.4s ease-out;
}

@keyframes button-fade-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes button-fade-in {
    0% {
        opacity: 0;
        transform: scale(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes overlay-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile (Short) - max-width: 700px and max-height: 800px */
@media (max-width: 700px) {
    .game-container {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 160px);
        padding: 10px;
        max-width: 100%;
        gap: 20px;
    }

    .player-position {
        width: 60px;
        height: 60px;
    }

    .player-seat {
        padding: 4px;
        border-width: 2px;
    }

    .player-name {
        font-size: 10px;
    }

    .player-stack {
        font-size: 9px;
    }

    .card-back, .card {
        width: 18px;
        height: 25px;
        font-size: 8px;
    }

    .table-center {
        padding: 5px 8px;
        min-width: 100px;
    }

    .pot-chips {
        width: 20px;
        height: 20px;
    }

    .player-contribution {
        font-size: 15px;
    }
    .pot-amount {
        font-size: 15px;
    }

    .pot-dollar {
        font-size: 15px;
    }

    .pot-odds {
        font-size: 12px;
    }

    .community-cards-container {
        padding: 10px;
    }

    .card-slot {
        width: 42px;
        height: 60px;
        font-size: 18px;
    }

    .card-slot .rank {
        top: -1px;
        font-size: 25px;
        font-weight: 500;
    }

    .card-slot .suit {
        font-size: 35px;
        position: absolute;
        bottom: -2px;
    }

    .action-panel-layout {
        gap: 15px;
        max-width: 400px;
    }

    .left-action-container,
    .right-action-container {
        width: 80px;
        height: 80px;
    }

    .hero-cards .card {
        width: 70px;
        height: 100px;
        font-size: 45px;
    }

    .hero-cards .card-back {
        width: 70px;
        height: 100px;
    }

    .primary-left-btn {
        font-size: 14px;
    }

    .right-action-container .action-btn {
        height: 30px;
        width: 100%;
        font-size: 13px;
        font-weight: 600;
    }

    .footer-bar {
        height: 40px;
        padding: 8px 0;
    }

    .footer-icon {
        width: 20px;
        height: 20px;
    }

    .footer-label {
        font-size: 9px;
    }

    /* Mobile seat positions */
    .seat-1 { top: 3%; left: 73%; }
    .seat-2 { top: 25%; left: 99%; }
    .seat-3 { top: 60%; left: 100%; }
    .seat-4 { top: 90%; left: 88%; }
    .seat-5 { top: 100%; left: 50%; }
    .seat-6 { top: 90%; left: 12%; }
    .seat-7 { top: 60%; left: 0%; }
    .seat-8 { top: 25%; left: 1%; }
    .seat-9 { top: 3%; left: 27%; }

    /* Mobile pot chips positioning */
    .seat-1 .pot-chips { top: 110%; left: 35%; }
    .seat-2 .pot-chips { top: 15px; left: -25px; }
    .seat-3 .pot-chips { top: 15px; left: -25px; }
    .seat-4 .pot-chips { top: -25px; left: -23px; }
    .seat-5 .pot-chips { top: -30px; left: 17px; }
    .seat-6 .pot-chips { top: -27px; left: 60px; }
    .seat-7 .pot-chips { top: 15px; left: 65px; }
    .seat-8 .pot-chips { top: 15px; left: 65px; }
    .seat-9 .pot-chips { top: 110%; left: 20px; }

    /* Mobile dealer buttons */
    .seat-1 .dealer-button { top: 58px; left: -12px; }
    .seat-2 .dealer-button { top: 57px; left: 0px; }
    .seat-3 .dealer-button { top: 42px; left: -20px; }
    .seat-4 .dealer-button { top: 0px; left: -25px; }
    .seat-5 .dealer-button { top: -15px; left: -15px; }
    .seat-6 .dealer-button { top: 0px; left: 60px; }
    .seat-7 .dealer-button { top: 40px; left: 56px; }
    .seat-8 .dealer-button { top: 60px; left: 35px; }
    .seat-9 .dealer-button { top: 56px; left: 50px; }

    .winner-popup-content {
        padding: 4px 10px;
        font-size: 10px;
    }

    .player-seat.winner-halo {
        border-width: 3px !important;
    }
}