/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Georgia', serif;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #5a3921;
}

button {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background-color: #8e7b65;
    color: #f8f3e6;
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #a18e76;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #d1c8b9;
    color: #a9a195;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Players who have folded - complete styling */
.npc-player.folded .card-back,
.npc-player.folded .player-cards,
.npc-player.folded .player-bet,
.npc-player.folded .acorn-container,
.npc-player.folded .bet-amount,
.npc-player.folded .player-avatar,
.npc-player.folded .character-img,
.npc-player.folded .acorn {
    opacity: 0.5 !important;
    filter: grayscale(80%) !important;
    transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Maintain opacity of acorn count even when player folds */
.npc-player.folded .player-acorn-count {
    opacity: 1 !important;
    filter: none !important;
}

/* Reset opacity for non-folded characters - make sure ALL elements are normal */
.npc-player:not(.folded) .character-img,
.npc-player:not(.folded) .player-avatar,
.npc-player:not(.folded) .player-cards,
.npc-player:not(.folded) .player-bet,
.npc-player:not(.folded) .acorn-container,
.npc-player:not(.folded) .bet-amount,
.npc-player:not(.folded) .acorn {
    opacity: 1 !important;
    filter: none !important;
}

/* Player area folded styles */
.player-area.folded {
    opacity: 0.5;
    filter: grayscale(80%);
}

.player-area.folded .card-back {
    opacity: 0.5;
}

/* Index Page Styles */
.index-page {
    background: url('index_back.png') no-repeat center center fixed;
    background-size: cover;
}

.main-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(248, 243, 230, 0.85);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(90, 57, 33, 0.3);
}

.main-menu h1 {
    font-size: 3.5em;
    margin-bottom: 35px;
    color: #5a3921;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(90, 57, 33, 0.2);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 240px;
}

.menu-buttons button {
    width: 100%;
    padding: 15px;
    font-size: 1.3em;
}

/* Game Page Styles */
.game-page {
    background: url('home_back.png') no-repeat center center fixed;
    background-size: cover;
}

.game-container {
    width: 100%;
    max-width: 1920px;
    height: 1080px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 0;
    margin: 0 auto; /* Center the game container */
}

/* Header UI */
.header-ui {
    display: flex;
    justify-content: flex-start;
    padding: 15px;
    z-index: 100;
    position: absolute;
    top: 20px;
    left: 20px;
}

#game-message {
    font-size: 24px;
    color: #f8f3e6;
    background-color: rgba(90, 57, 33, 0.95);
    padding: 12px 20px;
    border-radius: 15px;
    visibility: hidden;
    font-style: italic;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    right: 20px;
    top: 200px;
    z-index: 3000;
    max-width: 180px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Timer and Acorn Count Styles */
#game-timer {
    background-color: rgba(90, 57, 33, 0.85);
    color: #f8f3e6;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: bold;
    margin-left: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.player-acorn-count {
    background-color: rgba(255, 255, 255, 0.95);
    color: #000000;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: fixed;
    min-width: 140px;
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.npc-player .player-acorn-count {
    display: none;
}

.npc-container .player-acorn-count {
    transform: translateX(-50%) !important;
}

#badger .player-acorn-count {
    top: 20px;
    left: 30%;
    transform: translateX(-50%);
}

#toad .player-acorn-count {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#ratty .player-acorn-count {
    top: 20px;
    left: 70%;
    transform: translateX(-50%);
}

/* NPC Players - Centered positioning */
.npc-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    position: absolute;
    top: -100px; /* Moved up from -50px */
    z-index: 50; /* Increased z-index to place elements on top of the table */
}

/* Position each NPC and move them up more */
.npc-player#badger {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
    top: -140px; /* Moved up from -100px */
}

.npc-player#toad {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -220px; /* Moved up from -120px */
}

.npc-player#ratty {
    position: absolute;
    left: 70%;
    transform: translateX(-50%);
    top: -160px; /* Moved up from -100px */
}

.npc-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 50; /* Increased z-index to place elements on top of the table */
}

/* Chair positioning */
.chair-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 20; /* Lower than table (40) and character images (30) */
    pointer-events: none; /* Allow clicks to pass through */
}

