/* CSS Variables */
:root {
  --color-text: #333;
}

html {
  scrollbar-gutter: stable;
}

/* Header Navbar */
.navbar {
  display: flex;
  justify-content: center;
  padding: 3rem;
  width: 100%;
  background-color: #fff;
  position: relative;
  z-index: 10;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 6rem;
  margin: 0;
  padding: 0;
}

.navbar a {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.5rem;
  display: inline-block;
  padding: 0.5rem 0rem;
  --underline-color: #000;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background-color: var(--underline-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.navbar a:hover::after {
  transform: scaleX(1);
}

.navbar a[data-underline] {
  --underline-color: attr(data-underline);
}

/* Handle specific colors since CSS attr() with colors isn't fully supported */
.navbar a[data-underline="#FF3B3B"]::after {
  background-color: #ff3b3b;
}
.navbar a[data-underline="#1CC300"]::after {
  background-color: #1cc300;
}
.navbar a[data-underline="#0060F0"]::after {
  background-color: #0060f0;
}
.navbar a[data-underline="#FFD600"]::after {
  background-color: #ffd600;
}

.navbar a.active::after {
  transform: scaleX(1);
}

.navbar a.active span {
  display: inline-block;
  transition: transform 0.3s ease;
}

@keyframes waveDrop {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-3px);
  }
  40% {
    transform: translateY(2px);
  }
  60% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

body {
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
}

header {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

header.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#game {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#game-message {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none; /* Initially hidden */
}

.equation-display {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  display: block;
  margin-bottom: 10px;
}

.game-end-message {
  font-size: 1.2rem;
  display: none;
  color: green;
  font-weight: bold;
}

#settings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

#settings label {
  display: block;
  margin: 15px 0;
  font-weight: bold;
}

#settings input {
  margin-left: 10px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 60px;
}

#settings button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

#settings button:hover {
  background-color: #45a049;
}

#controls {
  display: none;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
}

#controls button {
  margin: 0 10px;
  padding: 10px 15px;
  background-color: #2196f3;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

#controls button:hover {
  background-color: #1976d2;
}

#controls button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
