html body {
  background-color: #faf8efe1; /* Barely there green to extremely light mint */
  color: #333;

  margin: 0;
  height: 100vh; /* Ensure the gradient covers the full viewport height */
}

/* Style for the headline bar */
@keyframes ballAnimation {
   0% {
      transform: scale(0.6);
      opacity: 0.5;
   }
   50% {
      transform: scale(1);
      opacity: 1;
   }
   100% {
      transform: scale(0.6);
      opacity: 0.5;
   }
}
.coolButton100 {
background-color:   rgba(99, 82, 97, 0.308); /* Darker green on hover */
; /* Green background */
    border: 0px solid black; /* Black border */
    font-family: 'Inter', sans-serif; /* You can replace 'Roboto' with your preferred font */
    color: rgb(0, 0, 0); /* Black text */
    padding: 4px 8px; /* Padding */
    text-align: center; /* Center text */
    text-decoration: none; /* Remove underline */
    display: inline-block; /* Display as a block element */
    font-size: 11px; /* Font size */
    margin: 4px 2px; /* Margin */
    cursor: pointer; /* Cursor pointer */
    border-radius: 5px; /* Rounded corners */
    transition-duration: 0.4s; /* Transition duration */
}

.coolButton100:hover {
    background-color: #1d0118; /* Darker green on hover */
     color: rgb(255, 255, 255); /* Black text */
}

.headline {
  background-color: rgba(
    36,
    28,
    2,
    0.891
  ); /* Dark background color for the headline bar */
  color: #fff; /* White text color for better contrast */
  padding: 10px 20px; /* Padding for better spacing */
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600; /* Medium font weight for a professional look */
  position: fixed; /* Keep the hecader fixed at the top of the page */
  top: 0; /* Positioned at the very top of the page */
  left: 0; /* Aligned to the left side of the page */
  width: 100%; /* The header spans the entire width of the page */
  box-sizing: border-box; /* Include padding and border in the total width and height */
  z-index: 1000; /* Ensure the header stays on top of other elements */
  display: flex; /* Use a flexible layout to arrange elements */
  justify-content: space-between; /* Space evenly between elements */
  align-items: center; /* Center the text vertically within the header */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

/* Style for the text within the headline */
.headline-text {
  flex-grow: 1; /* Allow the text to expand and fill the remaining space */
  text-align: left; /* Center the text horizontally within the header */
  font-size: 13px;
  text-transform: uppercase; /* Convert text to uppercase */
  letter-spacing: 0.5px; /* Adjusted letter spacing */
      font-family: 'Fira Sans Condensed', sans-serif; /* Use Roboto font for the text */
}

/* Style for the second header */
/* Style for the second header */
/* Style for the second header */
.headline33 {
  background-color: rgb(216, 215, 219); /* Slightly darker grey */
      font-family: 'Fira Sans Condensed', sans-serif; /* Use Roboto font for the text */
  padding: 1px 4px; /* Reduced padding for a smaller height */
  border-top: 1px solid #ccc; /* Border at the top */
  position: fixed; /* Fix the position so it's at the bottom of the screen */
  bottom: 0; /* Position it at the bottom of the screen */
  left: 0;
  width: 100%;
  height: auto; /* Adjusted to fit content height */
  box-sizing: border-box; /* Include padding and border in the total width and height */
  z-index: 999; /* Ensure it is above other elements */
}

/* Style for the text within the second header */
.headline33 .headline-text {
  font-size: 10px; /* Reduced font size for a smaller height */
  text-align: center; /* Align text to the left */
  display: block;
  margin: 0; /* Remove any default margin */
  font-family: 'Fira Sans Condensed', sans-serif; /* Use Roboto font for the text */
  color: black; /* Set text color to black */
}
.menu-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4em;
  margin-left: 10px;
  cursor: pointer;
  text-decoration: none;
  color: white;
  font-size: 12px;
  font-family: 'Fira Sans', sans-serif;
  line-height: 1;
}

.menu-link:hover {
  text-decoration: none;
  color: #25d96a;
}


/* Hard guard: nothing on this page should ever cause a horizontal scrollbar
   (oversized fixed overlays, wide modals, etc. all get clipped here instead). */
html, body {
  overflow-x: hidden;
}

/* Ensure the body content starts below the fixed headers */
body {
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  padding-top: 70px; /* Adjust based on the combined height of both headers */
}

.modal-solved {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  color: #333; /* Change the font color */
  transition: opacity 0.6s ease; /* Smooth transition for opacity */
}

.format1 {
  font-weight: bold;
  font-family: 'Fira Sans Condensed', sans-serif; /* Use Roboto font for the text */
  font-size: 15px;
}

.format2 {
  color: blue;
  font-family: 'Roboto', sans-serif; /* Use Roboto font for the text */

  font-size: 14px;
}

.format3 {
  font-size: 18px;
  text-transform: uppercase;
}

/*This corresponds to the HELP Modal */

.modalhelp {
  display: none;
  position: fixed;

  left: -15px;
  top: 0;
  width: 110%;
  height: 140%;
  overflow: auto;
  color: rgb(0, 0, 0); /* Change the font color */
  transition: opacity 0.6s ease; /* Smooth transition for opacity */
    border-radius: 5px;
  z-index: 9999;
}

.modalhelp-content {
  background-color: rgba(255, 255, 255, 0.97); /* Background color of the textbox */   padding: 20px;/* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */
 border: 2px solid black; /* Changed to a thick black border */
  margin: 5% auto;
    border-radius: 5px;
  width: 80%;
  font-family: 'Fira Sans Condensed', sans-serif; /* Change the font family */
  font-size: 14px; /* Change the font size */
  font-weight: normal; /* Change the font weight */
  color: rgb(0, 0, 0); /* Text color of the textbox */
  max-width: 500px;
  opacity: 0; /* Initially hide the modal content */
  transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.modalhelp-content.show {
  opacity: 1; /* Show modal content with smooth transition */
}
.modalhelp-content hr {
  border: 1px solid rgb(58, 58, 60);
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* here ends the help modal */

#random-button {
  margin-left: 5px;
  font-family: 'Roboto', sans-serif; /* Change the font family */
  font-size: 12px; /* Change the font size */
  font-weight: normal; /* Change the font weight */
  padding: 5px 8px;
  background-color: rgb(188, 186, 192);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#random-button:hover {
  background-color: #f8f8f8; /* Light gray on hover */
}

#archive-button {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: white;
}

