/* Modals, Logo, Buttons & Overlays styling */
.modal {
  pointer-events: auto;
  background: rgba(8, 4, 18, 0.95);
  border: 2px solid var(--neon-magenta);
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.4), inset 0 0 15px rgba(255, 0, 127, 0.2);
  border-radius: 24px;
  padding: 24px 16px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

.logo-area {
  position: relative;
  margin-bottom: 12px;
}

.game-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2.6rem;
  letter-spacing: 2px;
  margin: 0;
  background: linear-gradient(to right, #ff007f, #ffeb3b, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 0, 127, 0.5));
  animation: titlePulse 2s infinite ease-in-out;
}

.game-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin: -2px 0 0 0;
  color: #fff;
  letter-spacing: 5px;
  text-shadow: var(--cyan-glow);
}

.rainbow-glow {
  position: absolute;
  top: -10px;
  left: -20px;
  right: -20px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,0,127,0.3) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.high-score-board {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 0.9rem;
  color: #dfdfff;
  margin-bottom: 18px;
  border: 1px dashed rgba(255,255,255,0.2);
}

#high-score-val {
  color: var(--neon-yellow);
  text-shadow: 0 0 8px #ffeb3b;
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
}

p.tutorial {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0 0 20px 0;
}

#start-btn, #restart-btn {
  background: linear-gradient(135deg, #ff007f, #9c27b0);
  border: none;
  color: #fff;
  padding: 16px 36px;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4), 0 0 10px rgba(255, 0, 127, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
  font-family: 'Fredoka', sans-serif;
}

#start-btn:active, #restart-btn:active {
  transform: scale(0.95);
}

/* Active Dash banner alert */
#dash-banner {
  position: absolute;
  top: 100px;
  left: 20px;
  right: 20px;
  background: linear-gradient(90deg, rgba(255,0,127,0.9), rgba(0,240,255,0.9));
  padding: 8px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  animation: bounceBanner 0.7s infinite alternate;
  box-shadow: 0 0 20px rgba(0,240,255,0.4);
  text-shadow: 0 0 5px white;
}

/* Sparkle dash button when ready to activate */
.dash-trigger-btn {
  pointer-events: auto;
  position: absolute;
  bottom: 120px;
  align-self: center;
  background: linear-gradient(135deg, #00f0ff, #ff007f, #ffeb3b, #00f0ff);
  background-size: 300% 300%;
  animation: rainbow-flow 1.5s infinite linear;
  border: 2px solid white;
  border-radius: 50px;
  color: white;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  box-shadow: 0 0 25px white, 0 0 10px var(--neon-cyan);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.game-over-title {
  font-family: 'Orbitron', sans-serif;
  color: #ff3366;
  text-shadow: 0 0 15px #ff3366;
  font-size: 2.22rem;
  font-weight: 900;
  margin: 0 0 8px 0;
}

.game-over-reason {
  font-size: 0.88rem;
  color: #ff99b4;
  margin: 0 0 16px 0;
  font-style: italic;
}

.stats-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.accent-color {
  color: var(--neon-cyan);
  font-weight: bold;
  font-family: 'Orbitron', monospace;
  text-shadow: 0 0 6px var(--neon-cyan);
}

#stars-collected {
  color: var(--neon-yellow);
  font-weight: bold;
}

@keyframes titlePulse {
  0% { filter: drop-shadow(0 2px 10px rgba(255, 0, 127, 0.5)); transform: scale(1); }
  50% { filter: drop-shadow(0 2px 25px rgba(0, 240, 255, 0.8)); transform: scale(1.02); }
  100% { filter: drop-shadow(0 2px 10px rgba(255, 0, 127, 0.5)); transform: scale(1); }
}

@keyframes bounceBanner {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes scaleUp {
  0% { transform: translateY(-50%) scale(0.8); opacity: 0; }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}
