/* Variables et base */
:root {
    --primary-color: #4a69bd;
    --secondary-color: #1e3799;
    --tertiary-color: #0c2461;
    --accent-color: #f6b93b;
    --dark-color: rgba(34, 47, 62,0.5);
    --light-color: #f5f6fa;
    --danger-color: #e55039;
    --success-color: #78e08f;
    
    --team1-color: #4a69bd;
    --team2-color: #e55039;
    --team3-color: #78e08f;
    --team4-color: #f6b93b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #2c3e50;
    background-image: url('../assets/bgGame.png');
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.font-pixel {
    font-family: 'Press Start 2P', cursive;
}
#team-setup-screen,#dice-screen{
        padding: 2rem;

}
/* Container et écrans */
.game-container {
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-width: 1200px;
    background-color: rgba(9, 10, 34, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    /* padding: 2rem; */
}

.active-screen {
    display: block;
}

h1, h2, h3 {
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    line-height: 1.4;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light-color);
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Welcome Screen */
.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70vh;
    position: relative;
}

.title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 20px
    );
    background-size: 100% 20px;
    pointer-events: none;
    z-index: 1;
}

.title-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 20px
    );
    background-size: 20px 100%;
    pointer-events: none;
    z-index: 1;
}

/* Buttons */
.retro-button {
    font-family: 'Press Start 2P', cursive;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--tertiary-color);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
}

.retro-button:hover {
    background-color: #303f9f;
}

.retro-button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--tertiary-color);
}

.retro-button-container {
    margin-top: 2rem;
}

.buttons-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Team Setup Screen */
.teams-container {
    display: grid;
    grid-template-columns: 300px 300px;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 800px;
    justify-content: center;
}

.team-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.team-card:hover {
    transform: translateY(-5px);
}

.color-indicator {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
}

/* .team1-color {
    background-color: var(--team1-color);
} */
      .team1-color::before {
            content: '🍇';
            font-size: x-large;
            display: flex;
            justify-content: center;
            align-items: center;
            vertical-align: middle;
        }
/* .team2-color {
    background-color: var(--team2-color);
} */
       .team2-color::before {
            content: '🍓';
            font-size: x-large;
            display: flex;
            justify-content: center;
            align-items: center;
            vertical-align: middle;
        }

/* .team3-color {
    background-color: var(--team3-color);
}
*/
      .team3-color::before {
            content: '🥝';
            font-size: x-large;
            display: flex;
            justify-content: center;
            align-items: center;
            vertical-align: middle;
        }

/*
.team4-color {
    background-color: var(--team4-color);
} */
      .team4-color::before {
            content: '🍍';
            font-size: x-large;
            display: flex;
            justify-content: center;
            align-items: center;
            vertical-align: middle;
        }

        
.player-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.player-input {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.team-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Dice Screen */
.dice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
}

.dice-container.shake {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translateX(0) translateY(0); }
    10% { transform: translateX(-5px) translateY(-3px); }
    20% { transform: translateX(5px) translateY(3px); }
    30% { transform: translateX(-3px) translateY(4px); }
    40% { transform: translateX(3px) translateY(-4px); }
    50% { transform: translateX(-5px) translateY(5px); }
    60% { transform: translateX(5px) translateY(-5px); }
    70% { transform: translateX(-3px) translateY(-3px); }
    80% { transform: translateX(3px) translateY(3px); }
    90% { transform: translateX(-2px) translateY(-2px); }
    100% { transform: translateX(0) translateY(0); }
}

.active-team-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

#current-team-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.dice {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.5s;
}

