/* ========== Global Styles ========== */
body {
  /* Reset margin and padding for the body */
  margin: 0;
  padding: 0;
  /* Set a background image with specific properties */
  background-image: url('../img/personadle_wallpaper.jpg');
  background-size: cover; /* Make the image cover the entire background */
  background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Prevent the image from repeating */
  background-attachment: fixed; /* Fix the background while scrolling */
  font-family: Arial, sans-serif; /* Set the default font for the body */
}

/* ========== Title ========== */
#title {
  /* Style for the title element */
  display: inline-block; /* Make it inline-block for better control */
  color: #51ff00; /* Set the text color */
  font-family: 'Times New Roman', Times, serif; /* Use a serif font */
  font-size: 30px; /* Set font size */
  padding: 10px 20px; /* Add padding around the title */
  border-radius: 10px; /* Round the corners */
}

.title-wrapper {
  /* Center the title wrapper */
  text-align: center;
}

/* ========== Input Field & Button ========== */
.input-wrapper {
  /* Add spacing and center the input field and button */
  margin-top: 20px;
  text-align: center;
}

#textbar {
  /* Style the input field */
  padding: 10px; /* Add padding inside the input */
  font-size: 16px; /* Set font size */
  border-radius: 5px; /* Round the corners */
  border: 1px solid #ccc; /* Add a light border */
  width: 250px; /* Set width */
  margin-right: 10px; /* Add spacing to the right */
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}

#guessButton {
  /* Style the button */
  padding: 10px 20px; /* Add padding */
  font-size: 16px; /* Set font size */
  background-color: #2e86de; /* Set background color */
  color: white; /* Set text color */
  border: none; /* Remove border */
  border-radius: 5px; /* Round the corners */
  cursor: pointer; /* Change cursor to pointer on hover */
  transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

#guessButton:hover {
  /* Change background color on hover */
  background-color: #1b4f72;
}

/* ========== Logo Home Page ========== */
#imgHomePage {
  /* Style for the homepage logo */
  width: 1200px; /* Set width */
  height: auto; /* Maintain aspect ratio */
  transition: transform 0.3s ease-in-out; /* Smooth scaling effect */
  display: block; /* Center the image */
  margin: 15px auto 0; /* Add margin */
}

#imgHomePage:hover {
  /* Scale the logo slightly on hover */
  transform: scale(1.1);
}

/* ========== Gamemode Buttons ========== */
.gamemode-button {
  /* Style for gamemode buttons */
  width: 100%; /* Full width */
  max-width: 500px; /* Set max width */
  height: auto; /* Maintain aspect ratio */
  border: none; /* Remove border */
  padding: 0; /* Remove padding */
  background: none; /* Transparent background */
  cursor: pointer; /* Pointer cursor on hover */
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover effects */
  display: block; /* Center the button */
  margin: 20px auto; /* Add margin */
}

.gamemode-button img {
  /* Style for images inside gamemode buttons */
  width: 100%; /* Full width */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Block-level element */
  border-radius: 15px; /* Round the corners */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); /* Add shadow */
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover effects */
}

/* Hover effects for specific gamemode buttons */
#classicButton:hover img {
  transform: scale(1.03); /* Slightly scale up */
  box-shadow: 0 6px 14px rgb(32, 131, 245); /* Change shadow color */
}

#EmojiButton:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgb(240, 198, 12);
}

#AllOutAttackButton:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgb(255, 52, 52);
}

#shadowsButton:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgb(41, 99, 138);
}

#PersonaeButton:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgb(199, 169, 0);
}

/* ========== Gamemode Title ========== */
.gamemode-title {
  /* Style for gamemode titles */
  text-align: center; /* Center the text */
  color: white; /* Set text color */
  font-family: 'Times New Roman', Times, serif; /* Use serif font */
  font-size: 36px; /* Set font size */
  border: 4px solid rgb(202, 202, 202); /* Add border */
  padding: 15px 30px; /* Add padding */
  border-radius: 12px; /* Round the corners */
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
  box-shadow: 0 0 15px rgba(8, 8, 8, 0.7); /* Add shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effects */
  display: block; /* Block-level element */
  width: fit-content; /* Adjust width to content */
  margin: 30px auto; /* Center and add margin */
}

/* ========== Header Box ========== */
.personadle-box {
  /* Style for the header box */
  background: rgba(0, 102, 204, 0.87); /* Semi-transparent blue background */
  color: white; /* Set text color */
  padding: 30px 40px; /* Add padding */
  border-radius: 10px; /* Round the corners */
  text-align: center; /* Center the text */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); /* Add shadow */
  max-width: 400px; /* Set max width */
  margin: auto; /* Center the box */
}

.personadle-box h1 {
  /* Style for header text */
  margin: 0 0 15px; /* Add bottom margin */
  font-size: 26px; /* Set font size */
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* Use sans-serif font */
}

