body {
    background: #2c3e50;
    color: white;
    font-family: sans-serif;
    text-align: center;
}

#game-container {
    margin-top: 20px;
}

canvas {
    background: #34495e;
    border: 4px solid #ecf0f1;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: none;
    /* On cache le curseur pour que seule la pièce soit visible */
}

#game-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}


#status {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #e74c3c;
}

#ui-container {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.hand {
    border: 2px solid #7f8c8d;
    padding: 10px;
    border-radius: 8px;
    width: 200px;
}

.pieces-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.piece-option {
    background: #bdc3c7;
    border: 2px solid transparent;
    cursor: pointer;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.piece-option:hover {
    background: #ecf0f1;
}

.piece-option.selected {
    border-color: #f1c40f;
    background: #f39c12;
}

#main-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
}

.inventory {
    background: #34495e;
    padding: 15px;
    border-radius: 10px;
    border: 3px solid #7f8c8d;
    width: 135px;
    transition: all 0.4s ease;
}
.abandon-btn {
    margin-top: 20px;
    background: #c0392b;
    font-size: 0.8rem;
    width: 100%;
}

.abandon-btn:hover { background: #e74c3c; }

/* Classe pour griser le côté inactif */
.disabled-side {
    opacity: 0.3;
    pointer-events: none; /* Empêche tout clic sur les pièces ou le bouton */
    filter: grayscale(80%);
    transition: all 0.4s ease;
}



/* Couleur de sélection selon le joueur */
.p1-selected {
    border-color: #e74c3c;
    box-shadow: 0 0 10px #e74c3c;
}

.p2-selected {
    border-color: #3498db;
    box-shadow: 0 0 10px #3498db;
}

.piece-card {
    background: #34495e;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centre le dessin et le texte */
    gap: 5px;
    transition: transform 0.1s;
}

.piece-card:active {
    transform: scale(0.95);
}

.piece-card:hover {
    background: #455a64;
}

.piece-card[style*="opacity: 0.2"] {
    pointer-events: none;
    /* Empêche de cliquer sur une pièce épuisée */
}

.pieces-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Affiche les pièces sur 2 colonnes dans l'inventaire */
    gap: 8px;
}

.hidden {
    display: none !important;
}

#game-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#modal-content {
    background: #34495e;
    padding: 20px;
    border: 3px solid white;
    border-radius: 10px;
}