/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #121212;
  color: white;
  text-align: center;
}

header {
  max-width: 980px;
  margin: 28px auto 12px;
  padding: 0 16px;
}

header h1 {
  /* bolder, cleaner uppercase with subtle glow */
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00fa9a;
  text-shadow: 0 0 10px rgba(0, 250, 154, 0.4);
  margin-bottom: 8px;
}

/* subtle accent bar under the title */
header h1::after {
  content: "";
  display: block;
  height: 3px;
  width: 84px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #00fa9a, rgba(0, 250, 154, 0));
}

/* tagline: softer color, good reading size */
.tagline {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 600;
  color: #cfd8d3;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

/* Navigation (VERTICALLY CENTERED) */
nav {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  gap: 15px; /* Spacing between items */
}

nav ul li {
  width: 100%;
  display: flex;
  justify-content: center; /* Center items inside the list */
}

nav ul li a {
  display: block;
  text-decoration: none;
  font-size: 18px;
  color: white;
  font-weight: 600;
  background-color: #1e1e1e;
  padding: 12px 20px;
  border-radius: 8px;
  width: 250px; /* Set a fixed width for uniform size */
  text-align: center;
  transition: 0.3s;
}

nav ul li a:hover {
  background-color: #00fa9a;
  color: black;
}

/* Toggle Theme Switch */
.switch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 3px;
}

#switch-label {
  color: #00fa9a;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Neon Green when Active */
#theme-toggle:checked + .slider + #switch-label {
  color: #00fa9a; /* Neon Green */
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #00fa9a;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* User Info */
.top-left {
  position: absolute;
  top: 10px;
  left: 10px;
}

.top-right {
  position: absolute;
  top: 10px;
  right: 10px;
}

.button {
  background-color: #00fa9a;
  color: black;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 5px;
  transition: 0.3s;
}

.button:hover {
  background-color: white;
}

/* Sign-in Button */
.sign-in-container {
  margin-top: 30px;
}

.login-button {
  background-color: #00fa9a;
  color: black;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.login-button:hover {
  background-color: white;
}

.neon-court-name {
  color: #00fa9a;
  font-weight: bold;
}

.neon-green {
  color: #00fa9a;
  font-weight: bold;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 15px;
  font-size: 14px;
  background-color: #1a1a1a;
}

footer a {
  color: #00fa9a;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 35px;
  }

  .top-left,
  .top-right {
    display: flex;
    align-items: center;
  }

  .top-left {
    gap: 8px;
  }

  .top-right {
    font-size: 14px;
    white-space: nowrap;
  }

  .button {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0;
    width: auto;
    max-width: none;
  }

  header h1 {
    font-size: 1.75rem;
  }

  nav ul li a {
    width: 90%;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 5px;
  }

  .sign-in-container {
    margin-top: 20px;
  }

  .game-stats-container {
    padding: 0 10px;
  }

  footer {
    text-align: center;
    font-size: 12px;
  }
}

/* === RUNNIT Button Styles === */

/* Initially hidden */
#runnit-launch {
  display: none;
  text-align: center;
  margin: 25px auto;
}

/* Glowing pulse animation */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px #00fa9a, 0 0 20px #00fa9a;
  }
  50% {
    box-shadow: 0 0 25px #00fa9a, 0 0 40px #00fa9a;
  }
  100% {
    box-shadow: 0 0 10px #00fa9a, 0 0 20px #00fa9a;
  }
}

/* Style the button */
#runnit-btn {
  background-color: #00fa9a; /* Solid neon green */
  color: black; /* Black text */
  font-size: 25px;
  font-weight: 900;
  padding: 8px 18px;
  border: 2px solid #00fa9a;
  border-radius: 10px;
  cursor: pointer;
  animation: pulseGlow 2s infinite ease-in-out;
  transition: transform 0.3s ease;
  -webkit-text-stroke: 0.5px black;
}

/* Hover effect (optional) */
#runnit-btn:hover {
  transform: scale(1.05);
}

/* Only show the section on mobile or tablet (width < 1024px) */
@media only screen and (max-width: 1023px) {
  #runnit-launch.show {
    display: block;
  }
}

/* keep list items perfectly centered */
nav ul li {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center; /* ensures vertical centering too */
}

/* make the <a> itself a flex container so the label is dead‑centered,
   even if the HTML gets auto-wrapped by your formatter */
nav ul li a {
  display: flex; /* was: block */
  align-items: center;
  justify-content: center;
  white-space: nowrap; /* prevents the word from wrapping oddly */
  margin: 0 auto; /* belt-and-suspenders centering */
}

@media (max-width: 768px) {
  .tagline {
    font-size: 0.9rem; /* lock a readable size */
    line-height: 1.4;
    padding: 0 12px; /* breathing room from screen edges */
    display: block;
    margin-top: 4px; /* small gap below RUNNIT */
  }
}