.personadle-box p {
  /* Style for paragraph text */
  font-size: 16px; /* Set font size */
  color: #e0e0e0; /* Light gray text color */
}

/* ========== Autocomplete Styles ========== */
.autocomplete-items {
  /* Style for autocomplete dropdown */
  position: absolute; /* Position relative to parent */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Adjust centering */
  background-color: #ffffff; /* White background */
  border: 2px solid #000000; /* Black border */
  border-radius: 14px; /* Round the corners */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Add shadow */
  z-index: 99; /* Ensure it appears above other elements */
  top: 100%; /* Position below the input */
  margin-top: 6px; /* Add spacing */
  width: 340px; /* Set width */
  max-height: 320px; /* Limit height */
  overflow-y: auto; /* Enable vertical scrolling */
  font-family: 'Segoe UI', sans-serif; /* Use sans-serif font */
  animation: fadeZoomIn 0.25s ease-out; /* Add fade-in animation */
}

.list-options {
  
  /* Style for each autocomplete option */
  display: flex; /* Use flexbox for alignment */
  align-items: center; /* Center items vertically */
  padding: 12px 16px; /* Add padding */
  font-size: 17px; /* Set font size */
  font-weight: 600; /* Make text bold */
  cursor: pointer; /* Pointer cursor on hover */
  border-bottom: 1px solid #ddd; /* Add bottom border */
  transition: background-color 0.2s ease-in-out; /* Smooth hover effect */
  white-space: nowrap; /* Prevent text wrapping */
}

.list-options:last-child {
  /* Remove border for the last option */
  border-bottom: none;
}

.list-options:hover {
  /* Change background color on hover */
  background-color: #f0f0f0;
}

.list-options img {
  width: 100px;
  height: 100px;
  object-fit: contain; /* Pour voir l’image entière */
  background-color: white; /* Fond blanc si l’image est petite */
  border-radius: 8px;
  margin-right: 12px;
  flex-shrink: 0;
  border: 1px solid #ccc;
  
}


.list-options span {
  white-space: normal;       /* Permet les retours à la ligne */
  overflow: visible;         /* Ne masque pas le texte */
  text-overflow: unset;      /* Plus d’ellipse */
  max-width: 230px;          /* Conserve une largeur propre */
  line-height: 1.2;          /* Un peu de respi */
}


.autocomplete-active {
  background-color: #7b8383 !important;
}




/* ========== Hint Button & Quote Text ========== */
#hintButton {
  margin-top: 20px;
  padding: 10px 18px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  border-radius: 6px;
  border: 2px solid #228b22;
  background-color: #2ecc71;
  color: white;
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.3s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#hintButton:enabled {
  cursor: pointer;
  opacity: 1;
  background-color: #27ae60;
  box-shadow: 0 0 8px rgba(39, 174, 96, 0.6);
}

#hintButton:hover:enabled {
  background-color: #219150;
}

#resetButton {
  margin-left: 10px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#resetButton:hover {
  background-color: #ca6f1e;
}

#giveUpButton {
  margin-top: 10px;
  padding: 10px 18px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  border-radius: 6px;
  border: 2px solid #b03a2e;
  background-color: #e74c3c;
  color: white;
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.3s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#giveUpButton:enabled {
  cursor: pointer;
  opacity: 1;
  background-color: #c0392b;
  box-shadow: 0 0 8px rgba(192, 57, 43, 0.6);
}

#giveUpButton:hover:enabled {
  background-color: #a93226;
}



/* Style pour le texte de l'indice */
#quoteHint {
  font-size: 17px;
  font-style: italic;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 20px;
  border-radius: 10px;
  max-width: 500px;
  margin: 20px auto 0;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: none;
}

/* Conteneur principal des résultats */
#output {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Lignes de réponse */
.guess-row {
  display: grid;
  grid-template-columns: 100px repeat(7, 140px); /* chaque colonne = largeur fixe */
  gap: 14px;
  margin-bottom: 20px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  width: auto; /* auto plutôt que fit-content */
  max-width: 1300px;
}


 .guess-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background-color: white;
  border-radius: 10px;
  border: 2px solid #ccc;
}


.guess-cell {
  width: 140px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
  font-size: 15px;
  color: white;
  border-radius: 10px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  animation: flipIn 0.5s ease forwards;
  transform: rotateX(90deg);
  text-align: center;
  padding: 12px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
}





/* Delay l'animation de chaque case */
.guess-cell:nth-child(2) { animation-delay: 0.1s; }
.guess-cell:nth-child(3) { animation-delay: 0.2s; }
.guess-cell:nth-child(4) { animation-delay: 0.3s; }
.guess-cell:nth-child(5) { animation-delay: 0.4s; }
.guess-cell:nth-child(6) { animation-delay: 0.5s; }