.chair {
    position: absolute;
    width: 550px; /* Increased from 400px */
    height: 450px; /* Increased from 300px */
    background-image: url('chair.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Individual chair positioning */
#badger-chair {
    position: absolute;
    left: 30%;
    top: 100px; /* Moved down from -120px */
    transform: translateX(-50%) rotate(-10deg); /* Slight rotation for perspective */
}

#toad-chair {
    position: absolute;
    left: 50%;
    top: 70px; /* Moved down from -150px */
    transform: translateX(-50%);
}

#ratty-chair {
    position: absolute;
    left: 70%;
    top: 100px; /* Moved down from -120px */
    transform: translateX(-50%) rotate(10deg); /* Slight rotation for perspective */
}

/* Keep character size the same */
.player-avatar {
    width: 650px; /* Much bigger from 500px */
    height: 650px; /* Much bigger from 500px */
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 30; /* Keep behind table */
    margin-bottom: -180px; /* Adjusted to position them properly with table */
    position: relative;
}

/* Make Toad character even bigger than others */
.npc-player#toad .player-avatar {
    width: 700px; /* Even bigger */
    height: 700px;
}

/* Ensure ONLY the character animations are behind the table */
.character-img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    object-fit: contain;
    z-index: 30; /* Ensure character images are behind the table */
    position: relative;
}

/* All NPC info elements - make a bit bigger but keep cards the same */
.npc-player .player-cards,
.npc-player .player-bet,
.npc-player .acorn-container,
.npc-player .bet-amount {
    position: relative;
    z-index: 80; /* Ensure all NPC info is on top of table */
    transform: scale(1.0); /* Reset from 0.8 to make bigger */
}

/* Make NPC cards same size but ensure proper positioning */
.npc-player .player-cards {
    margin-top: -15px;
    position: relative;
    transform: scale(1.0); /* Reset from 0.8 */
}

.npc-player .card {
    width: 60px;
    height: 87px;
    padding: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Deeper shadow for emphasis */
    z-index: 80; /* Ensure cards are on top of table */
}

.npc-player .card div {
    font-size: 80% !important;
}

/* Make NPC bet info bigger */
.npc-player .player-bet {
    margin-top: 8px;
    z-index: 75;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(248, 243, 230, 0.75);
    padding: 6px 10px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    font-size: 1.1em; /* Larger text */
    font-weight: bold;
}

/* Make acorn containers bigger */
.npc-player .acorn-container {
    z-index: 76;
    position: relative;
    transform: scale(1.0); /* Reset from 0.75 */
}

/* Make NPC acorns bigger */
.npc-player .acorn {
    width: 60px; /* Bigger from 50px */
    height: 60px; /* Bigger from 50px */
}

/* Poker Table - Centered positioning */
.poker-table {
    position: absolute;
    width: 100%;
    max-width: 2400px; /* Increased from 2200px */
    height: 850px; /* Increased from 700px */
    background-color: #3c7c64;
    border-radius: 1200px 1200px 0 0; /* Adjusted for new width */
    border: 25px solid #795548;
    bottom: -50px; /* Moved down from 0 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4), inset 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 40;
    padding-bottom: 100px;
}

/* Community Cards - Remove border */
.community-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    margin-top: -150px; /* Adjusted from -100px to account for larger table */
}

.community-cards .card {
    width: 110px;
    height: 160px;
    padding: 12px;
    border: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.community-cards .card div {
    font-size: 120% !important;
}

.card-placeholder {
    background-color: rgba(115, 79, 69, 0.2);
    border: none;
}

/* Player Area - Moved to left side with tilt to the right */
.player-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 60;
    position: absolute;
    bottom: 130px;
    left: 20%; /* Moved to left side of screen */
    transform: translateX(-50%);
}

.player-area .player-cards {
    display: flex;
    gap: 15px;
    transform: rotate(15deg); /* Tilt to the right */
}

/* Individual card tilting for left card */
.player-area .player-cards #player-card-1 {
    transform: rotate(8deg); /* Additional tilt for the left card */
}

.player-area .card {
    width: 150px;
    height: 217px;
    padding: 15px;
    transition: transform 0.3s;
    border: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); /* Deeper shadow for depth */
}

.player-area .card div {
    font-size: 150% !important;
}

.player-area .card:hover {
    transform: translateY(-20px) rotate(-5deg); /* Slightly counter the rotation on hover */
}

