body {
  margin: 0;
  background-color: #0c0c0c;
  color: #e0e0e0;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 30px;
}

header {
  width: 98%;
  background: #111;
  display: flex;
  border-radius: 20px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  flex-wrap: wrap;
  padding: 0 15px;
  position: relative;
}

header img {
  height: 250px;
  position: fixed;
  margin-top: -120px;
  left: 50%;
  transform: translateX(-50%);
}

.modes {
  display: flex;
  align-items: center;
}

.stats {
  display: flex;
  align-items: center;
  padding-left: 582px;
}

button {
  background: #111;
  color: #00f0ff;
  border: 1px solid #00f0ff;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.modes button {
  box-shadow: 0 0 10px rgba(0,255,255,0.5);
  transition: all 0.2s ease;
}

.modes button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0,255,255,0.7);
}

.modes button.active-mode {
  background: #00f0ff;
  color: #111;
  font-weight: 10px;
  box-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00f0ff;
  animation: neonGlow 1.5s infinite alternate;
}

@keyframes neonGlow {
  0% { box-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff; }
  100% { box-shadow: 0 0 20px #00f0ff, 0 0 40px #00f0ff, 0 0 60px #00f0ff; }
}

#mode-fans {
  margin: 12px; 
}

#toggle-master {
  background: #111;
  border: 1px solid #00f0ff;
  color: #00f0ff;
  font-weight: 700;
  margin: 15px;
}

#toggle-master.active {
  background: #0ff;
  color: #111;
  box-shadow: 0 0 20px #00f0ff, 0 0 40px #00f0ff;
}

.stat-box {
  background: #111;
  border: 1px solid #00f0ff;
  border-radius: 8px;
  padding: 3px 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,255,255,0.5);
  min-width: 48px;
  height: 48px;
  transition: transform 0.2s, background 0.2s;
}

.stat-box:hover {
  transform: translateY(-2px);
  background: #111;
}

.stat-label {
  font-size: 0.8rem;
  margin-top: -20px;
  color: #888;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #00f0ff;
}

#hints-box {
  background: #111;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #888;
  text-align: center;
  border: 1px solid #00f0ff;
  display: flex;
  align-items: center;
  gap: 5px;
}

#hints-left {
  font-size: 1.1rem;
  color: #00f0ff;
  font-weight: 900;
}

.anime-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
  margin-top: 40px;
}

.anime-card {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  width: 350px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  border: 3px solid transparent;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.anime-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,255,255,0.5);
}

.anime-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.anime-card h3 {
  font-size: 1rem;
  padding: 10px 15px;
  height: 50px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #00f0ff;
}

.anime-card.correct {
  border-color: #4ade80;
  box-shadow: 0 0 20px rgba(74,222,128,0.8);
  transform: scale(1.03);
}

.anime-card.wrong {
  border-color: #ef4444;
  opacity: 0.7;
}

.anime-card.same {
  border-color: #4ac8de;
  box-shadow: 0 0 20px rgba(74, 222, 197, 0.8);
  transform: scale(1.03);
}

.value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #00f0ff;
  margin-bottom: 10px;
  height: 1.5rem;
  opacity: 0;
}

.value.show {
  opacity: 1;
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}

#lose-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  z-index: 1000;
}

#lose-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  z-index: 1000;
  background: rgba(0,0,0,0.95);
}

#lose-modal h2 {
  font-size: 3rem;
  margin-bottom: 10px;
}

#lose-modal p {
  font-size: 1.4rem;
  font-weight: 500;
}

#lose-modal img {
  width: 250px;
  height: 250px;
  margin: 20px 0;
  background: #111;
  border-radius: 12px;
  object-fit: cover;
  border: 4px solid;
  box-shadow: 0 0 20px;
}

#lose-modal button {
  margin-top: 20px;
  font-weight: 700;
  padding: 12px 30px;
  font-size: 1.1rem;
  border: 1px solid;
}

#lose-modal.red-theme h2,
#lose-modal.red-theme p,
#lose-modal.red-theme img,
#lose-modal.red-theme button {
  color: #ff5555;
}

#lose-modal.red-theme h2 {
  text-shadow: 0 0 15px rgba(255,85,85,0.8);
}

#lose-modal.gold-theme h2,
#lose-modal.gold-theme p,
#lose-modal.gold-theme img,
#lose-modal.gold-theme button {
  color: gold;
}

#lose-modal.gold-theme h2 {
  text-shadow: 0 0 15px rgba(255,215,0,0.8);
}

#hint-btn {
  width: 10px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #00f0ff;
  background: #111;
  color: #00f0ff;
  font-weight: 900;
  font-size: 25px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

#hint-btn:hover {
  background: #00f0ff;
  color: #111;
}

#hint-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: #111;
  color: #444;
  border-color: #333;
}

.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.filters:hover {
  box-shadow: 0 0 12px rgba(0,255,255,0.3);
  transform: translateY(-1px);
}

.filters select {
  background: #0c0c0c;
  color: #00f0ff;
  border: 1px solid #00f0ff;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 0 4px rgba(0,255,255,0.2);
}

.filters select:hover {
  background: #00f0ff;
  color: #111;
  box-shadow: 0 0 8px #00f0ff, 0 0 14px rgba(0,255,255,0.4);
  transform: scale(1.01);
}

.filters select:focus {
  border-color: #00ffff;
  box-shadow: 0 0 12px #00f0ff, 0 0 20px rgba(0,255,255,0.4);
}

.filters select option {
  background: #111;
  color: #00f0ff;
  font-weight: 500;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }

  header img {
    height: 200px !important;
    position: relative !important;
    margin-top: 40px !important;
    left: auto !important;
    transform: none !important;
  }

  .modes {
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .stats {
    padding-left: 0;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
  }

  .anime-container {
    gap: 18px;
    margin-top: 25px;
  }

  .anime-card {
    width: 160px;
  }

  .anime-card img {
    height: 220px;
  }

  .anime-card h3 {
    font-size: 0.8rem;
    height: 40px;
  }

  .stat-box {
    min-width: 36px;
    height: 36px;
    padding: 2px 6px;
  }

  .stat-value {
    font-size: 1rem;
  }

  #lose-modal h2 {
    font-size: 1.8rem;
  }

  #lose-modal p {
    font-size: 1rem;
  }

  #lose-modal img {
    width: 150px;
    height: 150px;
  }

  button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  #hint-btn {
    width: 35px;
    height: 35px;
  }

  .filters {
    flex-direction: column;
    gap: 6px;
  }

  .filters select {
    font-size: 0.7rem;
    padding: 3px 5px;
  }

  .stat-label {
    font-size: 0.9rem;
    margin-top: -30px;
  }
}

@media (min-width: 769px) and (max-width: 1700px) {
  header img {
    height: 200px;
    position: static !important;
    margin-top: 40px !important;
    left: auto !important;
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .anime-card {
    width: 140px;
  }

  .anime-card img {
    height: 190px;
  }

  .anime-card h3 {
    font-size: 0.75rem;
  }

  button, #hint-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  #lose-modal h2 {
    font-size: 1.5rem;
  }

  #lose-modal img {
    width: 120px;
    height: 120px;
  }
}
