body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: url("img/ui/background.jpg") no-repeat center center fixed;
    background-size: cover;
  }
  
  .overlay {
    position:relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .subtitle {
    font-size: 2rem;
    color: #f0f0f0;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  }
  .logo {
    width: 500px;
    margin-bottom: 3rem;
  }
  
  .menu a {
    display: block;
    font-size: 2rem;
    color: #f0f0f0;
    margin: 1rem 0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    transition: background 0.2s;
  }
  .title {
    font-size:2rem;
    color: #f0f0f0;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  }
  .menu a:hover {
    background-color: #f0f0f0;
    color: #1e1e1e;
  }
  .menu-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1.2rem;
    color: #f0f0f0;
    text-decoration: none;
    border: 2px solid #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
  }
  
  .menu-link:hover {
    background-color: #f0f0f0;
    color: #1e1e1e;
  }

  #game1guessthecard_core

  .game-header {
    position: absolute;
    top: 2rem;
    text-align: center;
  }
  
  .card-img {
  max-width: 250px;
  height: auto;
  padding: 0;
  background-color: #ffffff; /* optional: to see the border clearly */
  display: block;
  margin: 5rem auto 0 auto;
  border: 2px solid #f0f0f0;
  border-radius: 11px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  image-rendering: auto;
}

.monster-img{
  display: block;
  margin: 0; /* centers horizontally */
  margin-top: -50px; /* pushes it down from the top */
  width: 400px;
  height: auto;
}

  
  .guess-section {
    margin-top: 2rem;
  }
  
  #card-guess {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    width: 250px;
    border-radius: 8px;
    border: none;
    outline: none;
  }
  
  .guess-section button {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: #1e1e1e;
    cursor: pointer;
    transition: background 0.2s;
  }

  #hp-options button{
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: #1e1e1e;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .guess-section button:hover {
    background-color: #e0b800;
  }

  .next button {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: #1e1e1e;
    cursor: pointer;
    transition: background 0.2s;
  }

  .next1 button {
    margin-top: 50px;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: #1e1e1e;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .next button:hover {
    background-color: #e0b800;
  }  

  .solution button {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: #1e1e1e;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .solution button:hover {
    background-color: #e0b800;
  }  
  
  .fade-in {
    animation: fadeInCard 0.5s ease;
  }

  @keyframes fadeInCard {
    from {
      opacity: 0;
      transform: scale(0.95)
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

/* dark background */
.dark-bg {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* main content */
.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* animation */
.animate-on-load {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#solution-text{
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

#solution-text,revealed {
  opacity: 1;
}

.guess-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.square {
  background-color: rgba(50, 50, 50, 0.8);
  color: white;
  border-radius: 10px;
  padding: 10px;
  width: 120px;
  text-align: center;
  font-size: 14px;
  transition: 0.2s ease;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.square.green {
  background-color: #28a745;
}

.square.red {
  background-color: #dc3545;
}

.square.yellow {
  background-color: gold;
  color:(black);
}

.square.reveal {
  opacity: 1;
  transform: translateY(0);
}

.guess-section {
  margin-top: 20px;
}

.guess-section input {
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
}

.guess-section button {
  padding: 10px 15px;
  margin-left: 10px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #ffcc00;
  color: #1e1e1e;
  transition: 0.2s ease;
}

.guess-section button:hover {
  background-color: #ffcc00;
}

.awesomplete li img.suggestion-img {
  width: 100px; /* Change this */
  height: auto; /* Adjust as needed */
  border-radius: 4px;
  object-fit: cover;
  pointer-events: none;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* or your site's background color */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#app-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Make sure the stats button sits ABOVE all overlays */
.stats-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000; /* high enough to sit above .dark-bg or .content */
  background: #333;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.stats-btn:hover {
  background: #555;
}

/* Popup base styles */
.popup {
  display: none;
  position: fixed;
  z-index: 2000; /* above everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.popup-content {
  background: #1c1c1c;
  color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
  color: #ccc;
}

.close:hover {
  color: white;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
