* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    max-width: 1400px;
    width: 100%;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.poker-table {
    background: linear-gradient(135deg, #0a5f0a 0%, #0d8b0d 100%);
    border: 12px solid #8B4513;
    border-radius: 200px;
    width: 100%;
    height: 650px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* Community Cards */
.community-cards {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
}

/* Pot */
.pot {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 10px;
}

.pot-label {
    font-size: 12px;
    color: #ffd700;
}

#pot-amount {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

/* Card Styles */
.card {
    width: 60px;
    height: 84px;
    border-radius: 5px;
    border: 2px solid #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    background: white;
    color: black;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.card-back {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: transparent;
}

.card-back::before {
    content: "🂠";
    position: absolute;
    font-size: 40px;
    color: white;
}

.card.red {
    color: #dc2626;
}

.card.black {
    color: #000000;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.card-rank {
    font-size: 20px;
}

.card-suit {
    font-size: 28px;
}

/* Player Positions */
.player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.player-info {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 120px;
    text-align: center;
}

.player-name {
    font-weight: bold;
    font-size: 14px;
}

.player-chips {
    color: #ffd700;
    font-size: 13px;
}

.player-role {
    font-size: 11px;
    color: #90ee90;
    margin-top: 2px;
}

.player-status {
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 2px;
    font-weight: bold;
}

.player-cards {
    display: flex;
    gap: 5px;
}

.player-bet {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
    color: #ffd700;
    min-width: 60px;
    text-align: center;
}

.player.active {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

/* Player Position Layout - Clockwise from dealer (player 0) */
.player-0 {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.player-1 {
    bottom: 10px;
    left: 20%;
}

.player-2 {
    bottom: 80px;
    left: 8%;
}

.player-3 {
    top: 20%;
    left: 5%;
}

.player-4 {
    top: 10px;
    left: 25%;
}

.player-5 {
    top: 10px;
    right: 25%;
}

.player-6 {
    top: 20%;
    right: 5%;
}

.player-7 {
    bottom: 80px;
    right: 8%;
}

.player-8 {
    bottom: 10px;
    right: 20%;
}

/* Action Panel */
.action-panel {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.game-message {
    font-size: 18px;
    margin-bottom: 15px;
    min-height: 30px;
    color: #90ee90;
}

.feedback-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #ffd700;
}

.feedback-panel.optimal {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
}

.feedback-panel.suboptimal {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.feedback-panel.hidden {
    display: none;
}

#feedback-message {
    font-size: 16px;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons.hidden {
    display: none;
}

.action-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.action-btn:hover {
    transform: scale(1.05);
}

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

.fold-btn {
    background: #ef4444;
    color: white;
}

.fold-btn:hover {
    background: #dc2626;
}

.call-btn {
    background: #3b82f6;
    color: white;
}

.call-btn:hover {
    background: #2563eb;
}

.raise-btn {
    background: #f59e0b;
    color: white;
}

.raise-btn:hover {
    background: #d97706;
}

.all-in-btn {
    background: #8b5cf6;
    color: white;
}

.all-in-btn:hover {
    background: #7c3aed;
}

.new-hand-btn {
    background: #22c55e;
    color: white;
    margin-top: 10px;
}

.new-hand-btn:hover {
    background: #16a34a;
}

.raise-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.raise-controls.hidden {
    display: none;
}

#raise-slider {
    width: 200px;
}

#raise-amount {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    min-width: 80px;
}

/* Dealer Button */
.dealer-button {
    position: absolute;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Winning hand highlight */
.player.winner .player-info {
    border: 3px solid #ffd700;
    background: rgba(255, 215, 0, 0.3);
    animation: winner-pulse 0.5s ease-in-out 3;
}

@keyframes winner-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Game Options / Toggle */
.game-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-label {
    font-size: 14px;
    color: white;
}

#show-all-cards-toggle {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #22c55e;
}
