:root {
  --accent: #6366f1;
  --success: #22c55e;
  --error: #ef4444;
  --dark: #1e293b;
  --glass: rgba(255, 255, 255, 0.97);

  /* Pattern Colors */
  --pattern-bg: #0f172a;
  /* Dark slate base */
  --pattern-color: #312e81;
  /* Subtle indigo for the stars */
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;

  /* The "Cooler" Pattern Blend */
  background-color: var(--pattern-bg);
  background-image:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='%236366f1' fill-opacity='0.1'%3E%3Cpolygon fill-rule='evenodd' points='8 4 12 6 8 8 6 12 4 8 0 6 4 4 6 0 8 4'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

.quiz-container {
  background: var(--glass);
  backdrop-filter: blur(12px);
  width: 90%;
  max-width: 500px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 32px;
  /* Lifted shadow to contrast against the pattern */
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* Ensure the question text is the smaller size you requested */
#question-text {
  font-size: 1rem;
  /* Smaller text-base size */
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  line-height: 1.6;
}

@supports not selector(::-webkit-scrollbar) {
  body {
    scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  --sb-track-color: #232E33;
  --sb-thumb-color: #3498db;
  --sb-size: 12px;
}

/* Add a wrapper for the quiz area to handle the spacing */
.main-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  /* Stacks items vertically */
  align-items: center;
  /* Centers horizontally */
  justify-content: flex-start;
  /* Keeps it near the top */
  width: 100%;
  padding: 50px 0;
  box-sizing: border-box;
  /* Prevents padding from adding to width */
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 1.4rem;
  color: var(--dark);
  margin: 0;
}

h2 {
  text-shadow: 0px 4px 10px rgba(68, 8, 231, 0.4), 0px 0px 20px rgba(250, 204, 21, 0.2);
  color: #1e293b;
}

.stats {
  font-weight: 700;
  color: var(--accent);
}

/* Progress Bar */
.progress-container {
  background: #eee;
  height: 8px;
  border-radius: 10px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.category {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 10px;
}

#question-text {
  font-size: 1rem;
  /* Smaller text-base size */
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Option Buttons */
.options {
  display: grid;
  gap: 12px;
}

.option-btn {
  padding: 16px 20px;
  border: 2px solid #eef2f3;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.option-btn.correct {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.option-btn.wrong {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

/* Feedback & Next */
.hidden {
  display: none;
}

#feedback-area {
  margin-top: 25px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

#feedback-text {
  font-weight: 600;
  margin-bottom: 15px;
}

#next-btn {
  background: var(--dark);
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

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

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

footer {
  width: 100%;
  flex-shrink: 0;
}