body {
    font-family: sans-serif;
    background-color: #3d5a3d;
    /* Green felt color */
    color: white;
}

#game-container {
    display: flex;
    justify-content: center;
    /* Center the player windows */
    align-items: flex-start;
    /* Align at top */
    gap: 30px;
    /* Space between player windows */
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 20px;
    /* Add some padding on sides */
    box-sizing: border-box;
}

.player-window {
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    width: 620px;
    min-width: 620px;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 10px auto;
}

.buttons-area button {
    padding: 8px 12px;
    margin: 2px;
    border-radius: 5px;
    border: none;
    font-weight: bold;
}

.reveal-area,
.player-hand {
    min-height: 135px;
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 15px;
    border: 2px dashed #666;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 580px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

/* ✅ ADD: Special styling when player has 6 cards */
.player-hand.has-six-cards {
    min-height: 140px;
    /* ✅ ADD: More height for wrapped cards */
    background: rgba(255, 165, 0, 0.1);
    /* ✅ ADD: Visual indicator */
    border: 2px dashed #FFA500;
    /* ✅ ADD: Highlight when holding 6 cards */
}

.zone-title {
    color: #aaa;
    font-style: italic;
    font-size: 1.1em;
    margin-bottom: 10px;
    display: block;
}

.card {
    width: 75px;
    /* Slightly larger cards */
    height: 105px;
    border: 1px solid black;
    border-radius: 6px;
    background-color: white;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
    flex-grow: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card.face-down {
    background-image: url('/graphics/cards/default.png');
}

.card.wild {
    border: 3px solid gold;
    box-shadow: 0 0 10px gold;
}

button.enabled {
    background-color: #28a745;
    /* Green */
    color: white;
    cursor: pointer;
}

button.disabled {
    background-color: #dc3545;
    /* Red */
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====== v3 ============= */

.all-players {
    margin-top: 20px;
    padding: 15px;
    background-color: #444;
    border-radius: 8px;
    border: 1px solid #666;
}

.all-players h3 {
    margin-top: 0;
    color: #fff;
}

.all-players ul {
    list-style: none;
    padding-left: 0;
}

.all-players li {
    padding: 5px 0;
    color: #ccc;
    border-bottom: 1px solid #555;
}

.all-players li:last-child {
    border-bottom: none;
}

.all-players li:first-child {
    font-weight: bold;
    color: #fff;
}

/* ============ v3 ================ */

/* Side chips display */
.chip-display {
    background-color: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    margin: 5px 0;
    font-weight: bold;
    border: 1px solid #34495e;
}

/* Eliminated player styling */
.player-window.eliminated {
    opacity: 0.6;
    border: 2px solid #7f8c8d !important;
    background-color: #ecf0f1;
}

.player-window.eliminated .player-name {
    color: #7f8c8d;
    text-decoration: line-through;
}

.player-chips {
    font-size: 1.2em;
    color: #FFD700;
    font-weight: bold;
    background: rgba(255, 215, 0, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.side-chips-display {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #FFD700;
    border-radius: 3px;
    padding: 2px 5px;
    margin-top: 3px;
    font-size: 11px;
}

.chip-warning {
    color: #FF6B6B;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Drag adn Drop  */

.card.draggable {
    cursor: grab;
}

.card.draggable:active {
    cursor: grabbing;
}

.card.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

.reveal-area.drop-target,
.player-hand.drop-target {
    min-height: 100px;
    border: 2px dashed #00ff00;
    background: rgba(0, 255, 0, 0.1);
    transition: all 0.3s ease;
}

.six-card-alert {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Groups */

/* Group System Styles */

.home-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

.game-title {
    color: #4CAF50;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.action-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.create-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.join-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.quick-btn {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.form-group {
    margin: 15px 0;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.submit-btn {
    background: #4CAF50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 10px;
}

.back-btn {
    background: #666;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.status-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.status-success {
    background: #4CAF50;
    color: white;
}

.status-error {
    background: #f44336;
    color: white;
}

.loading-message {
    text-align: center;
    padding: 50px;
    color: white;
}

.loading-message a {
    color: #4CAF50;
    text-decoration: none;
}

.loading-message a:hover {
    text-decoration: underline;
}

/* Fullscreen API */
/* Fullscreen styles */
:fullscreen {
    background: #1a1a1a;
}

:-webkit-full-screen {
    background: #1a1a1a;
}

:-ms-fullscreen {
    background: #1a1a1a;
}

/* Game container in fullscreen */
:fullscreen #game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card selection states */
.player-card.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-card.selectable:hover {
    transform: translateY(-8px);
    border: 2px solid #FFA500;
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
}

.player-card.selected {
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px #FFD700;
    transform: translateY(-12px);
    z-index: 10;
}

.player-card:not(.selectable) {
    cursor: default;
}

/* Visual indicator when exchange is available */
.exchange-available .player-card.selectable::after {
    content: "🔄";
    position: absolute;
    top: -10px;
    right: -10px;
    background: gold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Display winner and loser */

/* Hand Results Modal */
.hand-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

.hand-results-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid gold;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hand-results-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid gold;
    padding-bottom: 20px;
}

.hand-results-header h2 {
    margin: 0 0 20px 0;
    font-size: 2.5em;
    color: gold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.winner-loser-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.winner-info,
.loser-info {
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 10px;
}

.winner-info {
    background-color: rgba(0, 128, 0, 0.3);
    border: 2px solid #00ff00;
}

.loser-info {
    background-color: rgba(255, 0, 0, 0.3);
    border: 2px solid #ff4444;
}

.result-label {
    font-weight: bold;
    margin-right: 10px;
}

.chip-change {
    font-weight: bold;
}

.chip-gain {
    color: #00ff00;
}

.chip-loss {
    color: #ff4444;
}

/* Hand Comparison */
.hand-comparison {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.player-hand-result {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    min-width: 300px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.winner-hand {
    border-color: gold;
    box-shadow: 0 0 20px gold;
    background-color: rgba(255, 215, 0, 0.1);
}

.player-hand-result h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    color: #4fc3f7;
}

.hand-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.result-card {
    width: 70px;
    height: 98px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chip-count {
    font-size: 1.1em;
    margin-top: 15px;
    color: #ffcc80;
}

/* Continue Button */
.continue-section {
    text-align: center;
    margin-top: 30px;
}

.continue-button {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.continue-button:hover {
    background: linear-gradient(to bottom, #66BB6A, #388E3C);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.continue-button:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hand-results-content {
        padding: 20px;
        width: 95%;
    }

    .hand-results-header h2 {
        font-size: 1.8em;
    }

    .player-hand-result {
        min-width: 100%;
    }

    .result-card {
        width: 60px;
        height: 84px;
    }
}

@media (max-width: 700px) {
    .player-window {
        width: 95%;
        min-width: unset;
        padding: 15px;
    }

    .reveal-area,
    .player-hand {
        min-width: unset;
        width: 100%;
        min-height: 110px;
        padding: 10px;
        flex-wrap: wrap;
        /* Allow wrapping on small screens */
        justify-content: center;
    }

    .button-container {
        flex-wrap: wrap;
        /* Wrap buttons on small screens */
        gap: 10px;
    }

    .button-container button {
        flex: 1 0 calc(50% - 10px);
        /* 2 buttons per row */
        min-width: 140px;
    }

    .card {
        width: 65px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .button-container button {
        flex: 1 0 100%;
        /* Full width buttons on very small screens */
    }
}

.wild-card {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-weight: bold;
    font-size: 14px;
}

.wild-card-content {
    transform: rotate(-15deg);
}

/* winner & loser end game */
/* Final Results Display */

.loser-section {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.05));
    border: 2px solid #dc3545;
}

.finalization-message {
    margin-top: 30px;
    padding: 20px;
    background: rgba(40, 167, 69, 0.2);
    border-radius: 15px;
    text-align: center;
}

.return-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.return-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Missing classes */

/* Add to your style.css - Results Row Layout */
.result-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Player name styling */

/* Rule 1 - For game info area layout */
.game-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

/* Rule 2 - For hand results modal (centered, with background) */
.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Rule 3 - For final results (our new one - text at bottom) */
.game-info {
    margin-top: 20px;
    color: #666;
    font-size: 0.9em;
    text-align: center;
}

.game-info div {
    font-size: 1.1em;
    color: #80cbc4;
}

/* Ensure final results container is properly positioned */
.final-results {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    z-index: 1000;
    display: none;
    overflow-y: auto;
    padding: 20px;

    /* Add these to match what you need */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============ BUTTON CONTAINER - AT BOTTOM ============ */
/* Button container moved to bottom of player window */
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 25px 0 0 0;
    /* More space above, less below */
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Individual button styling for horizontal layout */
.button-container button {
    flex: 1;
    padding: 12px 4px;
    /* Reduce horizontal padding */
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 0;
    white-space: normal;
    /* Change from nowrap to normal */
    word-wrap: break-word;
    /* Allow words to break if needed */
    line-height: 1.2;
    /* Better line height */
    height: auto;
    /* Allow height to adjust */
    min-height: 45px;
    /* Set minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Also update mobile version (around line 678) */
@media (max-width: 700px) {
    .button-container button {
        flex: 1 0 calc(50% - 10px);
        min-width: 140px;
        font-size: 1em;
        /* Slightly smaller on mobile */
        padding: 10px 4px;
        /* Adjust padding */
        white-space: normal;
        /* Allow wrapping on mobile too */
        word-wrap: break-word;
    }
}


/* Specific button colors */
.button-container button.reveal-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.button-container button.exchange-btn {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

.button-container button.call-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.button-container button.pass-btn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

/* Button hover effects */
.button-container button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

/* ============================================= */

/* Final Results Display - NOW 70% OF ORIGINAL SIZE (ROUNDED) */

/* Final Results Display - 90% OF ORIGINAL SIZE WITH COMPACT LAYOUT */
.final-results-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 27px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.final-results h1 {
    text-align: center;
    font-size: 2.7em;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 9px rgba(255, 215, 0, 0.5);
}

/* Winner/Loser Sections - COMPACT VERSION */
.winner-section,
.loser-section {
    padding: 15px;
    margin: 12px 0;
    border-radius: 14px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.winner-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 2px solid #ffd700;
}

.loser-section {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.05));
    border: 2px solid #dc3545;
}

/* Combined winner/loser heading with player name inline */
.winner-section h2,
.loser-section h2 {
    font-size: 1.8em;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.winner-section h2 {
    color: #ffd700;
}

.loser-section h2 {
    color: #dc3545;
}

/* Player name inside h2 */
.winner-section h2 .player-name,
.loser-section h2 .player-name {
    font-size: 1.1em;
    font-weight: bold;
    display: inline-block;
    margin-left: 5px;
}

.winner-section h2 .player-name {
    color: #ffed99;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

.loser-section h2 .player-name {
    color: #f8d7da;
    text-shadow: 0 0 3px rgba(220, 53, 69, 0.5);
}

/* Hand rank */
.hand-rank {
    font-size: 1.2em;
    font-weight: bold;
    margin: 5px 0 12px 0;
    color: #6c757d;
    font-style: italic;
}

/* Card Display */
.cards-display {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 5px;
}

.final-card {
    width: 90px;
    height: 126px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.final-card:hover {
    transform: translateY(-9px) scale(1.05);
}

.final-card img {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
}

.card-label {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75em;
    color: #adb5bd;
}

/* Wild badge */
.wild-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: gold;
    color: black;
    font-size: 0.7em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Result Row Layout - Reduced spacing */
.result-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Confirmation Section - Reduced spacing */
.confirmation-section {
    margin-top: 15px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    text-align: center;
}

.confirmation-message {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: #20c997;
}

.confirm-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 40px;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.confirm-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.6);
}

.confirm-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.confirmation-status {
    font-size: 1em;
    margin: 10px 0;
    color: #17a2b8;
}

.confirmed-players {
    margin-top: 8px;
    font-size: 0.9em;
    color: #6c757d;
}

/* Spectator Message */
.spectator-message {
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    display: inline-block;
    margin: 10px 0;
}

.spectator-message p {
    margin: 5px 0;
    font-size: 1.5em;
}

.spectator-subtext {
    font-size: 1.2em;
    color: #aaa;
}

/* Cards Hidden fallback */
.cards-hidden {
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Player chips and Side chips dynamic */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Chip selection button animations */
@keyframes chipSelectPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.chip-selected {
    animation: chipSelectPulse 0.3s ease;
}

/* HAND RESULT */

/* Hand Result Display - Responsive Card Sizing */
@media (max-width: 768px) {
    .hand-result-content {
        padding: 15px !important;
        max-width: 95% !important;
    }

    .cards-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .final-card {
        width: 70px !important;
        height: 98px !important;
    }

    .hand-result-header h1 {
        font-size: 2em !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .final-card {
        width: 80px !important;
        height: 112px !important;
    }
}

/* Card hover effects */
.final-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.final-card:hover {
    transform: translateY(-10px) scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
}

.winner-card {
    border: 3px solid #28a745 !important;
}

.loser-card {
    border: 3px solid #dc3545 !important;
}

/* Animation for display appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hand-result-display {
    animation: fadeIn 0.3s ease-out !important;
}

/* Hand Result Modal Styles */

.hand-result-modal {
    animation: fadeIn 0.3s ease-out;
    z-index: 1000;
}

.hand-result-card {
    width: 50px;
    height: 70px;
    position: relative;
    margin: 2px;
    border-radius: 5px;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hand-result-card:hover {
    transform: translateY(-3px);
}

.hand-result-card.winner-card {
    border-color: #28a745;
}

.hand-result-card.loser-card {
    border-color: #dc3545;
}

.hand-result-card img {
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hand-result-modal {
        min-width: 300px !important;
        max-width: 90% !important;
        padding: 15px !important;
    }

    .hand-result-card {
        width: 40px !important;
        height: 56px !important;
    }

    .side-chip-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .side-chip-buttons button {
        min-width: 100% !important;
    }
}