#archive-button:hover {
  background: none;
  color: #25d96a;
}

#searchk-button {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: white;
}

#searchk-button:hover {
  background: none;
  color: #25d96a;
}

#flaglist1-button {
  margin-left: 10px;
  font-family: 'Roboto', sans-serif; /* Change the font family */
  font-size: 12px; /* Change the font size */
  font-weight: normal; /* Change the font weight */
  padding: 5px 8px;
  background-color: rgb(188, 186, 192);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#flaglist1-button:hover {
  background-color: #f8f8f8; /* Light gray on hover */
}

#help-button {
  font-family: 'Roboto', sans-serif; /* Change the font family */
  font-size: 12px; /* Change the font size */
  font-weight: normal; /* Change the font weight */

  margin-left: 10px;
  padding: 5px 8px;
  background-color: rgb(188, 186, 192);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#language-button:hover {
  background-color: #f8f8f8; /* Light gray on hover */
}

#language-button {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: white;
}

#language-button:hover {
  background: none;
}

#save-button {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: white;
}

#save-button:hover {
  background: none;
  color: #25d96a;
}


#help-button:hover {
  background-color: #f8f8f8; /* Light gray on hover */
}





#reset-button {
  margin-left: 10px;
  font-family: 'Roboto', sans-serif; /* Change the font family */
  font-size: 12px; /* Change the font size */
  font-weight: normal; /* Change the font weight */
  padding: 5px 8px;
  background-color: rgb(188, 186, 192);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#reset-button:hover {
  background-color: #f8f8f8; /* Light gray on hover */
}

.grid-container {
  position: absolute;
  top: calc(15%); /* Adjust this value as needed */
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 73px);
  grid-template-rows: repeat(4, 95px);
  justify-content: center;
  align-content: center;
}
.grid-oval::before {
    content: ''; /* Empty content for the pseudo-element */
    position: absolute;
    width: 30px; /* Width of the oval */
    height: 20px; /* Height of the oval */
    background-color: rgba(76, 73, 78, 0.692); /* Dark color for the oval */
    border-radius: 50%; /* Make it an oval (border-radius: 50% makes it oval when width and height differ) */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%) rotate(90deg); /* Center the oval and rotate it */
}
.grid-playercell {
  border: 1px solid #ccc; /* Softened border */
  border-radius: 5px; /* Reduced border radius for a more card-like look */
  width: 63.68px;
  height: 88.54px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(75, 57, 44, 0.686); /* Brown background color */
  font-family: 'Arial', sans-serif; /* Arial font for a clean and widely supported typeface */
  font-size: 12px; /* Slightly smaller font size for a thinner card appearance */
  color: #333; /* Darkened text color for better contrast */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  transition: all 0.3s ease; /* Smooth transition for hover effect */
  position: relative; /* Position relative for the circle positioning */
  cursor: pointer; /* Pointer cursor for interactivity */
}

.grid-playercell::before {
  content: ''; /* Empty content for the pseudo-element */
  position: absolute;
  width: 30px; /* Width of the oval */
  height: 20px; /* Height of the oval */
  background-color: rgba(76, 73, 78, 0.692); /* Dark color for the oval */
  border-radius: 50%; /* Make it an oval (border-radius: 50% makes it oval when width and height differ) */
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%) rotate(90deg); /* Center the oval and rotate it */
}

.grid-playercell:hover {
  transform: translateY(
    -2px
  ); /* Lift up slightly on hover for interactive feedback */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover for depth */
}
.grid-cellunsolved {
  position: relative; /* Make the cell a positioning context */
  width: 63.68px;
  height: 88.54px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000; /* Change text color to black */
  border-radius: 5px;
  background: rgb(148, 139, 139); /* Set background to white */
  text-align: center;
  animation: starAnimation 1s forwards;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: line-through;
}

.grid-cellunsolved img {
  width: 85%; /* Make the image fill the cell */
  height: auto; /* Keep the height proportional */
    object-fit: contain; /* Ensures the image fits well within the cell */
  border-radius: 10%; /* Set border radius */
  filter: grayscale(100%) brightness(0.5);
}


/* Base class for shared styles */
.grid-cellbase {
  border-radius: 5px; /* Reduced border radius for a more card-like look */
  width: 64.68px;
  height: 90.04px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Fira Sans Condensed', sans-serif; /* Arial font for a clean and widely supported typeface */
  font-size: 12px; /* Slightly smaller font size for a thinner card appearance */
  color: #333; /* Darkened text color for better contrast */
  transition: all 0.3s ease; /* Smooth transition for hover effect */
  position: relative; /* Position relative for the circle positioning */
  text-align: center; /* Justify text horizontally */
  animation: starAnimationextra 1.1s forwards;
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Display ellipsis (...) for overflow text */
    box-sizing: border-box; /* Ensures that the border and padding are included in the width and height */
          box-shadow: 0px 8px 15px rgba(255, 255, 255, 0.918); /* Larger shadow with higher opacity */
  border: 2px solid rgba(0, 0, 0, 0.1); /* Subtle border for added definition */
}
.grid-cellbase::before {
    display: none; /* This will hide the oval when the class changes */
}
/* Specific background for solved spell */
.grid-cellsolvedspell {
  background: rgba(201, 219, 200, 0.753); /* Set background to white */
        --glow-color: rgb(29, 82, 22); /* Glow color for Normal subtype */

}

/* Specific background for solved trap */
.grid-cellsolvedtrap {
  background: rgb(236, 214, 235); /* Example: Set a different background for trap */
        --glow-color: rgb(82, 22, 69); /* Glow color for Normal subtype */
}
.grid-cellsolvedefct {
  background: rgb(223, 206, 187); /* Example: Set a different background for trap */
      --glow-color: rgb(82, 66, 22); /* Glow color for Normal subtype */
}
.grid-cellsolvedfuse {
  background: rgba(209, 195, 224, 0.808); /* Example: Set a different background for trap */
      --glow-color: rgb(63, 22, 82); /* Glow color for Normal subtype */
}
.grid-cellsolvedsync {

  background: rgb(241, 244, 245); /* Light background */

   --glow-color: rgb(61, 92, 86); /* Solved sync glow color */
}


