body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background:linear-gradient(135deg, #6cbcff, #2575e7);
    font-weight: 600;
    text-shadow: 1px 1px 0 #000000ad;
}

.container, #title-screen, #game-screen {
    text-align: center;
    background: linear-gradient(135deg, #2a2c43, #13111b);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    max-width: calc(100% - 20px);
}

h1 {
    color: #fff;text-shadow: 2px 2px 0 #000000ad;
    margin-top:0;
}

#combinaison {
    font-size: 2em;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 2px 2px 0 #000000ad;
}

.carte1 {
    color: #de4c4c;
}

.carte2 {
    color: #b574ec;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    color: white;
    background: #414572;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition:0.4s;
}

button:hover {
    background: #be2166;
}
#end-game, #fin-partie, #team-end-game {
  background: #e03732;
}
#end-game:hover, #fin-partie:hover, #team-end-game:hover {
  color: #e03732;
  background: #fff;
}

.rules-btn, .filter-btn {
    border-radius:50px;
    width: 40px;
    height: 40px;
    background:#000000c4;
    position: fixed;
    font-size: 25px;
    line-height: 42px;
    box-sizing: border-box;
    text-align: center;
    padding:0;
    top: 10px;
    cursor: pointer;
    margin: 0;
    box-shadow: 0 0 1px #00000085, 0 0 3px #00000085, 0 0 5px #00000085, 0 0 1px #000000;;
}

.rules-btn {
    right: 10px;
}

.filter-btn {
    left: 10px;
}

.popup {
    display: none;
    position: absolute;
    top: 50px;
    right: 10px;
    color: #fff;
    background: linear-gradient(135deg, #13121c, #292b42);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-width: calc(100% - 20px);
}

.popup#confirm-end {
  top: calc(50% - 92px);
  right: calc(50% - 175px);
  width: 350px;
  height: 175px;
  box-sizing: border-box;
  text-align: center;
}

.popup h3, .filter-popup h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #6cbcff;
}

.filter-popup {
    display: none;
    position: absolute;
    top: 50px;
    left: 10px;
    padding: 15px;
    color: #fff;
    background: linear-gradient(135deg, #13121c, #292b42);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-width: calc(100% - 20px);
}

.filter-popup label {
    display: block;
    margin-bottom: 5px;
}

.score-graph {
    margin-top: 20px;
}

.score-graph canvas {min-width: 350px;  min-height: 200px;}

.player-count, .target-score{
    display: flex;
    justify-content: center;
}
.player-count i, .target-score i {
    font-size: 2em;
}

#player-number, #target-score-input {
    display: flex;
    justify-content: center;
    min-width: 50px;
    padding:10px;
    font-size: 2em;
    font-weight: 900;
    color: #fff;
}

.player-inputs {
    margin-bottom: 10px;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap:10px;
}

.player-inputs input {
    border-style:solid;
    border-width:4px;
    font-size: 1.2em;
    border-radius: 4px;
    text-shadow: 2px 1px 1px #ffffffad;
    font-weight: 600;
}
.player-inputs input:focus-visible {
    border:solid 4px #fff !important;
    outline: 0;
}
.player-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 5px;
}

.score-selection {
    margin-top: 20px;
}

.score-selection button {
    margin: 5px;
}

.score-btn {
  text-transform: uppercase;
}

.score-btn.selected {
  color: #414572;
  font-weight: 600;
  background:#fff;
}

.target-score-txt, .player-count-txt, .team-setup-screen h3, .team-setup-screen p, .team-gameplay-screen h3, .team-gameplay-screen p {
  color:#6cbcff;
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom:10px;
}

#round-info, #team-score-display{
  color:#6cbcff;
}

