@font-face {
  font-family: 'Borel';
  src: url('fonts/Borel-Regular.ttf');
}

@font-face {
  font-family: 'Roboto';
  src: url('fonts/Roboto-Regular.ttf');
}

h1, h2, h3 {
  font-family: 'Borel', cursive;
}

body {
  font-family: 'Roboto', sans-serif; 
  src: url('./fonts/Roboto-Regular.ttf') format('truetype'); 
  font-size: 1.5rem;
  color: #F5F5F5;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #6495ED;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  cursor: auto;
}

header {
  background-color: rgba(0, 0, 0, 0);
  color: #F5F5F5;
  padding: 20px;
  text-align: center;
  z-index: 10;
}

/* ========== Modales ========== */
.modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: url('3D/curseur.png'), auto;
}


.modal#introModal {
  display: flex;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color:#FB8642;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  width: 80%;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: url('3D/curseur.png'), auto;
}

.modal-content h2 {
  font-family: 'Borel', sans-serif;
  margin-bottom: 0px;
  padding: 5px;
}

.modal-content p {
  margin-top: 0px;
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  padding: 10px;
}

.modal-content button {
  margin-bottom: 20px;
  padding: 12px 30px;
  background-color: #f86e1b;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: url('3D/curseur.png'), auto;
}

.modal-content button:hover {
  background-color: #2C6E49;
}

/* ========== Container de jeu ========== */
#gameContainer {
  flex: 1;
  position: relative;
  width: 100%;
  overflow: hidden;
  display: none;
}

#gameContainer.active {
  display: block;
  cursor: none;
}

#gameContainer.active * {
  cursor: none;
}

/* ========== Tableau de score ========== */
#scoreBoard {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  background: rgba(255, 255, 255, 0.3);
  padding: 15px 30px;
  border-radius: 50px;
  z-index: 100;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: bold;
}

.score-label {
  color: #FFD93D;
}

#score, #timer {
  color: #fff;
  font-size: 1.6rem;
  min-width: 40px;
  text-align: center;
}

/* ========== Océan ========== */
#ocean {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ========== Hameçon ========== */
#hook {
  position: fixed;
  width: 170px;
  height: auto;
  pointer-events: none;
  z-index: 500;
  transform: translate(-7%, -79%);
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* ========== Poissons ========== */
.fish {
  position: absolute;
  width: 100px; /* Valeur de base, sera modifiée dynamiquement par JS */
  height: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
  filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
  pointer-events: auto;
  z-index: 50;
}

.fish:hover {
  transform: scale(1.1);
}

.fish.swimming-left {
  transform: scaleX(-1);
}

.fish.swimming-left:hover {
  transform: scaleX(-1) scale(1.1);
}

.fish.caught {
  animation: caught 2.5s ease-out forwards;
  pointer-events: none;
}

/* capture 90° */
@keyframes caught {
  0% { 
    transform: scale(1) rotate(-45deg);
    opacity: 1;
  }
  
  100% { 
    transform: translateY(-200vh) scale(0.3) rotate(-45deg);
    opacity: 0;
  }
}

/* poissons vers la gauche */
.fish.swimming-left.caught {
  animation: caught-left 2.5s ease-out forwards;
}

@keyframes caught-left {
  0% { 
    transform: scaleX(-1) rotate(-45deg);
    opacity: 1;
  }
  
  100% { 
    transform: translateY(-200vh) scaleX(-0.3) ;
    opacity: 0;
  }
}

/* ========== Footer ========== */
footer {
  font-family: 'Borel', sans-serif;
  color: #F5F5F5;
  text-align: center;
  padding-top: 20px;
  height: 10vh;
  font-size: 1rem;
  margin-top: auto; 
  width: 100%;
}

/* ========== Animations ========== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes splash {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.splash {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
  animation: splash 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 1000;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  header {
    font-size: 1.5rem;
    padding: 10px 0;
  }
  
  body {
    padding: 10px;
  }
  
  #scoreBoard {
    flex-direction: column;
    gap: 10px;
    padding: 10px 20px;
  }
  
  .score-item {
    font-size: 1.1rem;
  }
  
  .fish {
    width: 80px;
  }
  
  #hook {
    width: 60px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .modal-content h2 {
    font-size: 1.8rem;
  }
  
  .modal-content p {
    font-size: 1rem;
  }
  
  footer {
    font-size: 0.85rem;
    padding: 10px;
  }
}