body {
  margin: 0;
  background: black;
  overflow: hidden;
  font-family: 'Orbitron', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: white;
}
#userInfo {
  font-size: 18px;
  font-family: 'Arial';
  color: #00ffff;
  text-shadow: 1px 1px 2px black;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

#scoreDisplay {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 24px;
  z-index: 2;
}

.menu {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 5;
  text-align: center;
}

.hidden {
  display: none !important;
}

button {
  padding: 10px 20px;
  font-size: 18px;
  margin-top: 20px;
  border-radius: 8px;
}

#countdown {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  color: white;
  z-index: 6;
  animation: countdownAnim 1s ease-in-out forwards;
}

@keyframes countdownAnim {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Animated Title Effect */
.animated-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  color: #fff;
  text-align: center;
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 6px 18px rgba(0,0,0,0.6);
  background: linear-gradient(90deg, #00f0ff, #ff00c8, #00f0ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 5s ease infinite, pulseScale 1.5s ease-in-out infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Modal styling - cleaner, modern look */
.modal-content {
  background: linear-gradient(180deg, rgba(8,10,20,0.95), rgba(18,20,30,0.95));
  border: none;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.7);
  padding: 0.25rem;
  overflow: hidden;
}

.modal-header {
  border-bottom: none;
  padding: 1rem 1.25rem;
}

.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: #e6f0ff;
}

.modal-body {
  padding: 1rem 1.25rem 1.5rem;
  color: #cbd5e1;
  line-height: 1.35;
}

/* Login button styling */
.btn-login {
  background: linear-gradient(90deg,#0ea5e9 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(124,58,237,0.18);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(124,58,237,0.22);
  opacity: 0.98;
}

/* Guest/ghost button */
.btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px;
  border-radius: 10px;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.02);
  transform: translateY(-1px);
}

/* Make modal full-width on small screens with breathing room */
@media (max-width: 480px) {
  .modal-dialog { margin: 1rem; }
  .modal-content { padding: 0.5rem; }
  .modal-title { font-size: 1rem; }
}

/* Adjust start button on the menu to match style */
#openStartModalBtn {
  font-family: 'Orbitron', sans-serif;
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(90deg,#06b6d4,#7c3aed);
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(12,18,40,0.5);
  transition: transform .12s ease, box-shadow .12s ease;
}
#openStartModalBtn:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(12,18,40,0.6); }

/* Ensure menu overlays can appear above canvases when made visible via inline styles */
#gameOverScreen { pointer-events: auto; }

/* small improvements */
.modal-footer { border-top: none; padding: 0.75rem 1.25rem; color: #94a3b8; }
