@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background: radial-gradient(circle at top, #0a0f1f, #000814 80%);
  color: #00ffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25em;
  letter-spacing: 2px;
}
.hydro {
  color: #00ffff;
  text-shadow: 0 0 12px #00ffff;
  animation: glowPulse 2.5s infinite alternate;
}
@keyframes glowPulse {
  from { text-shadow: 0 0 12px #00ffff; }
  to { text-shadow: 0 0 25px #00ffff; }
}
.subtitle {
  color: #ccc;
  font-size: 0.9rem;
}
.brand-logo {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 15px #00ffff);
  border-radius: 10px;
}

main {
  background: rgba(0, 0, 0, 0.6);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
  width: 90%;
  max-width: 700px;
}

#mode-select h2 {
  color: #fff;
  margin-bottom: 10px;
}
.modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}
.modes button {
  background: linear-gradient(90deg, #00ffff, #0077ff);
  border: none;
  color: black;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.modes button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #0077ff, #00ffff);
}

button {
  margin-top: 15px;
  background: linear-gradient(90deg, #00ffff, #0077ff);
  border: none;
  color: black;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}
button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #0077ff, #00ffff);
}
.game-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
#return-menu {
  background: linear-gradient(90deg, #ff0077, #ff66ff);
  color: #fff;
  font-weight: bold;
}
#return-menu:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #ff66ff, #ff0077);
}

#audio-controls {
  margin: 15px 0 20px 0;
  text-align: center;
}
#audio-controls h3 {
  color: #00ffff;
  margin-bottom: 8px;
}
#audio-controls select {
  background: #001122;
  color: #00ffff;
  border: 1px solid #00ffff;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'Orbitron', sans-serif;
  margin-right: 10px;
}

.discord-btn, .kofi-btn {
  display: inline-block;
  margin: 10px 6px 0;
  padding: 10px 25px;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  transition: 0.3s ease;
}
.discord-btn {
  background: linear-gradient(90deg, #5865f2, #00ffff);
}
.kofi-btn {
  background: linear-gradient(90deg, #ff66ff, #ff0077);
  box-shadow: 0 0 20px rgba(255, 0, 200, 0.4);
}
.discord-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #00ffff, #5865f2);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}
.kofi-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #ff0077, #ff66ff);
  box-shadow: 0 0 25px rgba(255, 0, 200, 0.6);
}

#timer {
  font-size: 2rem;
  margin-bottom: 10px;
}
#word-box {
  font-size: 1.6rem;
  margin: 15px 0;
  color: #ffffff;
  min-height: 60px;
}
#input {
  width: 80%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #001122;
  color: #00ffff;
  font-size: 1rem;
  outline: none;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}
#stats {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
  color: #ccc;
  font-size: 1rem;
}

#leaderboard table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  margin-top: 10px;
}
#leaderboard th, #leaderboard td {
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  padding: 6px;
}
#leaderboard th {
  color: #00ffff;
}
.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


#top-players {
  background: rgba(0,255,255,0.08);
  border: 1px solid rgba(0,255,255,0.3);
  border-radius: 10px;
  padding: 10px 15px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,255,255,0.2);
}
#top-players h3 {
  color: #00ffff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px #00ffff;
}
.top3-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.player-card {
  flex: 1;
  background: rgba(0, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 0 10px rgba(0,255,255,0.2);
  transition: 0.3s ease;
}
.player-card img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 5px;
}
#top1 { border: 2px solid gold; background: rgba(255,215,0,0.08); }
#top2 { border: 2px solid silver; background: rgba(192,192,192,0.08); }
#top3 { border: 2px solid #cd7f32; background: rgba(205,127,50,0.08); }

/* Glowing flags */
.flag-glow {
  box-shadow: 0 0 8px #00ffff;
  border-radius: 3px;
  animation: flagGlow 2.5s infinite alternate;
}
@keyframes flagGlow {
  from { box-shadow: 0 0 6px #00ffff; }
  to { box-shadow: 0 0 16px #00ffff; }
}
.glowPulseCard {
  animation: cardPulse 3s infinite alternate;
}
@keyframes cardPulse {
  from { box-shadow: 0 0 10px rgba(0,255,255,0.2); }
  to { box-shadow: 0 0 25px rgba(0,255,255,0.6); }
}

#global-stats {
  margin-top: 20px;
  padding: 15px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  text-align: center;
  animation: fadeIn 0.8s ease-in-out;
}
#global-stats h3 {
  color: #00ffff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px #00ffff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  color: #fff;
  font-size: 1rem;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.about {
  margin: 40px auto;
  max-width: 750px;
  background: rgba(0, 255, 255, 0.05);
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  color: #fff;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
}
.about h3 {
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff;
  margin-bottom: 10px;
}
.about p {
  color: #ccc;
  line-height: 1.6;
  font-size: 0.95rem;
}

footer {
  margin-top: 25px;
  font-size: 0.9rem;
  color: #777;
}
footer a {
  color: #00ffff;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.footer-links {
  margin-bottom: 8px;
}
.footer-links a {
  display: inline-block;
  margin: 5px 8px;
  color: #00ffff;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
}
.footer-links a:hover {
  text-shadow: 0 0 10px #00ffff;
  transform: scale(1.05);
}

.menu-extras {
  margin-top: 15px;
  text-align: center;
}
.menu-extras button {
  background: linear-gradient(90deg, #00ffff, #0077ff);
  border: none;
  color: black;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}
.menu-extras button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #0077ff, #00ffff);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.credits-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.credits-content {
  background: rgba(0,255,255,0.1);
  border: 1px solid #00ffff;
  border-radius: 15px;
  padding: 25px 35px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,255,255,0.4);
  color: #fff;
  animation: slideGlowIn 0.7s ease forwards;
  max-width: 400px;
}
@keyframes slideGlowIn {
  0% { opacity: 0; transform: translateY(25px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.credits-content h3 {
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff;
  margin-bottom: 10px;
}
.credits-content ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.credits-content li {
  margin: 5px 0;
  color: #ccc;
}
.credits-content a {
  color: #00ffff;
  text-decoration: none;
  font-weight: bold;
}
.credits-content a:hover {
  text-shadow: 0 0 10px #00ffff;
}

#close-credits {
  margin-top: 15px;
  background: linear-gradient(90deg, #00ffff, #0077ff);
  border: none;
  color: #000;
  font-weight: bold;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.3s;
}
#close-credits:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #0077ff, #00ffff);
}

.pulse-btn {
  animation: pulseNote 2.5s infinite alternate;
}
@keyframes pulseNote {
  from { text-shadow: 0 0 5px #00ffff; }
  to { text-shadow: 0 0 20px #00ffff; }
}
