/* style.css */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at center, #2b2753, #140f2a 70%);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.info-card {
  background: #020617;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 800px;
  margin-bottom: 2rem;
  margin-top: 2rem;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);

}

.info-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.info-card p {
  margin-bottom: 0.35rem;
  color: #cbd5f5;
}

body {
  animation: fadeIn 2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: -2;
  }

  to {
    opacity: 1;
  }
}

header,
footer {
  text-align: center;
  margin-bottom: 1rem;
  opacity: 0.65;
  transition: opacity 0.35 ease;
}

footer:hover {
  opacity: 1;
}

.page-title {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.footer-text {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.game-container {
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-title {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.game-subtitle,
.game-message {
  margin-bottom: 1rem;
  color: #cbd5f5;
}

.level-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gen-btn {
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  background: #4f51b8;
  color: white;
  margin-top: 10px;
  transition: 0.2s ease;
}

body.light .gen-btn {
  background: #3b82f6;
}

.gen-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(109, 146, 206, 0.5);
  transform: translateY(-2px);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 0.4rem;
  margin-bottom: 1rem;
  margin-top: 0.75rem;
}

.number-btn {
  background: #241f37;
  color: #e5e7eb;
  border: 1px solid #1e293b;
  border-radius: 0.4rem;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.number-btn--disabled {
  background: #191127;
  color: #6b7280;
}

.number-btn:hover:not(.number-btn--disabled) {
  background: #334155;
}

.back-btn {
  background: #3b82f6;
  color: white;
  margin: 10px;
}

.hint-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* Light Mode CSS*/
body.light {
  background: #f0f4f8;
  color: #1f2937;
}

body.light .game-container {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.light .number-btn {
  background: #e5e7eb;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

body.light .number-btn--disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

#theme-toggle {
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: black;
}

body.light #theme-toggle {
  background: #0f172a;
  color: white;
}

/* Mobile-friendly */
@media (max-width: 600px) {
  .game-container {
    padding: 1rem;
  }

  .game-title {
    font-size: 1.4rem;
  }
}


body.light .info-card {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: #1f2937 !important;
}

body.light p {
  color: #1f2937;
}

body.light .number-btn:hover:not(.number-btn--disabled) {
  background: #e5e7eb;
  border: 1px solid;
}

#game-controls {
  display: flex;
  justify-content: space-around;
  align-content: center;
}

/* Light mode variation */
body.light .bubble {
  background: rgba(0, 0, 0, 0.1);
}

body.light .background-gradient {
  background: radial-gradient(circle at 20% 20%, #e6ecf8, #cbd7ef, #aabbd8);
}

.gen-btn.locked {
  background: grey !important;
  pointer-events: none;
}

table#leaderboard {
    width: 100%;
    text-align: center;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}