:root {
    --primary-color: #0a3d2a;
    --secondary-color: #1a5f3f;
    --accent-color: #d4af37;
    --light-color: #f8f1e1;
    --dark-color: #051e0f;
    --card-back: linear-gradient(145deg, #1a5f3f, #0a3d2a);
    --red-suit: #d90429;
    --black-suit: #000000;
    --highlight: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: var(--light-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

.game-container {
    background: rgba(10, 61, 42, 0.95);
    border-radius: 20px;
    padding: 25px;
    width: 95%;
    max-width: 1000px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 3px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(90deg, var(--accent-color), #f5d742, var(--accent-color));
}

.header {
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 10px;
}

.game-stage {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.game-message {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 20px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    border-left: 5px solid var(--accent-color);
    text-align: center;
    box-shadow: var(--shadow);
}

.community-cards-container {
    background: rgba(20, 80, 50, 0.5);
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    border: 2px dashed var(--accent-color);
}

.community-cards {
    display: flex;
    justify-content: center;
    gap: 15px;
    min-height: 150px;
    flex-wrap: wrap;
}

.players-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 20px;
}

.player {
    background: rgba(26, 95, 63, 0.7);
    border-radius: 15px;
    padding: 15px;
    width: 48%;
    box-shadow: var(--shadow);
    border: 2px solid var(--accent-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.player::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), #f5d742, var(--accent-color));
}

.player.active {
    border: 2px solid var(--light-color);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.player.folded {
    opacity: 0.6;
    background: rgba(150, 50, 50, 0.3);
}

.player-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.player-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    min-height: 130px;
}

.player-stats {
    display: flex;
    justify-content: space-around;
    font-size: 1.1rem;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.player-stats .chips {
    font-weight: bold;
    color: var(--accent-color);
}

.player-status {
    margin-top: 10px;
    font-style: italic;
    color: #aaa;
    text-align: center;
    font-size: 0.9rem;
}

/* ======================
   🃏 DESIGN DES CARTES
   ====================== */
.card {
    width: 80px;
    height: 120px;
    background: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #000;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
}

.card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.card.hidden {
    background: var(--card-back);
    color: transparent;
    border: none;
}

.card.hidden::before {
    content: "🂡";
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card .value {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: bold;
}

.card.♥ .value, .card.♦ .value {
    color: var(--red-suit);
}

.card.♣ .value, .card.♠ .value {
    color: var(--black-suit);
}

.card .suit {
    font-size: 1.5rem;
}

.card .suit-top {
    position: absolute;
    top: 5px;
    left: 5px;
}

.card .suit-bottom {
    position: absolute;
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

/* ======================
   💰 POT ET BLINDS
   ====================== */
.pot-container {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid var(--accent-color);
}

.pot {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.blinds {
    font-size: 1.1rem;
    color: var(--light-color);
}

/* ======================
   🎮 BOUTONS D'ACTION
   ====================== */
.action-panel {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid var(--accent-color);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(0.95);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
}

.btn.new-game {
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.btn.fold {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn.check {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn.call {
    background: linear-gradient(135deg, #f39c12, #d68910);
}

.btn.raise {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.raise-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

#raise-amount {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    width: 100px;
    text-align: center;
    font-size: 1rem;
    background: var(--light-color);
    color: var(--dark-color);
    box-shadow: var(--shadow);
}

/* ======================
   📜 HISTORIQUE
   ====================== */
.action-history {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 15px;
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
    font-size: 0.95rem;
    border: 1px solid var(--accent-color);
}

.action-history::-webkit-scrollbar {
    width: 8px;
}

.action-history::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.action-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* ======================
   🎭 ANIMATIONS
   ====================== */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.card {
    animation: slideIn 0.5s ease-out forwards;
}

.player.active .player-cards .card {
    animation: pulse 1.5s infinite;
}

.player.winner {
    animation: shake 0.5s 3;
    background: rgba(212, 175, 55, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        width: 98%;
        padding: 15px;
    }

    .players-container {
        flex-direction: column;
    }

    .player {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 80%;
        justify-content: center;
    }

    .raise-container {
        flex-direction: column;
        width: 80%;
    }

    #raise-amount {
        width: 100%;
    }
}