body {
  font-family: 'Arial', sans-serif;
  background-color: #1e1e1e;
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('image.jpg');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  animation: gradientAnimation 15s ease infinite;
}

.container {
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.header {
  margin-bottom: 20px;
}

h1 {
  color: #9d4dbb;
  text-shadow: 0 0 5px #ff6b6b;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.instructions {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.5;
}

.instructions-highlight {
  color: #4dbbff;
  font-weight: bold;
}

.game-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.game-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4dbbff;
}

.stat-label {
  font-size: 0.8rem;
  color: #aaa;
}

.progress-container {
  width: 100%;
  margin-bottom: 20px;
}

.progress-bar {
  height: 10px;
  width: 100%;
  background-color: #333;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #4dbbff, #9d4dbb);
  transition: width 0.3s;
}

.game-area {
  position: relative;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  min-height: 300px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.current-word-display {
  font-size: 2rem;
  font-weight: bold;
  color: #4dbbff;
  margin: 30px 0;
  padding: 10px 20px;
  background-color: rgba(77, 187, 255, 0.1);
  border-radius: 10px;
  min-width: 200px;
  text-align: center;
}

.next-word {
  font-size: 1.2rem;
  color: #aaa;
  margin-bottom: 20px;
}

.typed-input {
  width: 80%;
  padding: 12px;
  font-size: 1.2rem;
  border: none;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.9);
  margin-top: 20px;
  text-align: center;
}

.start-btn, .restart-btn {
  background: linear-gradient(to right, #4dbbff, #9d4dbb);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.start-btn:hover, .restart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(157, 77, 187, 0.7);
}

.game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  display: none;
}

.result-title {
  color: #4dbbff;
  font-size: 2rem;
  margin-bottom: 20px;
}

.results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.result-stat {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 5px;
  text-align: center;
}

.result-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #9d4dbb;
}

.falling-item {
  position: absolute;
  font-size: 24px;
  color: white;
  animation: fall linear forwards;
  z-index: 1;
}

.feedback {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  opacity: 0;
  transition: all 0.5s;
}

.feedback.correct {
  color: #4caf50;
}

.feedback.incorrect {
  color: #f44336;
}

.feedback.show {
  opacity: 1;
  transform: translateY(-20px);
  filter: drop-shadow(0 0 5px currentColor);
}

.difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.difficulty-btn {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid #555;
  color: #aaa;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.difficulty-btn.active {
  background-color: rgba(77, 187, 255, 0.3);
  color: white;
  border-color: #4dbbff;
}

#comboDisplay {
  font-size: 1.2em;
  font-weight: bold;
  color: #ffcc00; /* Couleur dorée pour le combo */
  text-align: center;
  margin-top: 5px;
}

@keyframes fall {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(300px);
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .game-stats {
    flex-wrap: wrap;
  }
  
  .typed-input {
    font-size: 1rem;
    width: 90%;
  }
  
  .current-word-display {
    font-size: 1.6rem;
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.current-word-display.correct {
  animation: pulse 0.3s ease;
}

