/* Custom styles beyond Tailwind */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 400;
  background: #0a0a14;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108, 92, 231, 0.18) 0%, transparent 70%);
  background-attachment: fixed;
}

/* ── Wordmark ─────────────────────────────────────────────── */
.quizzly-wordmark {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(4rem, 20vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #c4b5fd 0%, #818cf8 40%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 24px rgba(129, 140, 248, 0.4));
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ── Smooth page transitions ──────────────────────────────── */
.page {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ── Glass card ───────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
}

/* ── Primary gradient button ──────────────────────────────── */
.btn-gradient {
  background: linear-gradient(135deg, #6d6afe 0%, #a78bfa 60%, #2dd4bf 100%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 4px 24px rgba(109, 106, 254, 0.35);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(109, 106, 254, 0.5);
  opacity: 0.95;
}

.btn-gradient:active {
  transform: scale(0.98);
}

/* ── Answer button states ─────────────────────────────────── */
.answer-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 400;
  transition: all 0.18s ease;
}

.answer-btn:hover:not(.disabled) {
  background: rgba(109, 106, 254, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateX(4px);
}

.answer-btn:active:not(.disabled) {
  transform: scale(0.98);
}

.answer-btn.correct {
  background: linear-gradient(135deg, #00B894, #00cec9) !important;
  border-color: transparent !important;
  box-shadow: 0 0 16px rgba(0, 184, 148, 0.4);
}

.answer-btn.wrong {
  background: linear-gradient(135deg, #D63031, #e17055) !important;
  border-color: transparent !important;
}

.answer-btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Pulsing dot ──────────────────────────────────────────── */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00CEC9;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ── Loading spinner ──────────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #6C5CE7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Progress bar glow ────────────────────────────────────── */
.progress-bar-fill {
  background: linear-gradient(90deg, #6C5CE7, #00CEC9);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.6);
}

/* ── Category badge ───────────────────────────────────────── */
.category-badge {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: #a29bfe;
}

/* ── Leaderboard row ──────────────────────────────────────── */
.leaderboard-me {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.1));
  border: 1px solid rgba(108, 92, 231, 0.35);
}

/* ── Input focus ring ─────────────────────────────────────── */
input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.5);
}