.grid-cellsolvedxyzs{
  background: rgb(165, 165, 165); /* Example: Set a different background for trap */
   --glow-color: rgba(10, 10, 10, 0.685); /* Solved sync glow color */
}
.grid-cellsolvedritu{
  background: rgb(187, 207, 223); /* Example: Set a different background for trap */

   --glow-color: rgb(155, 174, 196); /* Solved sync glow color */
}
.grid-cellsolvedlink{
  background: rgb(197, 204, 252); /* Example: Set a different background for trap */
   --glow-color: rgb(145, 170, 216); /* Solved sync glow color */
}
.grid-cellsolvedd{
  background: rgb(224, 224, 200); /* Example: Set a different background for trap */
        --glow-color: rgb(92, 83, 56); /* Glow color for Normal subtype */

}

.grid-cellsolvedfod {
  background: rgb(223, 223, 156); /* Example: Set a different background for trap */
  --glow-color: rgb(238, 226, 62); /* Glow color for Normal subtype */
  animation: starAnimationextra22 1.1s forwards;
  border: 1px solid rgb(238, 226, 62); /* Example: Set a border color and thickness */
  border-radius: 5px; /* Optional: Add rounded corners */
}
.grid-cellsolvednorm{
  background: rgb(233, 233, 215); /* Example: Set a different background for trap */
        --glow-color: rgb(238, 215, 201); /* Glow color for Normal subtype */

}


/* Shared img styles */
.grid-cellbase img {
  width: 85%; /* Scale the image to 85% of the container's width */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensures the image fits well within the cell */
  border-radius: 10%; /* Set border radius */
}

@keyframes starAnimationextra
{
  0% {
    opacity: 0;
    transform: scale(0);
    box-shadow: 0 0 10px var(--glow-color); /* Use custom property for glow color */
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--glow-color); /* Glow color changes */
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(5, 22, 78, 0); /* Fading glow */
  }
}

@keyframes starAnimationextra22
{
  0% {
    opacity: 0;
    transform: scale(0);
    box-shadow: 0 0 10px var(--glow-color); /* Use custom property for glow color */
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 150px var(--glow-color); /* Glow color changes */
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 14px var(--glow-color); /* Glow color changes */
  }
}







.grid-cellalreadyused {
  width: 63.68px;
  height: 88.54px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Fira Sans Condensed', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-size: 12px;
  font-weight: bold; /* Make the text bolder */
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #424242; /* Dark grey text color */
  border-radius: 5px; /* Adjust the value as needed */
  background: linear-gradient(
    45deg,
    #ececec,
    #f7f7f7
  ); /* Gradient background with greyish colors */
  text-align: center; /* Justify text horizontally */
  animation: starAnimation 1.10s forwards;
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Display ellipsis (...) for overflow text */
  border: 2px solid #a5a5a5; /* Light grey border */
  box-shadow: 0 2px 4px #b0b0b0; /* Light grey shadow */
  margin-left: 3px; /* Adjust the margin as needed */
}
.grid-cellalreadyused img {
  width: 60%; /* Scale the image to 80% of the container's width */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensures the image fits well within the cell */
}

@keyframes cellFill {
  0% {
    transform: scale(0.75); /* Start with smaller size */
    opacity: 0; /* Initially hide the text */
  }
  50% {
    transform: scale(1.1); /* Slightly increase size */
    opacity: 1; /* Show the text */
  }
  100% {
    transform: scale(1); /* Return to normal size */
  }
}

@keyframes cellVibrate {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2px, -2px);
  }
  50% {
    transform: translate(2px, 2px);
  }
  75% {
    transform: translate(-2px, 2px);
  }
  100% {
    transform: translate(2px, -2px), scale(0.85);
  }
}

@keyframes starAnimation {
  0% {
    opacity: 0;
    transform: scale(0);
    box-shadow: 0 0 10px rgb(156, 156, 84); /* Initial glow */
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgb(156, 156, 84); /* Stronger glow at peak */
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 30px rgba(234, 246, 119, 0); /* Glow fades out */
  }
}

@keyframes starAnimation2 {
  0% {
    opacity: 0;
    transform: scale(0);
    box-shadow: 0 0 10px rgba(17, 9, 88, 0.6), 0 0 20px rgba(49, 29, 104, 0.4); /* Subtle initial glow */
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 60px rgb(111, 0, 255), 0 0 80px rgba(255, 215, 0, 0.8); /* Strongest, continuous glow */
  }
  90% {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 30px rgba(47, 0, 255, 0.3); /* Fading aura, nearing the end */
  }
  100% {
    opacity: 1;
    transform: scale(1); /* Final size */
    box-shadow: none; /* Completely remove the glow at the end */
  }
}




.grid-puzzlecell {
  border: 0.05px solid black;
  width: 66.68px;
  height: 88.54px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center; /* Added to center the text horizontally */
  border-radius: 5px; /* Adjust the value as needed */

  font-family: 'Fira Sans Condensed', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-weight: 700;
  font-size: 0.74em;
}

.grid-puzzlecell img {
  max-width: 50%;
  max-height: 50%;
  display: block;
  justify-content: center; /* horizontally center */
  align-items: center; /* vertically center */
  filter: contrast(100%) brightness(90%) blur(0);
}

.coolButton {
  background-color: rgba(71, 62, 35, 0.679); /* Green background */
  border: none; /* Remove borders */
  font-family: 'Fira Sans Condensed', sans-serif; /* You can replace 'Roboto' with your preferred font */

  color: white; /* White text */
  padding: 10px 14px; /* Padding */
  text-align: center; /* Center text */
  text-decoration: none; /* Remove underline */
  display: inline-block; /* Display as a block element */
  font-size: 12px; /* Font size */
  margin: 4px 2px; /* Margin */
  cursor: pointer; /* Cursor pointer */
  border-radius: 7px; /* Rounded corners */
  transition-duration: 0.4s; /* Transition duration */
}

.coolButton:hover {
  background-color: #0d0345; /* Darker green on hover */
}