/* Override hover for left card to maintain its tilt */
.player-area .player-cards #player-card-1:hover {
    transform: translateY(-20px) rotate(3deg); /* Maintain rightward tilt even on hover */
}

/* Player info - Moved to the right side */
.player-info {
    display: flex;
    flex-direction: column; /* Stack info for compact layout */
    align-items: center;
    gap: 10px;
    width: 220px;
    background-color: rgba(248, 243, 230, 0.85);
    padding: 15px;
    border-radius: 20px;
    color: #5a3921;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 370px;
    right: 40px; /* Moved to right side */
    left: auto; /* Override left positioning */
    z-index: 70;
    backdrop-filter: blur(15px);
}

/* Action Buttons - Moved to right side */
.action-buttons {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 12px;
    padding: 20px;
    background-color: rgba(248, 243, 230, 0.85); /* Lighter Apple-style background */
    border-radius: 20px;
    width: 220px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 150px;
    right: 40px; /* Moved to right side */
    left: auto; /* Override left positioning */
    z-index: 70;
    backdrop-filter: blur(15px); /* Strong blur for Apple glass effect */
}

.action-buttons button {
    width: 100%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    background-color: #5a3921;
}

.action-buttons button:hover {
    background-color: #734f45;
    transform: translateY(-2px);
}

/* Bet slider improvements - Apple style */
.bet-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
    padding: 0 10px;
    margin: 5px 0;
}

.bet-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #5a3921 0%, #8e7b65 100%);
    border-radius: 4px;
    outline: none;
    opacity: 0.9;
    margin: 12px 0;
}

.bet-slider:hover {
    opacity: 1;
}

.bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5a3921;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.bet-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.bet-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5a3921;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    border: none;
}

.bet-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.bet-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bet-slider:disabled::-webkit-slider-thumb,
.bet-slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
    transform: none;
}

#bet-value {
    background-color: #ffffff;
    color: #000000;
    padding: 8px 15px;
    border-radius: 15px;
    min-width: 70px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(90, 57, 33, 0.2);
}

/* Player Acorn Display */
.npc-acorn-counts {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 2500;
    pointer-events: none;
    top: 50px; /* Adjusted to be closer to character heads */
}

/* Individual NPC acorn counter positioning */
#badger-acorn-display {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
    top: 120px;
}

#toad-acorn-display {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 80px;
}

#ratty-acorn-display {
    position: absolute;
    left: 70%;
    transform: translateX(-50%);
    top: 100px;
}

.npc-acorn-display {
    position: relative;
}

.npc-acorn-display .player-acorn-count {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 120px;
    text-align: center;
    z-index: 2500;
}

/* Player acorn display in footer */
.player-area .player-acorn-display {
    position: absolute;
    bottom: 80px; /* Position above turn indicator */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2500;
}

.player-area .player-acorn-display .player-acorn-count {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.7);
    min-width: 120px;
    text-align: center;
}

/* Hide the old acorn counters */
.npc-player .player-acorn-count {
    display: none;
}

#turn-indicator {
    color: #5a3921;
    font-size: 18px;
    padding: 10px 24px;
    background-color: rgba(248, 243, 230, 0.9);
    border-radius: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    position: relative;
    z-index: 75;
}

/* Footer UI - Enhanced to match user UI style with full width */
.footer-ui {
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    background-color: rgba(248, 243, 230, 0.85);
    backdrop-filter: blur(20px);
    z-index: 80;
    width: 80%; /* Changed from 100% to 80% for longer but not full width */
    position: absolute;
    bottom: 20px; /* Moved up from bottom for better visibility */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center horizontally properly */
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(90, 57, 33, 0.1);
    border-radius: 25px; /* Added curved edges */
    max-width: 1600px; /* Set maximum width to ensure it doesn't get too wide */
}

.footer-left {
    display: flex;
    gap: 15px;
}

.footer-left button {
    background-color: #5a3921;
    color: #f8f3e6;
    border-radius: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.footer-left button:hover {
    background-color: #734f45;
    transform: translateY(-2px);
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-center .player-acorn-count {
    position: relative;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 8px 16px;
    font-size: 18px;
    min-width: 140px;
}

.footer-right {
    margin-right: 25px;
}

.footer-right #new-game-btn {
    background-color: #4e8d7c;
    font-weight: bold;
    font-size: 16px;
    border-radius: 15px;
    padding: 12px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.footer-right #new-game-btn:hover {
    background-color: #3a6b5d;
    transform: translateY(-2px);
}

/* Game Over Modal Styles */
#game-over-modal .modal-content {
    text-align: center;
    max-width: 600px;
}

