/* 🌐 General Layout */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: #000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}

/* 🧭 Top Navigation with Neon Gradient Glow */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5); /* Translucent */
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center; /* Center menu */
  align-items: center;
  padding: 14px 40px;
  box-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
  z-index: 1000;
  border-bottom: 2px solid #00ff88;
}

.top-nav .home-btn {
  position: absolute;
  left: 40px;
  font-weight: bold;
  font-size: 1.3rem;
  color: #00ff88;
  text-shadow: 0 0 12px #00ff88, 0 0 24px #00ff88;
  text-decoration: none;
}

.menu-links {
  display: flex;
  gap: 28px;
}

.menu-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.menu-links a:hover {
  color: #00ff88;
  text-shadow: 0 0 12px #00ff88, 0 0 24px #00ff88;
}

/* 🎮 Game Container */
.game-container {
  text-align: center;
  background: rgba(15, 15, 15, 0.85);
  padding: 20px 30px;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
  margin-top: 100px; /* Space below navbar */
}

h1 {
  margin: 0 0 10px;
  font-size: 3rem;
  color: #00ff88;
  text-shadow: 0 0 12px #00ff88, 0 0 24px #00ff88;
}

/* Info bar */
.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#score {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Buttons */
button {
  background: #00ff88;
  color: #000;
  border: none;
  padding: 6px 14px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease-in-out, transform 0.1s;
}

button:hover {
  background: #33ffcc;
  transform: scale(1.05);
}

/* Canvas */
canvas {
  background: #000;
  border: 2px solid #00ff88;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 20px #00ff88;
}

/* 💀 Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #111;
  padding: 30px 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 25px #00ff88;
  color: #fff;
  animation: popIn 0.3s ease;
}

.modal-content h2 {
  margin: 0 0 10px;
  color: #00ff88;
}

.modal-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 📱 Responsive Navbar */
@media (max-width: 700px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
  }

  .menu-links {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
  }

  .menu-links a {
    font-size: 1rem;
  }
}