.coolButton2 {
  background-color: rgb(0, 23, 39); /* Green background */
  border: 1px solid black; /* Black border */
  font-family: 'Fira Sans Condensed', sans-serif; /* You can replace 'Roboto' with your preferred font */
  color: rgb(255, 255, 255); /* Black text */
  padding: 6px 10px; /* Padding */
  text-align: center; /* Center text */
  text-decoration: none; /* Remove underline */
  display: inline-block; /* Display as a block element */
  font-size: 11px; /* Font size */
  margin: 4px 2px; /* Margin */
  cursor: pointer; /* Cursor pointer */
  border-radius: 8px; /* Rounded corners */
  transition-duration: 0.4s; /* Transition duration */
}

.coolButton2:hover {
  background-color: #005b90; /* Darker green on hover */
  color: rgb(255, 255, 255); /* Black text */
}

.coolButton3 {
  background-color: rgb(
    0,
    23,
    39
  ); /* Darker green on hover */ /* Green background */
  border: 1px solid black; /* Black border */
  font-family: 'Fira Sans Condensed', sans-serif; /* You can replace 'Roboto' with your preferred font */
  color: rgb(255, 255, 255); /* Black text */
  padding: 4px 8px; /* Padding */
  text-align: center; /* Center text */
  text-decoration: none; /* Remove underline */
  display: inline-block; /* Display as a block element */
  font-size: 11px; /* Font size */
  margin: 4px 2px; /* Margin */
  cursor: pointer; /* Cursor pointer */
  border-radius: 8px; /* Rounded corners */
  transition-duration: 0.4s; /* Transition duration */
}

.coolButton3:hover {
  background-color: #005b90; /* Darker green on hover */
  color: rgb(255, 255, 255); /* Black text */
}

.modalq {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-70%, -50%);
  background-color: #f9f9f9;
  padding: 5px 20px 40px; /* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 9999;
}

.modalq-content {
  width: 100%;
  height: 100%;
  padding: 20px 50px 50px; /* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */

  background-color: white;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-70%, -50%);
  background-color: #f9f9f9;
  padding: 5px 20px 40px; /* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 9999;
}

.modal-content {
  width: 100%;
  height: 100%;
  padding: 20px 50px 50px; /* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */

  background-color: white;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal input[type='text'] {
  width: 85%;
  box-sizing: border-box;
  padding: 8px;
  margin-bottom: 10px;
  border: 5px solid #ccc;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
}
/* Style for the suggestion list */
#nameList,
#nameElement {
  list-style-type: none;
  padding: 0;
  margin: 0; /* Add this line to remove default margin */
  max-height: 160px; /* Adjust the maximum height as needed */
  overflow-y: auto; /* Add vertical scroll when content overflows */
}

/* Style for each suggestion item */
#nameList li,
#nameElement li {
  padding: 7px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Roboto', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333; /* Text color */
  border-bottom: 1px solid #ccc; /* Add a fine line below each item */
}

#nameList li:last-child,
#nameElement li:last-child {
  border-bottom: none; /* Remove the border from the last item */
}

#nameList li:hover,
#nameElement li:hover {
  background-color: #f0f0f0; /* Background color change on hover */
}

#nameElement {
  list-style-type: none;
  padding: 0;
  max-height: 200px; /* Adjust the maximum height as needed */
  overflow-y: auto; /* Add vertical scroll when content overflows */
}

/* Style for each suggestion item */
#nameElement li {
  list-style-type: none; /* Remove default bullet points */
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Roboto', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333; /* Text color */
  border-bottom: 1px solid #ccc; /* Add a fine line below each item */
}
#nameList li:last-child {
  border-bottom: none; /* Remove the border from the last item */
}

.modalarchive {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(
    -60%,
    -50%
  ); /* Adjust the first value (-60%) to move it more to the left */
  background-color: #f9f9f9;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 9999;
}

.modalarchive li {
  list-style-type: none; /* Remove default bullet points */
}
.dateItem {
  cursor: pointer;
  padding: 10px 16px;
  border-bottom: 1px solid #ccc;
  font-family: 'Arial', sans-serif; /* Use a cool font */
  font-size: 12px; /* Adjust font size */
}

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

.grid-cellnumber {
  width: 50px; /* Increased width for better readability */
  height: 50px; /* Increased height for better spacing */
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Roboto', sans-serif;
  font-size: 15px; /* Increased font size for better legibility */
  font-weight: 700; /* Added font weight for a more professional look */
  text-align: center;
  border-radius: 4px; /* Increased border radius for smoother edges */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Enhanced shadow effect for depth */
  transition: all 0.3s ease; /* Smooth transition for hover effect */
  background-color: #e4dec3ec;
  color: #030338;
}

.fluorescent-border {
  border: 2px solid #7fff7f; /* Lighter green color */
  box-shadow: 0 0 10px #7fff7f; /* Lighter green shadow */
  transition: border-color 1.3s, box-shadow 1.3s;
}

.unfluorescent-border {
  border: 2px solid #006600; /* Darker and less intense fluorescent green color */

  box-shadow: 0 0 10px #7fff7f; /* Lighter green shadow */
  transition: border-color 1.3s, box-shadow 1.3s;
}

.fluorescent-border2 {
  border: 2px solid #990000; /* Darker and less fluorescent red color */
  box-shadow: 0 0 10px #990000; /* Darker and less fluorescent red shadow */
}

.modal2 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-70%, -50%);
  background-color: #f9f9f9;
  padding: 5px 20px 40px; /* Adjusted padding to make it taller and wider to the left and enlarge by the bottom */
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 9999;
}

#nameElement {
  list-style-type: none;
  padding: 0;
  margin: 0; /* Add this line to remove default margin */
  max-height: 160px; /* Adjust the maximum height as needed */
  overflow-y: auto; /* Add vertical scroll when content overflows */
}

/* Style for each suggestion item */
#nameList li,
#nameElement li {
  padding: 7px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Roboto', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333; /* Text color */
  border-bottom: 1px solid #ccc; /* Add a fine line below each item */
}

#nameList li:last-child,
#nameElement li:last-child {
  border-bottom: none; /* Remove the border from the last item */
}

#nameList li:hover,
#nameElement li:hover {
  background-color: #f0f0f0; /* Background color change on hover */
}

#nameElement {
  list-style-type: none;
  padding: 0;
  max-height: 200px; /* Adjust the maximum height as needed */
  overflow-y: auto; /* Add vertical scroll when content overflows */
}