#game-over-modal h2 {
    color: #5a3921;
    font-size: 36px;
    margin-bottom: 20px;
}

#final-results {
    margin: 20px 0;
}

#final-acorn-counts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
    font-size: 18px;
}

.final-player {
    display: flex;
    justify-content: space-between;
    padding: 8px 15px;
    background-color: #f8f3e6;
    border-radius: 10px;
    border-left: 5px solid #5a3921;
}

.final-player.winner {
    background-color: #f5e7c1;
    border-left: 5px solid #f0c14b;
    font-weight: bold;
}

#winner-announcement {
    color: #5a3921;
    font-size: 24px;
    margin: 20px 0;
}

.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.game-over-buttons button {
    padding: 12px 25px;
    font-size: 18px;
    border-radius: 15px;
    background-color: #5a3921;
    color: #f8f3e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-over-buttons button:hover {
    background-color: #734f45;
    transform: translateY(-3px);
}

/* Card Styling */
.player-cards {
    display: flex;
    gap: 8px;
    z-index: 60;
    position: relative;
}

.card {
    width: 90px;
    height: 130px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 2px solid #000000;
    position: relative;
}

.card-back {
    background-color: #734f45;
    background-image: url('cards/back.png');
    background-size: cover;
    border: none;
}

/* Card flip animation for showdown */
.card-flip {
    transform: rotateY(180deg);
    transition: transform 0.3s ease;
}

/* Card error fallback styling */
.card-error {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white !important;
    border: 2px solid #000 !important;
}

.card-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-suit {
    font-size: 30px;
    line-height: 1;
}

/* Color card suits appropriately */
.card-error .card-suit:contains("♥"),
.card-error .card-suit:contains("♦") {
    color: red;
}

.card-error .card-suit:contains("♣"),
.card-error .card-suit:contains("♠") {
    color: black;
}

/* Adjust size for different card positions */
.player-area .card-error .card-value {
    font-size: 32px;
}

.player-area .card-error .card-suit {
    font-size: 40px;
}

.community-cards .card-error .card-value {
    font-size: 28px;
}

.community-cards .card-error .card-suit {
    font-size: 36px;
}

.npc-player .card-error .card-value {
    font-size: 18px;
}

.npc-player .card-error .card-suit {
    font-size: 24px;
}

/* Transition effects for all animated elements */
.player-area, .npc-player, .card, .player-avatar, .character-img {
    transition: opacity 0.5s ease, filter 0.5s ease, transform 0.3s ease;
}

/* Transition effects for folding animation */
.player-area, .npc-player, .card, .player-avatar, .character-img {
    transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Acorns styling - increase size and add hover effect */
.acorn-container {
    display: flex;
    gap: 8px;
    height: 70px;
}

.acorn {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s, filter 0.2s;
}

.acorn:hover {
    transform: rotate(10deg) scale(1.1);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

/* Hide Modals by default */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #f8f3e6;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Mobile message styling - updated for all non-desktop devices */
.mobile-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('index_back.png') no-repeat center center fixed;
    background-size: cover;
    z-index: 2000;
}

.mobile-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(40, 25, 18, 0.92);
}

.mobile-message h1 {
    position: relative;
    z-index: 2001;
    color: #f8f3e6;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Playfair Display', Georgia, serif;
}

.mobile-message p {
    position: relative;
    z-index: 2001;
    color: #f8f3e6;
    font-size: 24px;
    font-weight: 500;
    max-width: 80%;
    text-align: center;
    background-color: rgba(90, 57, 33, 0.6);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
}

.mobile-message p a {
    color: #f8f3e6;
    text-decoration: underline;
    font-weight: bold;
}

/* Remove orientation message as we're showing desktop-only for all mobile devices */
.orientation-message {
    display: none !important;
}