.category-row {
  display: grid;
  grid-template-columns: 100px repeat(7, 140px); /* identique à .guess-row */
  gap: 14px;
  margin: 50px auto 10px auto;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  color: white;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 14px;
  max-width: 1300px;
}



.correct {
  background-color: #2ecc71;
}

.misplaced {
  background-color: #f1c40f;
  color: black;
}

.wrong {
  background-color: #e74c3c;
}

@keyframes flipIn {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.confetti-emoji {
  position: fixed;
  font-size: 2.2rem;
  z-index: 9999;
  pointer-events: none;
  animation: explode-diagonal 1s ease-out forwards;
  transform: translate(0, 0);
}

@keyframes explode-diagonal {
  0% {
    transform: translate(0, 0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x-move), var(--y-move)) rotate(var(--rotate));
    opacity: 0;
  }
}

.emoji-hint-zone {
  background: linear-gradient(to bottom right, #1875d1bd, #1d92dac2);
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  margin: 30px auto;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.emoji-hint-zone h2 {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 20px;
}

.emoji-hint-zone p {
  font-size: 0.95rem;
  color: #d0e6ff;
  margin-top: 10px;
}



.emoji-unit {
  font-size: 4rem;
  margin: 0 12px;
  opacity: 0;
  transform: scale(0.5);
  animation: popEmoji 0.3s forwards ease-out;
  display: inline-block;
  cursor: default;

  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.emoji-unit:hover {
  transform: scale(1.35);
  filter: drop-shadow(0 0 18px rgb(255, 234, 234))
          drop-shadow(0 0 12px rgb(4, 255, 255));
}


@keyframes popEmoji {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popEmoji {
  to {
    opacity: 1;
    transform: scale(1);
  }
}


@keyframes popEmoji {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.victory-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 3px solid #4caf50;
  border-radius: 12px;
  padding: 20px;
  background-color: #e6fbe6;
  max-width: 500px;
  margin: 30px auto 10px auto;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.2);
}

.victory-box img {
  width: 150px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.win-message {
  text-align: center;
  font-size: 1.4rem;
  color: #2e7d32;
  font-weight: bold;
}



.codename {
  font-weight: 700;
  font-size: 16px;
  color: black;
}

.realname {
  font-size: 14px;
  color: #555;
  font-style: italic;
  line-height: 1.1;
}


.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: max-content;
  max-width: 280px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  text-align: left;
  font-size: 13px;
  font-family: Arial, sans-serif;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 100;
  bottom: 125%; /* Au-dessus du texte */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%; /* Flèche en dessous */
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}


.blur-level-0 { filter: blur(14px); }
.blur-level-1 { filter: blur(12px); }
.blur-level-2 { filter: blur(10px); }
.blur-level-3 { filter: blur(8px); }
.blur-level-4 { filter: blur(6px); }
.blur-level-5 { filter: blur(3px); }
.blur-level-6 { filter: blur(0px); transition: filter 0.4s ease; }

.victory-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 3px solid #4caf50;
  border-radius: 12px;
  padding: 20px;
  background-color: #e6fbe6;
  max-width: 500px;
  margin: 30px auto 10px auto;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.2);
}

.victory-box img {
  width: 150px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.win-message {
  text-align: center;
  font-size: 1.4rem;
  color: #2e7d32;
  font-weight: bold;
}


@keyframes fadeInVictory {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}


.aoa-gif-zone {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
  padding: 20px;
  max-width: 400px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
  border: 2px solid #ff3c3c;
}

#aoaGif {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transition: filter 0.3s ease;
}

/* ===== AOA GIF ZONE PLUS GRANDE ===== */
#aoaGif {
  display: block;
  margin: 30px auto;
  width: 420px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

/* ===== VICTORY BOX IMAGE PLUS GRANDE ===== */
.victory-box img {
  width: 200px;
  height: auto;
  border-radius: 14px;
  margin-bottom: 15px;
}

/* ===== LISTE D’ERREURS EN BAS ===== */
#wrongGuessList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.wrong-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffdddd;
  border: 3px solid #ff3c3c;
  border-radius: 12px;
  padding: 10px;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
  min-width: 110px;
}

.wrong-mini img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 6px;
}

.wrong-mini p {
  font-size: 14px;
  font-weight: bold;
  color: #a10000;
  margin: 0;
  text-align: center;
}

/* Animation shake */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}
.shake {
  animation: shake 0.5s;
}


/* Compteur stylisé pour Give Up et Hint */
.counter {
  display: inline-block;
  background-color: #2e2e2e;
  color: #fdd835;
  border: 2px solid #fdd835;
  border-radius: 10px;
  padding: 4px 10px;
  margin-left: 8px;
  font-size: 15px;
  font-weight: bold;
  font-family: "Segoe UI", sans-serif;
  box-shadow: 0 0 6px rgba(255, 193, 7, 0.5);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.counter.activated {
  background-color: #fdd835;
  color: black;
  transform: scale(1.05);
}