/* Style for each suggestion item */
#nameElement li {
  list-style-type: none; /* Remove default bullet points */
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Roboto', sans-serif; /* You can replace 'Roboto' with your preferred font */
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333; /* Text color */
  border-bottom: 1px solid #ccc; /* Add a fine line below each item */
}
#nameList li:last-child {
  border-bottom: none; /* Remove the border from the last item */
}



















/* Modal */
.h5modal {
  position: fixed;
  top: 80px;
  /* ⬅️ Desplazar debajo de la barra .headline */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  padding: 12px;
  z-index: 1001;
  width: 90vw;
  max-width: 350px;
  max-height: 480px;
  overflow-y: auto;
  /* ⬅️ permite hacer scroll dentro */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  font-family: 'Fira Sans Condensed', sans-serif;
  /* ← aquí */
}

.h5format,
.rating span,
.rating a {
  font-family: 'Helvetica', sans-serif;
}

.h5-card-title,
.h5-challenge-title {
  font-family: 'Fira Sans Condensed', sans-serif;
}



.h5-challenge-subtitle {
  font-family: 'Fira Sans Condensed', sans-serif;
  /* ← aquí */
}

/* Overlay */
.h5-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Botón cerrar */
.h5-close-button {
  position: sticky;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  float: right;
}

/* Título resumen */
.h5title {
  font-weight: bold;
  font-size: 20px;
}

.h5puzzlenum {
  font-weight: normal;
  font-size: 18px;
}

/* Contenedor de cartas */
.h5-card-wrapper {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  /* separa las dos cartas entre sí */
  margin-top: 16px;
}

.h5-card {
  flex: 1;
  /* que ambas crezcan igual */
  min-width: 0;
  /* importante para evitar desbordes */
  padding: 8px 6px;
  /* ajusta el interior */

  text-align: center;
  background: #fff;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

/* Título de la carta */
.h5-card-title {
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 14px;
}

.h5-card {

  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 130px;
  width: 100%;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.h5-card-title {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
  text-align: center;
}

.h5-card-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  margin-bottom: 6px;
  height: 70px;
  /* misma altura para ambas */
}
.completed-success {
  background-color: #e3f9e5; /* verde claro */
}

.completed-fail {
  background-color: #ffe5e5; /* rojo claro */
}
.h5-card-info {
  font-size: 14px;
  margin-bottom: 8px;
  min-height: 20px;
  text-align: center;
}

.h5-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #0047ff;
  font-size: 14px;
  margin-top: 2px;
}











/* Grid de banderas */
.h5-flag-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  width: 60px;
  /* ancho fijo igual que la imagen aprox */
  height: 60px;
  /* mismo alto que .h5-flag-img */
}

.h5-flag-grid span {
  font-size: 14px;
  margin: 2px;
  width: 16px;
  height: 16px;
  text-align: center;
}

.h5-completed-count,
.h5-flag-name {
  font-weight: normal;
  /* Quita negrita */
  font-size: 14px;
  margin-bottom: 6px;
  text-align: center;
}

/* Enlaces */
.h5-share-link,
.h5-flag-details {
  display: inline-block;
  margin-top: 10px;
  color: #0047ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.h5-share-link i,
.h5-flag-details i {
  font-size: 16px;
}

/* Imagen de bandera */
.h5-flag-img {

  height: 50px;
  border: 1px solid black;
  border-radius: 5px;

  max-height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto;

}

/* Nombre de país */
.h5-flag-name {
  margin-bottom: 8px;
  font-weight: normal;
  font-size: 15px;
}

.h5-challenge-box {
  background: #f3f5f9;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  text-align: left;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-challenge-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
}

.h5-challenge-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.h5-challenge-button {
  background-color: #0d1e30;
  color: white;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
      font-family: 'Fira Sans Condensed', sans-serif;
}

.h5-challenge-button:hover {
  background-color: #142e4a;
}
.h5-challenge-button.play {
  background-color: #0d1e30; /* mismo azul por defecto */
}

.h5-challenge-button.play:hover {
  background-color: #142e4a;
}

.h5-challenge-button.done {
  background-color: #3d2a91; /* verde completado */
}



.h5-rating {
  text-align: left;
  font-size: 14px;
  margin: 2px 0 10px 0;
  /* menos espacio arriba y abajo */
  color: #444;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  /* ← más espacio arriba */
}

.h5-stars i {
  color: #f5c518;
  font-size: 11.25px;
  margin-right: 2px;
  vertical-align: middle;
}

.h5-score {
  font-size: 13px;
  color: #444;
  margin-left: 4px;
}

.h5-global-box {
  padding: 10px;
  margin: 10px auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-global-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
  text-align: left;
}

.h5-global-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 12px;
  text-align: left;
}

.h5-global-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px;
  margin-top: -10px;
  /* súbelo hacia arriba */
}

/* Celdas internas del grid */
.h5-global-grid>div {
  width: 60px;
  height: 60px;
  font-size: 12px;
  padding: 3px;
  border-radius: 5px;
  position: relative;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 600;
  /* o 400 si 300 no está disponible */
}

/* Porcentaje sobre bandera */
.h5-global-grid .percentage-label {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  position: absolute;
  bottom: 2px;
  right: 4px;
}

/* Your unique full grid (👤): tint the whole cell by rarity — same
   pink/orange/green/gray tonalities as flagdoku index/trivia/regions/custom. */
