* {
  box-sizing: border-box;
}

body {
  
 margin: 0;
  background: #1a0033;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: white;
  text-align: center;
}

#menu {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#menuCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#gameCanvas {
  display: none;
  background: #3a006b;
}

button {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #6200ea;
  color: white;
  cursor: pointer;
}
}

#menu {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#menuCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#gameCanvas {
  display: none;
  background: #3a006b;
}

button {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #6200ea;
  color: white;
  cursor: pointer;
}

  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  color: #fff;
  background: radial-gradient(ellipse at center, #6a11cb 0%, #5a0fb6 35%, #3a0a77 100%);
  overflow: hidden;
  position: relative;
}

/* Blocos decorativos no fundo estilo Geometry Dash */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}

/* Menu */
#menu {
  position: relative;
  z-index: 1;
  margin-top: 60px;
}

#title {
  font-size: 56px;
  font-weight: 900;
  color: #adff2f;
  text-shadow: 3px 3px 0 #000, 0 0 20px #7fff00, 0 0 40px #39ff14;
  margin-bottom: 40px;
  animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
  from {
    text-shadow: 3px 3px 0 #000, 0 0 20px #7fff00, 0 0 40px #39ff14;
  }
  to {
    text-shadow: 3px 3px 0 #000, 0 0 30px #adff2f, 0 0 60px #7fff00;
  }
}

/* Botão play central */
#menu-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.menu-btn {
  font-size: 60px;
  background: #39ff14;
  color: #000;
  border: 4px solid #000;
  border-radius: 20px;
  padding: 22px 44px;
  cursor: pointer;
  box-shadow: 0 0 25px #39ff14, inset 0 0 10px #000;
  transition: transform 0.2s, box-shadow 0.2s;
}
.menu-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 40px #39ff14, inset 0 0 14px #000;
}

/* Seleção de fases */
#levelSelect {
  margin-top: 20px;
}

#levelSelect h2 {
  font-size: 28px;
  color: #ffea00;
  text-shadow: 2px 2px 0 #000, 0 0 12px #ffea00;
  margin-bottom: 20px;
}

/* 🔥 Botões numerados em quadrados estilo Geometry Dash */
#levelButtons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
}

#levelButtons button {
  aspect-ratio: 1 / 1; /* quadrado perfeito */
  background: #7d2ae8;
  border: 2px solid #000;
  color: #fff;
  font-weight: bold;
  font-size: 28px; /* número grande */
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 0 15px #a855f7;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
#levelButtons button:hover {
  transform: scale(1.12);
  background: #a855f7;
  box-shadow: 0 0 25px #c084fc;
}

/* Botão voltar */
#backButton {
  margin-top: 22px;
  font-size: 20px;
  background: #ff3c3c;
  color: #fff;
  border: 2px solid #000;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 15px #ff3c3c;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
#backButton:hover {
  background: #ff6666;
  transform: scale(1.1);
  box-shadow: 0 0 25px #ff6666;
}

/* Canvas */
#gameCanvas {
  display: none;
  margin: 16px auto 0;
  border: 2px solid #fff;
  background: #2a004a;
  position: relative;
  z-index: 1;
}

/* Barra de progresso */
.progress {
  width: 800px;
  height: 10px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  margin: 14px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: #a7ff19;
  box-shadow: 0 0 12px #a7ff19;
  transition: width 0.12s linear;
}
.hidden {
  display: none;
}

/* Overlays criados pelo JS */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.card {
  background: rgba(30, 0, 60, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 18px 22px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.card h2 {
  margin: 0 0 10px;
}
.card .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.card button {
  background: #7d2ae8;
}
.card button:nth-child(2) {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
