/* Styles spécifiques pour le jeu de pêche aux syllabes */

/* Zone de l'étang */
.game-pond {
  position: relative;
  height: 250px;
  margin: 20px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: #f0f9ff;
  box-shadow: var(--box-shadow);
}

.water-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 90%;
  background-color: #8ecdf7;
  background-image: linear-gradient(
    to bottom,
    rgba(142, 205, 247, 0.7) 0%,
    rgba(28, 163, 236, 0.9) 100%
  );
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Animation de l'eau */
.water::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: water-wave 4s infinite linear;
}

@keyframes water-wave {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(0%) scale(1.1);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

/* Syllabes flottantes */
.syllables-container {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.syllable {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 3;
}

.syllable:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.syllable.caught {
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Canne à pêche */
.fishing-rod {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 60px;
  background-color: #8B4513;
  border-radius: 5px;
  transform-origin: bottom center;
  z-index: 4;
}

.rod-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 80px;
  background-color: #999;
  transform: translateX(-50%);
  transform-origin: top center;
}

.rod-hook {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #999;
  border-top: none;
  border-right: none;
  border-radius: 0 0 0 10px;
  transform: translateX(-50%);
}

/* Constructeur de mots */
.word-builder {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.word-slots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.word-slot {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--primary-light);
  border-radius: var(--border-radius);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  background-color: white;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
}

.word-slot.filled {
  border: 2px solid var(--primary);
  background-color: var(--primary-light);
  color: white;
}

.word-slot.filled:hover {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #dc3545;
}

.check-word-btn {
  margin-top: 15px;
  transition: all 0.3s;
}

.check-word-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal de victoire et game over */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: white;
  border-radius: var(--border-radius);
  max-width: 90%;
  width: 500px;
  padding: 32px;
  text-align: center;
  position: relative;
  animation: zoomIn 0.3s forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h2 {
  color: var(--primary);
  font-size: 32px;
  margin-bottom: 16px;
}

.trophy-image {
  width: 120px;
  height: 120px;
  margin: 16px 0;
}

.victory-stats, .gameover-stats {
  margin: 24px 0;
}

.victory-stats p, .gameover-stats p {
  margin: 8px 0;
  font-size: 18px;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* Bouton flottant d'aide */
.floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: white;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: var(--transition);
  z-index: 100;
}

.floating-btn:hover {
  background-color: var(--secondary-dark);
  transform: scale(1.1);
}

/* Fenêtre d'aide */
.help-instructions {
  margin: 24px 0;
}

.help-step {
  display: flex;
  align-items: center;
  margin: 16px 0;
  text-align: left;
}

.help-number {
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 16px;
  flex-shrink: 0;
}

/* Animations de la mascotte */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes swing {
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(5deg); }
  80% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

@keyframes tada {
  0% { transform: scale(1); }
  10%, 20% { transform: scale(0.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
  40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.bounce { animation: bounce 1s; }
.swing { animation: swing 1s; }
.tada { animation: tada 1s; }
.pulse { animation: pulse 0.5s infinite; }

/* Amélioration du bouton Commencer et de l'affichage du mot */
.game-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  background-color: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

#start-game {
  display: block;
  width: auto;
  min-width: 180px;
  padding: 15px 30px;
  font-size: 20px;
  font-weight: bold;
  border-radius: var(--border-radius);
}

.stats-display {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  padding: 15px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 15px;
}

#current-word {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
  margin-top: 5px;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
  .level-selector {
    width: 100%;
    justify-content: center;
  }
  
  .stats-display {
    flex-direction: column;
    gap: 16px;
  }
  
  .game-pond {
    height: 200px;
  }
  
  .syllable {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }
  
  .word-slot {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }
  
  .modal-buttons {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .game-pond {
    height: 180px;
  }
  
  .syllable {
    width: 45px;
    height: 45px;
    font-size: 14px;
  }
  
  .word-slot {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  .game-header h2 {
    font-size: 24px;
  }
  
  .game-header p {
    font-size: 14px;
  }
  
  #start-game {
    min-width: 150px;
    padding: 12px 24px;
    font-size: 18px;
  }
}