body {
    font-family: Arial, sans-serif;
    background: #2c3e50;
    color: #ecf0f1;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 1060px;
    margin: 20px auto;
    text-align: center;
    background: #34495e;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.status-bar {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.game-options {
    margin: 20px 0;
}

.board {
    position: relative;
    width: 1050px;
    height: 650px;
    margin: 20px auto;
    background: #a83232; /* Dark red background */
    border-radius: 10px;
}

.players-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}

.player-area {
    position: absolute;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 10px;
    pointer-events: auto;
    text-align: center;
}

.player-area h2 {
    margin: 0;
    font-size: 1em;
    font-weight: normal;
    color: #fff;
}

/* Player Positions */
#player-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

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

#player-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#player-right {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Hands */
/* For top and bottom players (horizontal layout), allow wrapping into multiple rows */
#player-bottom .hand, 
#player-top .hand {
    display: flex;
    flex-wrap: wrap;        /* Allow cards to wrap to new lines */
    justify-content: center;
    max-width: 80%;         /* Limit width so cards don't overlap other areas */
    margin: 0 auto;
}

#player-bottom .hand .card, 
#player-top .hand .card {
    margin: 5px; /* Spacing between cards */
}

/* For left and right players (vertical layout), allow wrapping into multiple columns */
#player-left .hand,
#player-right .hand {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;        /* Allow cards to wrap into multiple columns */
    align-items: center;
    max-height: 300px;      /* Limit height so they don't go off-screen */
    overflow: auto;         /* If too many cards, add a scrollbar */
}

#player-left .card,
#player-right .card {
    margin: 5px 0;
}

/* Center Area (Deck and Discard) */
.center-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 30px; 
}

.card-stack {
    position: relative;
    width: 60px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

#deck {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    font-size: 1.5em;
    color: #000;
    display:flex; 
    align-items:center; 
    justify-content:center;
    font-weight:bold;
    cursor: pointer;
}

#discard .card {
    margin: 0;
    width: 60px;
    height: 90px;
}

.actions {
    margin-top: 10px;
    padding: 10px;
    font-size: 1em;
    cursor: pointer;
}

/* Card Styles */
.card {
    width: 50px;
    height: 70px;
    background: #fff;
    color: #000;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    cursor: pointer;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
}

.card.suit-hearts .suit, .card.suit-diamonds .suit {
    color: red;
}

.card.suit-hearts, .card.suit-diamonds {
    border: 2px solid red;
}

.card.suit-spades, .card.suit-clubs {
    border: 2px solid black;
}

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

.card.back {
    background: #777;
    color: #777;
    border: 2px solid #333;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    display:flex;
    justify-content:center;
    align-items:center;
}

.modal-content {
    background:#ecf0f1;
    color:#2c3e50;
    padding:20px;
    border-radius:10px;
    width:300px;
    text-align:center;
}

.modal-content h2 {
    margin-top:0;
}

.modal-actions {
    margin-top:20px;
    display:flex;
    justify-content:space-evenly;
}

.modal-actions button {
    padding: 10px;
    cursor:pointer;
}

/* Trophy classes */
.trophy-gold::before {
    content:"🏆";
    margin-right:5px;
}

.trophy-silver::before {
    content:"🥈";
    margin-right:5px;
}

.trophy-bronze::before {
    content:"🥉";
    margin-right:5px;
}

/* Thinking Indicator */
#thinking-indicator {
    display:none;
    position:fixed;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    background:#34495e;
    color:#ecf0f1;
    padding:10px;
    border-radius:5px;
    font-size:14px;
    text-align:center;
}

.spinner {
    margin-left:10px;
}
