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

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

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


body {
  font-family: 'Helvetica', sans-serif; 
  font-size: 1.5rem;
  color: #F5F5F5;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #CBCDCB;
  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;
}

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

header {
    background-color: rgba(0, 0, 0, 0);
    color: #F5F5F5;
    padding: 10px;
    text-align: center;
    height: 10vh; 
    flex-shrink: 0; 
    font-size: 1.5rem;

}

h1 {
    font-family: 'Borel';
    text-align: center;
    color: #F5F5F5;
}

header h1 {
    margin: 20px;
    padding: 0;
    line-height: 1;
}

header h1 a {
    display: inline-block;
}

header h1 a:hover {
    cursor: url('3D/main.png'), auto;
}

#logo-title {
    width: 300px;       
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

#logo-title:hover {
    transform: scale(1.05);
}
/* ========== 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/main.png'), auto;
}

.modal#introModal {
  display: flex;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color:#F87625;
  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/main.png'), auto;
}

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

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

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

.modal-content button:hover {
  background-color: #ED6007;
  cursor: url('3D/main.png'), auto;
}

.reward-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #FFD700;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.reward-button:hover {
    background-color: #FFC200;
    transform: scale(1.05);
}

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

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

#gameContainer.active * {
  cursor: none;
}

/* overlay décompte */
#countdownOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
  display: none;
}

#countdownOverlay.active {
  display: block;
}

/* décompte */
#countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translateY(-50px);
  font-size: 5rem;
  font-family: 'Roboto', cursive;
  color: #F5F5F5;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: pulse 1s ease-in-out infinite;
}

/*  tableau de score */
#scoreBoard {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  background: rgba(255, 255, 255, 0.3);
  margin-top:20px;
  padding: 20px 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: #F87625;
}

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

@keyframes goZoom {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(8);
        opacity: 0;
    }
}

.go-animation {
    animation: goZoom 1s ease-out forwards !important;
}

/* == 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));
}

#encouragement {
    white-space: pre-line;
} 

/* == poissons == */
.fish {
  position: absolute;
  width: 100px; 
  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;
}

/* poisson rare avec effet brillant */
.fish.rare-fish {
  filter: drop-shadow(0 0 0px white) drop-shadow(0 0 0px white);
  animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    filter: drop-shadow(0 0 0px white) drop-shadow(0 0 0px white);
  }
  50% {
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white);
  }
}

.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;
  }
}

/* == 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;
}


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

@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;
  }
  
  #countdown {
    font-size: 4rem;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .modal-content h2 {
    font-size: 1.8rem;
  }
  
  .modal-content p {
    font-size: 1rem;
  }
  
  footer {
    font-size: 0.85rem;
    padding: 10px;
  }
}