* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000;
  background: url('assets/game-bg-3.jpg') center center / cover no-repeat fixed;
  min-height: 100vh;
  margin: 0;
  font-family: 'Press Start 2P', Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255,0,255,0.12) 0%, rgba(0,0,0,0.7) 80%, rgba(0,0,0,0.95) 100%);
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: lighten;
}

body.hide-overlays::before,
body.hide-overlays::after {
  display: none !important;
}

.main-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  gap: 32px;
  z-index: 2;
}

#leaderboard-container {
  color: #fff;
  font-family: 'Press Start 2P', Arial, sans-serif;
  background: rgba(20,20,20,0.95);
  border: 3px solid #ff00ff;
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 220px;
  box-shadow: 0 0 16px #ff00ff44;
  position: relative;
  z-index: 3;
}

#leaderboard-container h2 {
  font-size: 1.1em;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

#leaderboard {
  list-style: decimal inside;
  padding-left: 0;
  margin-bottom: 18px;
}

#leaderboard li {
  font-size: 0.9em;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

#scoreForm label {
  font-size: 0.8em;
  margin-bottom: 6px;
  display: block;
}

#scoreForm input[type="text"] {
  font-family: 'Press Start 2P', Arial, sans-serif;
  color: #fff;
  background: #222;
  border: 2px solid #ff00ff;
  border-radius: 4px;
  margin-bottom: 8px;
}

#scoreForm button {
  font-family: 'Press Start 2P', Arial, sans-serif;
  color: #fff;
  background: #ff00ff;
  border: none;
  border-radius: 4px;
  padding: 6px 18px;
  font-size: 1em;
  cursor: pointer;
  margin-left: 8px;
  box-shadow: 0 0 8px #ff00ff88;
  transition: background 0.2s;
}

#scoreForm button:hover {
  background: #ff33ff;
}

.game-frame {
  border: 6px solid #ff00ff; /* Neon pink */
  padding: 8px;
  box-shadow: 0 0 20px #ff00ff;
  position: relative;
  z-index: 3;
}

canvas#gameCanvas {
  position: relative;
  z-index: 3;
}

canvas {
  display: block;
  background-color: #111; /* Slightly off-black for contrast */
}

.site-footer {
  position: fixed;
  right: 24px;
  bottom: 16px;
  color: #fff;
  font-family: 'Press Start 2P', Arial, sans-serif;
  font-size: 0.7em;
  opacity: 0.7;
  letter-spacing: 1px;
  z-index: 100;
  pointer-events: none;
}

.corner-logo {
  position: fixed;
  right: 24px;
  bottom: 48px;
  width: 220px;
  height: auto;
  z-index: 101;
  pointer-events: none;
  filter: drop-shadow(0 0 12px #00fff7cc);
} 

/* Styling for the loader page */

.loader-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.loader-content {
  text-align: center;
  z-index: 10;
  position: relative;
}

.loader-logo {
  width: 80%;
  max-width: 500px;
  height: auto;
  margin-bottom: 60px;
  filter: drop-shadow(0 0 12px #00fff7cc) drop-shadow(0 0 24px #ff00ffcc);
  animation: pulse 2s infinite alternate;
}

.start-prompt {
  color: #fff;
  font-family: 'Press Start 2P', Arial, sans-serif;
  font-size: 1.5rem;
  text-shadow: 0 0 10px #00fff7, 0 0 20px #ff00ff;
  animation: blink 1.5s step-end infinite;
  letter-spacing: 2px;
  margin-top: 40px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Make sure the footer is visible on loader page */
.loader-page .site-footer {
  display: block;
}

.menu-button {
  font-family: 'Press Start 2P', Arial, sans-serif;
  color: #fff;
  background: #ff00ff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.8em;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 0 8px #ff00ff88;
  transition: all 0.2s;
  width: 100%;
}

.menu-button:hover {
  background: #ff33ff;
  transform: scale(1.05);
}