.h5-global-grid .grid-cellbase.h5-rarity-unique {
  color: #ad1457 !important;
  background: linear-gradient(45deg, #f48fb1, #ec407a) !important;
  border: 2px solid #ad1457 !important;
  box-shadow: 0 2px 4px rgba(173, 20, 87, 0.4) !important;
}
.h5-global-grid .grid-cellbase.h5-rarity-rare {
  color: #d84315 !important;
  background: linear-gradient(45deg, #ffcc80, #fb8c00) !important;
  border: 2px solid #ef6c00 !important;
  box-shadow: 0 2px 4px rgba(239, 108, 0, 0.4) !important;
}
.h5-global-grid .grid-cellbase.h5-rarity-frequent {
  color: #145218 !important;
  background: linear-gradient(45deg, #9ed89a, #5aad56) !important;
  border: 2px solid #145218 !important;
  box-shadow: 0 2px 4px rgba(20, 82, 24, 0.4) !important;
}
/* Regional (bracketed card variant) answers — light gray, same #555 used
   for the "REGIONALS" bars/labels elsewhere in this game. */
.h5-global-grid .grid-cellbase.h5-rarity-regional {
  color: #555 !important;
  background: linear-gradient(45deg, #eeeeee, #d6d6d6) !important;
  border: 2px solid #aaa !important;
  box-shadow: 0 2px 4px rgba(85, 85, 85, 0.25) !important;
}


.h5-global-header {
  font-weight: bold;
  font-size: 13px;
  background: #fff;
  border-radius: 6px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid #ccc;
}

.h5-global-cell {
  background: #fff;
  border: 2px solid #2ecc71;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 13px;
  font-weight: bold;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner {
  background: transparent;
  border: none;
}

/* Bloques de RATE y STATS */
.h5-rate-box {
  background: #f9f9f9;
  padding: 16px;
  margin-top: 16px;
  font-family: sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

/* Títulos */
.h5-rate-title,
.h5-stats-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.h5-rate-box {
  margin-top: 16px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 10px;
  font-family: 'Fira Sans Condensed', sans-serif;
}



.h5-rate-subtitle {
  font-size: 14px;
  margin-bottom: 8px;
  color: #444;
}


.h5-rating-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px; /* Bajamos el espacio hacia el comentario */
  margin-top: 4px; /* Un poco de separación desde el subtítulo */
}

.h5-rating-stars i {
  font-size: 22px;
  cursor: pointer; /* ← esto activa el puntero de mano */
  margin: 0 3px;
  transition: color 0.2s;
  color: gold;
}
.h5-rating-stars i.hovered,
.h5-rating-stars i.selected {
  color: gold;
}
.h5-rate-comment {
    font-size: 16.1px;
  margin-top: 2px;  /* Más espacio desde las estrellas */
  margin-bottom: 2px;
}


.h5-score {
  font-size: 14px;
  color: #444;
}

.h5-rate-comment {
  width: 90%;
  max-width: 300px;
  height: 60px;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.h5-rate-submit {
  padding: 6px 12px;
  font-size: 13px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
    margin-bottom: 2px;
      font-family: 'Reddit Sans Condensed', sans-serif;
}

.h5-rate-submit.loading {
  position: relative;
  color: transparent;
}
.h5-rate-submit.loading {
  position: relative;
  color: transparent; /* Oculta texto sin cambiar tamaño del botón */
  pointer-events: none;
}

.h5-rate-submit.loading::after {
  content: '· · ·';
  font-size: 32px;
  color: #555;
  display: inline-block;
  animation: glowDots 1.2s infinite ease-in-out;
  letter-spacing: 4px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes glowDots {
  0%   { opacity: 0.2; color: #999; }
  50%  { opacity: 1; color: #fff; text-shadow: 0 0 8px #aaa; }
  100% { opacity: 0.2; color: #999; }
}

.h5-difficulty-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-family: inherit;
}

.h5-difficulty-label {
  font-weight: bold;
  font-size: 0.95em;
  color: #333;
}

.h5-difficulty-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
  background-color: #fff;
  color: #333;
  transition: border 0.3s ease;
}

.h5-difficulty-select:focus {
  outline: none;
  border-color: #666;
}

.h5-comments-preview {
  margin-top: 12px;
  font-family: 'Fira Sans Condensed', sans-serif;
}

.h5-comments-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.h5-comment-bubble {
  background-color: #eef3f8;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  max-width: 100%;
  position: relative;
  border-left: 4px solid #ccddee;
}
.h5-link {
  font-size: 13px;
  color: #007bff;
  text-decoration: none;
}
.h5-stats-box {
  padding: 10px;
  background: #fff;

  margin: 12px auto;
  font-family: 'Fira Sans Condensed', sans-serif;

  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-stats-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
}

.h5-stats-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 6px;
  font-size: 14px;
}

.h5-stats-grid div:last-child {
  text-align: right;
  white-space: nowrap;
}

.h5-link {
  display: inline-block;
  margin-top: 10px;
  color: #0047ff;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.h5-stats-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 14px;
  margin-bottom: 10px;
}

.h5-stats-list>div:nth-child(odd) {
  text-align: left;
}

.h5-stats-list>div:nth-child(even) {
  text-align: right;
  min-width: 80px;
}
.h5-admin-reply {
  margin-left: 2em;
  background-color: #e0f0ff; /* azul cielo */
  border-left: 4px solid #3399ff; /* azul moderado */
  font-size: 0.95em;
  padding: 0.5em;
  border-radius: 4px;
}
.h5-loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 80px;
  background: linear-gradient(90deg, #f0f0f0, #fafafa);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.h5loader {
  font-size: 16px;
  font-weight: bold;
  color: #333;

  position: relative;
  display: inline-block;
  padding-left: 24px;
}

.h5loader::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 3px solid #1e88e5;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.h5-challenge-msg {
  background-color: #eef3f8;
  color: #333;
  padding: 14px 16px;
  margin-top: 12px;
  border-left: 4px solid #4a90e2;
  border-radius: 6px;
  font-size: 14px;
}

.h5-challenge-msg .h5-challenge-text {
  margin-bottom: 12px;
  white-space: pre-line;
}

.h5-challenge-go {
  padding: 6px 20px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.challenge-go:hover {
  background-color: #3a7ac8;
}














.htop-toggle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  z-index:9000
}

.htop-toggle-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.htop-toggle-switch {
  display: inline-flex;
  border: 1px solid #90caf9;
  border-radius: 999px;
  overflow: hidden;
  font-family: 'Fira Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  background-color: #e3f2fd;
  line-height: 1;
  height: 22px;
  gap: 0px;
}

.htop-toggle-option {
  padding: 2px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}



.htop-cell {
  opacity: 0;
  transition: opacity 0.5s;
  position: relative;
}

.htop-cell-label {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 1.1em;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 6px;
  border-radius: 4px;
}

.htop-modal {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  z-index: 2000;
  width: 90vw;
  max-width: 350px;
  max-height: 480px;
  min-height: 480px;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
}

.htop-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.htop-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
}

.htop-modal-headline {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 13px;
  margin-top: 10px;
  font-weight: 500;
}

.htop-flag-list {
  list-style: none;
  padding: 0;
}

.htop-subtitle {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: bold;
  font-family: 'Fira Sans Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.htop-rarity-label {
  font-size: 12px;
  font-weight: bold;
  margin: 8px 0 4px;
}

.htop-flag-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-family: Roboto, sans-serif;
  font-size: 13px;
  gap: 10px;
  cursor: pointer;
}

/* Your pick in getTopFlagGrid — exact Flagdoku style (no size/layout shift) */
.highlighted-answer {
  background-color: rgba(255, 183, 77, 0.25); /* naranja claro */
  border-radius: 6px;
  position: relative;
}

.htop-flag-img {
  width: 16.75px;
  height: 25px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.htop-flag-name {
  min-width: 120px;
  max-width: 120px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  flex-shrink: 0;
}

.htop-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htop-bar-container {
  width: 100px;
  height: 14px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.htop-bar-fill {
  height: 100%;
}

.htop-percent-label {
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.htop-divider {
  width: 100%;
  border-top: 1px solid #ccc;
  margin: 10px 0 6px;
}

.htop-separator {
  width: 100%;
  border-top: 1px solid #ccc;
  margin: 12px 0;
}













.puzzle-clear-btn {
  position: fixed;
  bottom: -16%;
  left: 1vw;
  margin-left: 2px;
}

.puzzle-giveup-btn {
  position: fixed;
  bottom: -16%;
  right: 1vw;
  margin-right: 2px;
}

.puzzle-modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  /* full-screen centered modal */
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  font-family: 'Fira Sans Condensed', sans-serif;
}

.puzzle-modal-dialog {

  /* Centered on screen via flex overlay — no offset */
  transform: none;
  margin: 0;
  position: relative;
  max-height: min(88vh, 720px);
  overflow: auto;
  background-color: #eeeeee;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  width: 80%;
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
}

/* Title + × on one row (no float / no circle / no layout push) */
.puzzle-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.puzzle-modal-close {
  color: #aaa;
  font-size: 30px;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  position: static;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  user-select: none;
}
.puzzle-modal-close:hover {
  color: #e33;
}

.puzzle-option-btn {
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
  display: block;
  margin: 6px 0;
  padding: 6px 20px;
  border: 1px solid black;
  border-radius: 6px;
  background-color: white;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  width: calc(80% - 20px);
  transition: all 0.2s;
}

.puzzle-option-btn:hover {
  background-color: #e0f0e0;
  border-color: #45a049;
  color: #45a049;
}

.puzzle-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f3b21;
  margin: 0;
  text-align: left;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}


/* Cell options menu: compact one-row actions + image next to name */
.puzzle-modal-dialog--cell-options {
  max-width: 340px;
  padding: 14px 12px 12px;
}

/* Wrong answer: lightly reddish modal */
.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--wrong {
  background-color: #fde8e8;
  border-color: #e8a0a0;
  box-shadow: 0 4px 10px rgba(180, 60, 60, 0.18);
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--wrong .puzzle-modal-title {
  color: #6b1f1f;
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--wrong .puzzle-option-btn {
  border-color: #d4a0a0;
  background-color: #fff8f8;
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--wrong .puzzle-option-btn:hover {
  background-color: #f8e0e0;
  border-color: #c45c5c;
  color: #a33;
}

/* Item of the day: lightly yellowish modal */
.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--fod {
  background-color: #fff8dc;
  border-color: #e0c96a;
  box-shadow: 0 4px 10px rgba(180, 150, 40, 0.18);
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--fod .puzzle-modal-title {
  color: #5c4a10;
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--fod .puzzle-option-btn {
  border-color: #d4c48a;
  background-color: #fffdf3;
}

.puzzle-modal-dialog--cell-options.puzzle-modal-dialog--fod .puzzle-option-btn:hover {
  background-color: #f5e9b8;
  border-color: #c4a83a;
  color: #6b5a12;
}

/* Row / col categories above the name */
.puzzle-modal-cell-cats {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin: 0 28px 6px 0;
  line-height: 1.25;
  text-align: left;
}

/* Failed category on wrong answers — strikethrough */
.puzzle-modal-cat-fail {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: #a33;
  opacity: 0.9;
}

.puzzle-modal-title--with-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  margin-top: 0;
  padding-right: 28px;
  line-height: 1.2;
}

/* Match grid cell card ratio (~61×85 portrait), not landscape flags */
.puzzle-modal-title-flag {
  width: 34px;
  height: 47px;
  object-fit: fill;
  border-radius: 4px;
  border: 1px solid #bbb;
  flex-shrink: 0;
  background: #fff;
}

.puzzle-options-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.puzzle-options-row .puzzle-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  margin: 0;
  padding: 11px 4px;
  min-height: 40px;
  font-size: 11px;
  width: auto;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Overlay oscuro — cubre TODA la hoja (viewport) */
#cardOverlay,
.card-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000000 !important;
}

/* Caja modal de carta */
#cardModal,
.card-modal-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #fdfdfd !important;
  border-radius: 12px !important;
  padding: 14px 16px 16px !important;
  width: min(340px, 92vw) !important;
  max-height: 90vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4) !important;
  z-index: 1000001 !important; /* SIEMPRE encima del overlay y del grid */
  font-family: 'Fira Sans Condensed', sans-serif !important;
  animation: cardModalPop 0.2s ease-out;
  box-sizing: border-box !important;
}

/* Animación de entrada */
@keyframes cardModalPop {
  from { transform: translate(-50%, -48%) scale(0.95); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* First line always: (cats OR card name) left + × right */
.card-modal-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.card-modal-top-left {
  flex: 1;
  min-width: 0;
}

.card-modal-top-left .card-title {
  margin: 0;
}

.card-close-x {
  position: static;
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  color: #444;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  transition: color 0.2s;
  user-select: none;
}
.card-close-x:hover {
  color: #e33;
}

.card-title {
  margin: 0 0 6px 0;
  font-size: 16px;
  text-align: left;
  font-weight: bold;
  color: #222;
  line-height: 1.2;
  flex-shrink: 0;
}

.card-modal-top-left .card-title {
  margin: 0;
}

/* Body scrolls details; header + image + actions stay put */
.card-modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  box-sizing: border-box;
  margin-top: 2px;
}

/* Imagen de la carta (miniatura) — sits above sticky actions */
.card-image {
  display: block;
  margin: 4px auto 6px;
  width: 90px;   /* más pequeña */
  height: auto;
  border-radius: 6px;
  border: 1px solid #444;
  cursor: pointer;
  filter: blur(0.1px);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.card-image:hover {
  transform: scale(1.05);
}

/* Lista de detalles (más compacta) */
.card-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.card-details-list li {
  margin-bottom: 3px;   /* menos separación */
  line-height: 1.15em;  /* líneas muy juntas */
  font-size: 12px;
}

/* Card info opened from a grid cell: keep cats line + wrong/FoD tints */
.card-modal-cell-cats {
  margin: 0;
  text-align: left;
}

.card-modal-actions {
  margin-top: 4px;
  margin-bottom: 10px;
  padding: 2px 2px 4px;
  box-sizing: border-box;
  width: 100%;
  gap: 8px;
  flex-shrink: 0;
}

/* Answers / Remove — keep compact (was too large) */
.card-modal-actions .puzzle-option-btn {
  padding: 10px 6px;
  min-height: 38px;
  font-size: 11px;
}

/* Answers modal — white like search #nameList panel */
.puzzle-modal-dialog--possible-answers {
  max-width: 360px;
  max-height: min(80vh, 520px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #ffffff !important;
}

.possible-answers-headline {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #222 !important;
  line-height: 1.3 !important;
}

.possible-answers-body,
.puzzle-modal-scroll {
  text-align: left;
  margin: 0 0 6px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 13px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
}

.possible-answers-note {
  color: #888;
  font-size: 12px;
  font-family: 'Fira Sans Condensed', sans-serif;
  margin: 0 0 8px;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

/* Same format as #nameList / populateNameList */
.possible-answers-list {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
  background-color: #ffffff;
  font-family: 'Roboto', sans-serif;
}

.possible-answers-list li,
.possible-answers-item {
  list-style: none;
  list-style-type: none;
  padding: 10px 10px;
  font-size: 12px;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.35;
  color: #333;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #ccc;
  transition: background-color 0.3s ease;
}

.possible-answers-list li:last-child,
.possible-answers-item:last-child {
  border-bottom: 1px solid #ccc;
}

.possible-answers-item:hover {
  background-color: #f0f0f0;
}

/* Opened / selected answer — a bit grayer */
.possible-answers-item.is-selected {
  background-color: #e4e4e4;
  color: #555;
}

.possible-answers-item.is-loading {
  opacity: 0.85;
  cursor: wait;
  pointer-events: none;
}

.possible-answers-loader-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 0;
}

.possible-answers-footer {
  flex-shrink: 0;
  padding-top: 8px;
  display: flex;
  justify-content: center;
  background-color: #ffffff;
}

.possible-answers-load-more {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #ffffff;
  color: #222;
  cursor: pointer;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.possible-answers-load-more:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #bbb;
}
.possible-answers-load-more:disabled {
  cursor: wait;
  opacity: 0.9;
}

/* Header zone tint only — details body always neutral */
.card-modal-header-zone {
  flex-shrink: 0;
  margin: -14px -16px 0;
  padding: 14px 16px 10px;
  border-radius: 12px 12px 0 0;
  background: transparent;
}

.card-modal-header-zone--wrong {
  background-color: #fdf0f0;
}
.card-modal-header-zone--wrong .card-title {
  color: #6b3030;
}
.card-modal-header-zone--wrong .puzzle-option-btn {
  border-color: #e0c0c0;
  background-color: #fffafa;
  color: #6b3030;
}

.card-modal-header-zone--correct {
  background-color: #f0f7f2;
}
.card-modal-header-zone--correct .card-title {
  color: #2a4a32;
}
.card-modal-header-zone--correct .puzzle-option-btn {
  border-color: #c0d8c8;
  background-color: #fafcfb;
  color: #2a4a32;
}

.card-modal-header-zone--fod {
  background-color: #fdf8ec;
}
.card-modal-header-zone--fod .card-title {
  color: #5c4a20;
}
.card-modal-header-zone--fod .puzzle-option-btn {
  border-color: #e0d4a8;
  background-color: #fffdf6;
  color: #5c4a20;
}

#cardModal .card-modal-body,
.card-modal-panel .card-modal-body {
  background-color: #fdfdfd !important;
  color: #222;
  margin: 0 -16px -16px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}




.h5-rate-submit {
  padding: 6px 12px;
  font-size: 13px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
    margin-bottom: 2px;
      font-family: 'Reddit Sans Condensed', sans-serif;
}

.h5-rate-submit.loading {
  position: relative;
  color: transparent;
}
.h5-rate-submit.loading {
  position: relative;
  color: transparent; /* Oculta texto sin cambiar tamaño del botón */
  pointer-events: none;
}

.h5-rate-submit.loading::after {
  content: '· · ·';
  font-size: 32px;
  color: #555;
  display: inline-block;
  animation: glowDots 1.2s infinite ease-in-out;
  letter-spacing: 4px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


.h5-rate-submit {
  font-family: inherit; /* Usa la misma fuente que el resto de tu web */
  font-weight: 600;
  font-size: 14px; /* Un poco más pequeño y sutil */
  color: #ffffff;
  background-color: #4b5563; /* Un gris azulado elegante (Tailwind gray-600) */
  border: 1px solid #374151; /* Borde un poco más oscuro */
  border-radius: 6px; /* Rectangular con bordes muy ligeramente suavizados */
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Sombra casi invisible, solo para dar profundidad */
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 10px auto;
}

.h5-rate-submit:hover:not(:disabled) {
  background-color: #374151; /* Se oscurece un poco al pasar el ratón (Tailwind gray-700) */
  border-color: #1f2937;
}

.h5-rate-submit:active:not(:disabled) {
  background-color: #1f2937; /* Aún más oscuro al hacer clic */
}

.h5-rate-submit:disabled {
  background-color: #e5e7eb; /* Gris claro neutro */
  color: #9ca3af; /* Texto gris oscuro */
  border-color: #d1d5db;
  box-shadow: none;
  cursor: not-allowed;
}