.dice-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15%;
    border: 3px solid #000;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #333, #000);
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.3);
    align-self: center;
    justify-self: center;
    transition: all 0.2s;
}
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10000;
}
.dice.rolling .dot {
    transform: scale(1.2);
    background: radial-gradient(circle at 30% 30%, #ff0000, #990000);
    box-shadow: 0 0 5px #ff0000;
}

.dice[data-value="1"] .dot:not(.center) {
    display: none;
}

.center {
    /* grid-area: 2 / 2; */
    justify-self: center;
    align-self: center;
}

.dice.rolling {
    animation: rolling 1.5s ease-in-out infinite, glow 1s infinite alternate;
    transform-style: preserve-3d;
    transform-origin: center center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* Style pour le dé en fullscreen */
.dice-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dice-fullscreen-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.dice-fullscreen {
    transform: scale(2);
}

@keyframes glow {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
    100% { box-shadow: 0 0 40px rgba(0, 255, 255, 0.8); }
}

@keyframes rolling {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    }
    10% {
        transform: rotateX(180deg) rotateY(90deg) rotateZ(45deg) scale(1.1);
    }
    20% {
        transform: rotateX(360deg) rotateY(180deg) rotateZ(90deg) scale(1);
    }
    30% {
        transform: rotateX(540deg) rotateY(270deg) rotateZ(135deg) scale(1.1);
    }
    40% {
        transform: rotateX(720deg) rotateY(360deg) rotateZ(180deg) scale(1);
    }
    50% {
        transform: rotateX(900deg) rotateY(450deg) rotateZ(225deg) scale(1.1);
    }
    60% {
        transform: rotateX(1080deg) rotateY(540deg) rotateZ(270deg) scale(1);
    }
    70% {
        transform: rotateX(1260deg) rotateY(630deg) rotateZ(315deg) scale(1.1);
    }
    80% {
        transform: rotateX(1440deg) rotateY(720deg) rotateZ(360deg) scale(1);
    }
    90% {
        transform: rotateX(1620deg) rotateY(810deg) rotateZ(405deg) scale(1.1);
    }
    100% {
        transform: rotateX(1800deg) rotateY(900deg) rotateZ(450deg) scale(1);
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Game Board Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: rgba(12, 15, 41, 0.9);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.timer-icon {
    color: var(--accent-color);
}

.timer {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: var(--accent-color);
}

.timer.warning {
    color: #ff9800;
    animation: pulse 1s infinite;
}

.timer.danger {
    color: #f44336;
    animation: pulse 0.5s infinite;
}

.team-info {
    display: flex;
    gap: 1.5rem;
}

.turn-indicator, .active-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exit-button {
    background: none;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#active-team-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.scores-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.team-score {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-score.team1 {
    background-color: rgba(74, 105, 189, 0.3);
    border: 1px solid var(--team1-color);
}

.team-score.team2 {
    background-color: rgba(229, 80, 57, 0.3);
    border: 1px solid var(--team2-color);
}

.team-score.team3 {
    background-color: rgba(120, 224, 143, 0.3);
    border: 1px solid var(--team3-color);
}

.team-score.team4 {
    background-color: rgba(246, 185, 59, 0.3);
    border: 1px solid var(--team4-color);
}

.team-name {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.score {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.8rem;
    aspect-ratio: 5 / 4;
    padding: 1rem;
    margin: 1.5rem auto;
    background-color: transparent;
    border-radius: 0;
    min-width: 550px;
    min-height: 600px;
    max-width: 650px;
}

.board-cell {
    min-width: 85px;
    min-height: 85px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0.5rem;
}

.board-cell::before {
    content: attr(data-id);
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.board-cell:hover {
    transform: scale(1.05);
    z-index: 1;
}

.board-cell.active-player {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
    z-index: 2;
}

.player-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: -10px;
    right: -10px;
    /* border: 2px solid white; */
    z-index: 3;
}

.board-cell.property {
    background-color: #e74c3c;
}

.board-cell.bonus {
    background-color: #c4ba2d;
}

.board-cell.facture {
    background-color: #db531e;
}

.board-cell.interaction {
    background-color: #3498db;
}

.board-cell.biens {
    background-color: #ffffff;
}

.board-cell.pdb {
    background-color: #36ce69;
}
.board-cell.redevance {
    background-color: #008b1e;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.board-cell.depart {
    background-color: #ffffff;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #000;
    text-align: center;
}

.board-cell.logo {
    background: linear-gradient(rgba(255,255,255,.5), rgba(0,0,0,.9)), url('https://www.portlarochelle.com/wp-content/uploads/2020/11/logo-Marianne.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000000;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    color: var(--accent-color);
    width: 200px;
    height: 180px;
    position: absolute;
    top: 35%;
    left: 42%;
    font-family: 'Press Start 2P', cursive;
    font-weight: 600;
    font-size: medium;
    text-align: center;
    line-height: 1.4;


}
.board-cell.logo::before,.board-cell.depart::before {
    display: none;  /* Cela cache le pseudo-élément, donc l'ID ne s'affiche pas */
}
.cell-icon {
    width: 70%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.card-front-icon{
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.card-front-icon svg rect, svg{
    width: 90% !important;
  
}
.card-front-icon svg{
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cell-icon svg {
    height: 100%;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Overlay du dé en plein écran */
.dice-fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 20;
    justify-content: center;
    align-items: center;
}

.dice-fullscreen-overlay.show {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.dice-fullscreen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.dice-fullscreen {
    width: 200px;
    height: 200px;
    perspective: 800px;
}

.dice-fullscreen .dice-face {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2), 
                0 10px 20px rgba(0, 0, 0, 0.3), 
                inset 0 2px 10px rgba(255, 255, 255, 0.8);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 20px;
    position: relative;
}

.dice-fullscreen .dot {
    background: linear-gradient(145deg, #333, #000);
    box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.5),
                0 0 10px rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    position: absolute;
}

/* Positionnement des points sur le dé en plein écran */
.dice-fullscreen .dot.top-left {
    top: 20px;
    left: 20px;
}

.dice-fullscreen .dot.top-right {
    top: 20px;
    right: 20px;
}

.dice-fullscreen .dot.middle-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.dice-fullscreen .dot.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dice-fullscreen .dot.middle-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.dice-fullscreen .dot.bottom-left {
    bottom: 20px;
    left: 20px;
}

.dice-fullscreen .dot.bottom-right {
    bottom: 20px;
    right: 20px;
}

.dice-fullscreen.rolling {
    animation: roll3D 1.5s infinite linear;
    transform-style: preserve-3d;
}

.dice-fullscreen-container.shake {
    animation: shakeHeavy 0.5s infinite;
}

@keyframes roll3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(45deg) rotateZ(180deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(90deg) rotateZ(360deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(135deg) rotateZ(540deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(180deg) rotateZ(720deg);
    }
}

@keyframes shakeHeavy {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, -10px) rotate(-2deg); }
    50% { transform: translate(10px, 10px) rotate(2deg); }
    75% { transform: translate(-6px, 6px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 90%;
    width: 400px;
    color: #333;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: popup-scale 0.3s ease-out;
}

/* Style spécifique pour les cartes popup */
.card-popup {
    position: relative;
    border: 2px solid #e5e5e5;
    padding: 1.5rem;
}
.modal {
    display: none;  /* Si c'est là, changez-le en block ou remove-le */
    position: fixed;  /* Assure que c'est affiché au-dessus */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);  /* Fond semi-transparent */
    z-index: 1000;  /* Très important pour qu'il soit au-dessus des autres éléments */
    overflow: auto;
    color: #000;
}

    .history-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: var(--secondary-color);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-width: 80%;
        max-height: 100vh;
        overflow-y: auto;
        font-family: 'Arial', sans-serif;
    }

    .history-modal h3 {
        color: var(--light-color);
        font-size: 24px;
        margin-bottom: 20px;
    }

    .history-item {
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background-color: #f9f9f9;
    }

    .history-item h4 {
        margin: 0 0 10px;
        color: #555;
        font-size: 18px;
    }

    .history-item p {
        margin: 5px 0;
        color: #666;
    }

    .history-item .score-details {
        margin-left: 20px;
    }

    
.history-item .score-details p {
        margin: 5px 0;
        color: #888;
    }
#show-history-button{
    color: #fff;
}
    .history-modal .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #ff4757;
        color: white;
        border: none;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
    }

    .history-modal .close-btn:hover {
        background-color: #ff6b81;
    }

.card-description {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: #f0f0f0;
    text-align: center;
}

.special-amount {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    /* background-color: rgba(255, 255, 255, 0.3); */
    padding: 8px;
    border-radius: 10px;
    color: var(--accent-color);
    margin: 1rem 0;
    animation: amount-pulse 1.5s infinite alternate;
    /* -webkit-text-stroke-width: 0.1px;
    -webkit-text-stroke-color: white; */
}

.danger-amount {
    color: var(--danger-color) !important;
    -webkit-text-stroke-width: 0.1px;
    -webkit-text-stroke-color: white;
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    color: white;
    background-color: var(--primary-color);
}

.bonus-icon {
    background-color: var(--accent-color);
}

.facture-icon {
    background-color: var(--danger-color);
}

.interaction-icon {
    background-color: var(--primary-color);
}

.pdb-icon {
    background-color:   #00b894;
}

.biens-icon {
    background-color: #ffffff;
}

.team-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.team-option {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-option:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.small-button {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

/* Animation pour les popups */
@keyframes popup-scale {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation pour les montants */
@keyframes amount-pulse {
    0% { 
        transform: scale(1); 
    }
    100% { 
        transform: scale(1.1); 
    }
}

.property-icon, .video-play-icon {
    color: var(--primary-color);
    margin: 0 auto 1rem auto;
    display: block;
}

.property-value {
    margin: 1.5rem 0;
}

#property-value-amount {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.video-container {
    background-color: #f1f2f6;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    margin-bottom: 1rem;
}

.video-progress {
    width: 100%;
    height: 4px;
    background-color: #ddd;
    margin-top: 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.1s linear;
}

.video-duration {
    text-align: right;
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.3rem;
}

.win-badge {
    width: 120px;
    height: 40px;
    margin: 0 auto 1.5rem auto;
    background-color: rgba(246, 185, 59, 0.2);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse-win 1s infinite alternate;
}

.win-text {
    font-family: 'Press Start 2P', cursive;
    color: var(--accent-color);
    font-weight: bold;
    animation: scale-text 2s infinite alternate;
}

/* Animation de victoire */
.win-celebration #win-modal .modal-content {
    animation: celebration-bg 5s infinite;
}

@keyframes pulse-win {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(246, 185, 59, 0.5); }
    100% { transform: scale(1.1); box-shadow: 0 0 20px rgba(246, 185, 59, 0.8); }
}

@keyframes scale-text {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* @keyframes celebration-bg {
    0%, 100% { background-color: white; }
    25% { background-color: rgba(246, 185, 59, 0.1); }
    50% { background-color: rgba(189, 74, 179, 0.1); }
    75% { background-color: rgba(229, 80, 57, 0.1); }
} */

/* Points pour le dé normal */
.dice-face .dot:not(.dice-fullscreen .dot) {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #333;
}

/* Points pour les badges de l'interface */
.win-badge .dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.win-badge .top-left {
    top: -5px;
    left: -5px;
    background-color: var(--team1-color);
}

.win-badge .top-right {
    top: -5px;
    right: -5px;
    background-color: var(--team2-color);
}

.win-badge .bottom-left {
    bottom: -5px;
    left: -5px;
    background-color: var(--team4-color);
}

.win-badge .bottom-right {
    bottom: -5px;
    right: -5px;
    background-color: var(--team3-color);
}

.final-score {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    margin: 1rem 0 1.5rem 0;
    color: var(--primary-color);
}

.exit-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.confirm-button, .cancel-button {
    font-family: 'Press Start 2P', cursive;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.confirm-button {
    background-color: var(--accent-color);
}

.cancel-button {
    background-color: var(--danger-color);
}

/* Player List */
#player-list {
    margin: 1rem 0;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.player {
    font-size: 1rem;
    margin: 0.5rem 0;
}

.current-player {
    font-weight: bold;
    color: var(--accent-color);
}

/* Styles pour les notifications */
.game-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: bold;
    max-width: 300px;
}

.game-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .teams-container {
        grid-template-columns: 1fr;
    }
    
    .team-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .dice {
        width: 80px;
        height: 80px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
}

.teams-corner-container {
    position: relative;
    width: 100%;
    height: 0;
}
.team-corner {
    position: absolute;
    min-width: 120px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    z-index: 2;
    color: #fff;
    pointer-events: none;
}
.team-corner.top-right {
    top: -2.5rem;
    right: 0;
    text-align: right;
}
.team-corner.top-left {
    top: -2.5rem;
    left: 0;
    text-align: left;
}
.team-corner.bottom-right {
    bottom: -2.5rem;
    right: 0;
    text-align: right;
}
.team-corner.bottom-left {
    bottom: -2.5rem;
    left: 0;
    text-align: left;
}
.team-corner .team-name {
    font-weight: bold;
    margin-bottom: 0.2rem;
    display: block;
}
.team-corner .player {
    font-size: 0.95rem;
    margin: 0.1rem 0;
}

.active-team-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    background-color: rgba(20, 30, 70, 0.7);
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 1.1rem;
    align-items: center;
}

.score-blocks {
    display: flex;
    justify-content: space-between;
    margin: 0 auto 1rem auto;
    max-width: 650px;
}

.team-score-block {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    margin: 12px;
}

.team-score-block.team1 {
    background-color: #3498db;
    width: 150px;
}

.team-score-block.team2 {
    background-color: #e74c3c;
    color: white;
    width: 150px;
}

.team-score-block.team3 {
    background-color: var(--team3-color);
    width: 150px;
}

.team-score-block.team4{
    background-color: var(--team4-color);
    color: white;
    width: 150px;
}

.player-list-bottom {
    background-color: rgba(20, 30, 70, 0.6);
    padding: 1rem;
    margin: 0 auto;
    max-width: 650px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.player-list-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.player-list-content {
    display: flex;
    gap: 1rem;
}

.timer-display {
    font-family: 'Press Start 2P', cursive;
    color: #f6b93b;
    background-color: rgba(10, 20, 50, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-icon {
    color: #f6b93b;
}

/* Panneau d'équipes latéraux */
.game-board-container {
    position: relative;
}

/* Équipes activement visibles */
.team-panel-content.active-panel {
    box-shadow: 0 0 15px 3px rgba(246, 185, 59, 0.7);
}

.active-player-highlight {
    background: linear-gradient(to right, rgb(246, 185, 59, 0.2), rgba(246, 185, 59, 0.05));
    color: white;
    font-weight: bold;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border-left: 3px solid #f6b93b;
    display: flex;
    align-items: center;
}

/* Styles pour les quiz */
.quiz-container {
    margin: 1.5rem 0;
}

.quiz-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.quiz-answer {
    background-color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: bold;
    color: white;
}

.quiz-answer:hover {
    background-color: var(--primary-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.quiz-answer.correct {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.quiz-answer.wrong {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}
/* Etat "danger" pour la carte bonus (quand amount < 0) */
#bonus-modal .modal-content.card-popup.danger {
  background: #3a0d10; /* rouge sombre */
  border: 2px solid #e74c3c;
  box-shadow: 0 0 16px rgba(231,76,60,.35) inset, 0 8px 24px rgba(231,76,60,.25);
}

/* Optionnel: teinte le bouton */
#bonus-modal .modal-content.card-popup.danger .retro-button {
  background-color: #e74c3c;
  border-color: #c0392b;
}

/* Déjà vu précédemment, au cas où */
.success-amount { color: #2ecc71; }
.danger-amount { color: #e74c3c; }
.quiz-answer.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.team-option {
    border: 2px solid var(--accent-color);
    /* box-shadow: 0 0 10px rgba(246, 185, 59, 0.5); */
    font-weight: bold;
    margin: 5px;
}

.team-option.current-team::after {
    content: " 👑";
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .quiz-answers {
        grid-template-columns: 1fr;
    }
}