/* Show mobile message for all mobile devices and tablets */
@media only screen and (max-width: 1024px),
       only screen and (max-device-width: 1024px),
       only screen and (hover: none) and (pointer: coarse) {
    .game-container,
    .main-menu,
    .orientation-message {
        display: none !important;
    }
    
    .mobile-message {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

/* Remove all other mobile-specific media queries */
@media only screen and (orientation: landscape) and (max-device-width: 926px),
       only screen and (orientation: portrait) {
    .game-container,
    .main-menu {
        display: none !important;
    }
    
    .mobile-message {
        display: flex !important;
    }
}

/* Mobile message styling */
.mobile-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('home_back.png') no-repeat center center fixed;
    background-size: cover;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.mobile-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(40, 25, 18, 0.95);
}

.mobile-message h1 {
    color: #f8f3e6;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-message p {
    color: #f8f3e6;
    font-size: 24px;
    font-weight: 500;
    max-width: 80%;
    position: relative;
    background-color: rgba(90, 57, 33, 0.6);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Orientation message for portrait mode */
.orientation-message {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 25, 18, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.orientation-message img {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    animation: rotate 2s infinite ease-in-out;
}

.orientation-message p {
    color: #f8f3e6;
    font-size: 24px;
    font-weight: bold;
    max-width: 80%;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media query to show mobile message on all mobile devices */
@media only screen and (max-device-width: 926px) {
    .game-container, .orientation-message {
        display: none !important;
    }

    .mobile-message {
        display: flex !important;
    }
}

/* Responsive Design */
@media (max-width: 1920px) {
    .game-container {
        transform: scale(0.9);
        transform-origin: center center;
    }
}

@media (max-width: 1600px) {
    .game-container {
        transform: scale(0.8);
    }
}

@media (max-width: 1366px) {
    .game-container {
        transform: scale(0.7);
    }
}

@media (max-width: 1024px) {
    .game-container {
        transform: scale(0.5);
    }
}

/* Remove all other mobile-specific media queries and replace with this single one for horizontal mobile */
@media only screen and (orientation: landscape) and (max-device-width: 926px) {
    body {
        overflow: auto;
        width: 100vw;
        height: 100vh;
    }

    .game-container {
        width: 1920px !important;
        height: 1080px !important;
        transform-origin: top center !important;
        transform: scale(0.42) !important;
        margin: 0 auto !important;
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) scale(0.42) !important;
    }

    /* Force desktop layout for all elements */
    .poker-table,
    .community-cards,
    .player-area,
    .player-info,
    .action-buttons,
    .footer-ui,
    .npc-container,
    .chair-container,
    .header-ui {
        position: absolute !important;
        transform: none !important;
        width: initial !important;
        height: initial !important;
        left: initial !important;
        right: initial !important;
        top: initial !important;
        bottom: initial !important;
        margin: initial !important;
        padding: initial !important;
    }

    /* Keep desktop positioning for all elements */
    .npc-player#badger { left: 30% !important; }
    .npc-player#toad { left: 50% !important; }
    .npc-player#ratty { left: 70% !important; }

    /* Maintain desktop card orientations */
    .player-area .player-cards,
    .player-area .card {
        transform: none !important;
    }

    /* Remove any mobile-specific changes */
    .card,
    .community-cards .card,
    .player-area .card,
    .npc-player .card {
        transform: none !important;
        width: initial !important;
        height: initial !important;
    }

    /* Ensure all elements maintain desktop opacity and visibility */
    .npc-player,
    .player-area,
    .card,
    .character-img,
    .player-avatar {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Disable any mobile-specific animations or transitions */
    * {
        transition: none !important;
    }
}

/* Remove all other responsive scaling for landscape orientation */
@media only screen and (orientation: landscape) and (max-device-width: 844px),
       only screen and (orientation: landscape) and (max-device-width: 812px),
       only screen and (orientation: landscape) and (max-device-width: 667px) {
    .game-container {
        transform: translateX(-50%) scale(0.42) !important;
    }
}

/* Character Image Styling */
.character-img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    object-fit: contain; /* Ensures images maintain their aspect ratio */
    z-index: 30; /* Ensure character images are behind the table */
    position: relative;
}

/* NPC Acorn Counts */
.npc-acorn-counts {
    position: fixed;
    top: 15px;
    left: -35px;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 180px;
    z-index: 2500; /* Increased z-index to be above NPCs and table */
    pointer-events: none;
}

.npc-acorn-display .player-acorn-count {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    min-width: 150px;
    z-index: 2500; /* Match parent z-index */
}