
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    max-width: 90vw;
    max-height: 90vh;
}

.screen {
    display: none;
    text-align: center;
}

.screen.active {
    display: block;
}

h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instructions {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

#gameCanvas {
    border: 2px solid #ddd;
    border-radius: 15px;
    background: #f8f9fa;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.game-info {
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: #555;
}

.error-message {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%); /* centre parfaitement */
  background: rgba(255, 0, 0, 0.85);
  color: white;
  font-size: 1.2em;
  padding: 1em 2em;
  border-radius: 12px;
  display: none; /* masqué par défaut */
  z-index: 1000; /* passe au-dessus du jeu */
  text-align: center;
}

.participant-input {
    margin-bottom: 2rem;
}

.participant-input input {
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 300px;
    max-width: 100%;
    text-align: center;
}

.participant-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.results {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
    text-align: left;
}

.results h3 {
    color: #333;
    margin-bottom: 1rem;
}

.results p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}