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

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

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

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.poker-table {
    position: relative;
    width: 900px;
    height: 600px;
    margin: 0 auto;
    background: radial-gradient(ellipse at center, #1a5f1a 0%, #0d3d0d 100%);
    border-radius: 300px / 200px;
    border: 15px solid #8B4513;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(0, 0, 0, 0.3);
}

/* Player Positioning Around Table */
.player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.player.active {
    transform: scale(1.1);
}

.player.folded {
    opacity: 0.5;
}

/* Position 0: Human Player (Bottom) */
.position-0 {
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
}

/* Position 1: AI Player 1 (Top Left) */
.position-1 {
    top: -60px;
    left: 80px;
}

/* Position 2: AI Player 2 (Top Center) */
.position-2 {
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
}

/* Position 3: AI Player 3 (Top Right) */
.position-3 {
    top: -60px;
    right: 80px;
}

/* Position 4: AI Player 4 (Bottom Right) */
.position-4 {
    bottom: -60px;
    right: 150px;
}

/* Position 5: AI Player 5 (Bottom Left) */
.position-5 {
    bottom: -60px;
    left: 150px;
}

.player-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
    border: 2px solid #FFD700;
}

.player-name {
    color: #FFD700;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.player-chips {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 3px;
}

.player-bet {
    color: #FF6B6B;
    font-size: 12px;
}

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

.player-status {
    position: absolute;
    bottom: -25px;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

/* Cards */
.card {
    width: 50px;
    height: 70px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    position: relative;
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #fff;
}

.card-back::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

.card-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #000;
}

.card-value {
    font-size: 16px;
    position: absolute;
    top: 3px;
    left: 5px;
}

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

/* Table Center */
.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.community-cards {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.pot-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 50px;
    border: 3px solid #FFD700;
    text-align: center;
}

.pot-label {
    color: #FFD700;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.pot-amount {
    color: #4CAF50;
    font-weight: bold;
    font-size: 24px;
}

/* Dealer Button */
.dealer-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: #000;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

/* Controls */
.controls {
    margin: 30px auto;
    text-align: center;
    padding-top: 80px;
}

.timer-container {
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
}

.timer-label {
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}

.timer-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    margin: 10px 0;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #FFC107 50%, #f44336 100%);
    transition: width 0.1s linear;
    border-radius: 15px;
}

.timer-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

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

.btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

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

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

.btn-check {
    background: #95a5a6;
    color: white;
}

.btn-call {
    background: #3498db;
    color: white;
}

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

.btn-confirm {
    background: #27ae60;
    color: white;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-new-game {
    background: #9b59b6;
    color: white;
    display: block;
    margin: 20px auto;
    padding: 15px 40px;
    font-size: 18px;
}

.raise-controls {
    margin-top: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#raise-slider {
    width: 100%;
    max-width: 400px;
}

.raise-amount-display {
    color: #4CAF50;
    font-size: 24px;
    font-weight: bold;
}

/* Message Container */
.message-container {
    margin: 20px auto;
    text-align: center;
}

#game-message {
    background: rgba(0, 0, 0, 0.7);
    color: #FFD700;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    min-width: 300px;
}

/* Animations */
@keyframes cardDeal {
    from {
        transform: translateY(-100px) rotateY(180deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateY(0);
        opacity: 1;
    }
}

.card-deal-animation {
    animation: cardDeal 0.5s ease-out;
}

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

.pulse {
    animation: pulse 1s infinite;
}