.winner {
  color:gold;
  font-size: 1.6em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Affichage des rubriques */
.speed-mime-screen #donner-points, .speed-mime-screen #replay-game, .speed-mime-screen #accueil {display:none !important;}
.player-number-screen #generer, .player-number-screen #replay-game, .player-number-screen #accueil, .player-number-screen #donner-points {display:none !important;}
.mime-screen #generer, .mime-screen #replay-game, .mime-screen #accueil {display:none !important;}
.mime-screen #combinaison, .mime-screen #donner-points, .mime-screen #end-game {display:block !important;}
#score-selection p {font-size: 1.6em;color:#fff;text-shadow: 2px 2px 0 #000000ad;}
.add-pts-screen #generer, .add-pts-screen #replay-game, .add-pts-screen #accueil, .add-pts-screen #combinaison {display:none !important;}
.score-screen #combinaison, .score-screen #generer, .score-screen #donner-points, .score-screen #end-game {display:none !important;}
.team-gameplay-screen > .combinaison, .team-setup-screen > .combinaison, .team-gameplay-screen > button, .team-setup-screen > button {display:none;}

/* Styles pour le bouton passer */
#passer-combo {
    background-color: #e03732;
}
#passer-combo:hover {
    background-color: #c52e29;
}
/* Masquer le bouton Passer dans les vues où il n'est pas nécessaire */
.player-number-screen #passer-combo,
.score-screen #passer-combo,
.add-pts-screen #passer-combo {
    display: none !important;
}

/* Styles pour le mode équipe */
.team-color-red { color: #e03732; }
.team-color-blue { color: #3357FF; }

/* Inputs équipe */
#team-setup {
    text-align: center;
    padding: 15px;
}

.team-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.team-inputs input {
    padding: 10px;
    border-radius: 5px;
    border: 3px solid;
    font-size: 1.2em;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    font-weight: 600;
}

#team1-name {
    border-color: #e03732;
    background: rgba(224, 55, 50, 0.2);
    color: #fff;
}

#team2-name {
    border-color: #3357FF;
    background: rgba(51, 87, 255, 0.2);
    color: #fff;
}

.rounds-count {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#rounds-number {
    display: flex;
    justify-content: center;
    min-width: 50px;
    padding: 10px;
    font-size: 2em;
    font-weight: 900;
    color: #fff;
}

/* Écran de jeu */
.team-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
}

/* Compte à rebours et timer */
#countdown {
    font-size: 5em;
    color: #fff;
    font-weight: bold;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#timer-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

#timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5em;
    color: #fff;
    font-weight: bold;
}

#team-combinaison {
    font-size: 2em;
    margin: 20px 0;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 2px 2px 0 #000000ad;
    min-height: 60px;
}

.team-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.team-score-display {
    font-size: 1.6em;
    color: #fff;
    font-weight: bold;
    margin: 10px 0;
}

.team-buttons {
    display: flex;
    gap: 10px;
}

/* Styles boutons action */
#team-next-combo { background-color: #33a852; }
#team-next-combo:hover { background-color: #2c9247; }

#team-skip-combo { background-color: #e03732; }
#team-skip-combo:hover { background-color: #c52e29; }

#team-pause-game { background-color: #ffa500; }
#team-pause-game:hover { background-color: #e69500; }

/* Overlay de pause */
#pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#resume-game {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: #33a852;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(51, 168, 82, 0.5);
    transition: transform 0.3s;
}

#resume-game:hover {
    transform: scale(1.1);
}

#resume-game i {
    font-size: 3em;
    margin-bottom: 8px;
}

/* Confirmation fin de partie */
#team-confirm-end {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    text-align: center;
    z-index: 1100;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

/* Résultats */
#round-result {
    text-align: center;
    padding: 20px;
}

#round-points {
    font-size: 2.5em;
    margin: 20px 0;
    color: #fff;
}

#team-final-results {
    text-align: center;
    padding: 20px;
}

#teams-chart {
    max-width: 350px;
    margin: 20px auto;
}

#winning-team {
    font-size: 1.8em;
    color: gold;
    font-weight: bold;
    margin: 20px 0;
}

.final-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Animation du compte à rebours */
@keyframes countdown {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0; }
}

.animate {
    animation: countdown 1s ease-in-out forwards;
}

/* État inactif */
.inactive {
    opacity: 0.5;
    pointer-events: none;
}
