/* poker-game.css */
#poker-game {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f4c3a, #1a5e4a);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.poker-table {
    position: relative;
    background: radial-gradient(ellipse at center, #2d8659 0%, #1a5e4a 100%);
    border: 8px solid #8b4513;
    border-radius: 50%;
    width: 800px;
    height: 500px;
    margin: 0 auto 30px;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.3);
}

.table-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.table-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #ffd700;
}

.table-info p {
    margin: 0;
    font-size: 14px;
    color: #ccc;
}

.game-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.community-cards {
    margin-bottom: 20px;
}

#community-cards-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    width: 50px;
    height: 70px;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card.face-down {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
    color: white;
}

.card.face-down::before {
    content: "🂠";
    font-size: 24px;
}

.card .rank {
    font-size: 14px;
    line-height: 1;
}

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

.card .suit.red {
    color: #dc2626;
}

.card .suit.black {
    color: #1f2937;
}

.pot-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

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

.players-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.player-seat {
    position: absolute;
    width: 120px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.player-seat.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4ade80;
}

.player-seat.current-player {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.player-seat.dealer::before {
    content: "D";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* Position players around the table */
.player-seat[data-position="0"] { top: 20px; left: 50%; transform: translateX(-50%); }
.player-seat[data-position="1"] { top: 80px; right: 50px; }
.player-seat[data-position="2"] { bottom: 80px; right: 50px; }
.player-seat[data-position="3"] { bottom: 20px; left: 50%; transform: translateX(-50%); }
.player-seat[data-position="4"] { bottom: 80px; left: 50px; }
.player-seat[data-position="5"] { top: 80px; left: 50px; }
.player-seat[data-position="6"] { top: 60px; left: 20%; }
.player-seat[data-position="7"] { top: 60px; right: 20%; }
.player-seat[data-position="8"] { bottom: 60px; left: 30%; }

.player-info {
    margin-bottom: 5px;
}

.player-name {
    font-size: 12px;
    font-weight: bold;
    color: #ffd700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-chips {
    font-size: 11px;
    color: #4ade80;
}

.player-cards {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.player-cards .card {
    width: 25px;
    height: 35px;
    font-size: 8px;
}

.player-cards .card .suit {
    font-size: 10px;
}

.join-controls {
    text-align: center;
    margin-top: 20px;
}

.game-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.player-hand {
    text-align: center;
    margin-bottom: 20px;
}

#player-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

#player-cards .card {
    width: 60px;
    height: 85px;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2563eb, #1e40af);
}

.btn-secondary {
    background: linear-gradient(45deg, #6b7280, #4b5563);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #4b5563, #374151);
}

.btn-success {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #059669, #047857);
}

.btn-danger {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
}

#raise-slider {
    width: 150px;
    margin: 0 10px;
    accent-color: #10b981;
}

#raise-amount {
    background: rgba(16, 185, 129, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    color: #10b981;
    font-weight: bold;
    border: 1px solid #10b981;
}

.game-log {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.game-log h4 {
    margin: 0 0 10px 0;
    color: #ffd700;
    font-size: 16px;
}

#log-messages {
    font-size: 12px;
}

.log-message {
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-message.error {
    color: #ef4444;
}

.log-message.info {
    color: #60a5fa;
}

.timestamp {
    color: #9ca3af;
    font-size: 10px;
}

/* Mobile responsive design */
@media (max-width: 768px) {
    #poker-game {
        padding: 10px;
    }
    
    .poker-table {
        width: 100%;
        height: 300px;
        max-width: 500px;
    }
    
    .player-seat {
        width: 80px;
        height: 60px;
        font-size: 10px;
        padding: 5px;
    }
    
    .player-cards .card {
        width: 20px;
        height: 28px;
        font-size: 6px;
    }
    
    .card {
        width: 40px;
        height: 56px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    #raise-slider {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .poker-table {
        height: 250px;
    }
    
    .player-seat {
        width: 60px;
        height: 45px;
        font-size: 8px;
    }
    
    .card {
        width: 30px;
        height: 42px;
        font-size: 8px;
    }
    
    .card .suit {
        font-size: 12px;
    }
    
    .table-info h3 {
        font-size: 14px;
    }
    
    .table-info p {
        font-size: 12px;
    }
}

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

.card.dealt {
    animation: dealCard 0.5s ease-out;
}

@keyframes chipMove {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.pot-info.updated {
    animation: chipMove 0.3s ease;
}

/* Custom scrollbar for game log */
.game-log::-webkit-scrollbar {
    width: 6px;
}

.game-log::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.game-log::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 3px;
}

.game-log::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}