/* Base Variables */
:root {
  /* Defaults matching the Original Green Theme */
  --primary-color: #2b9450;
  --background-color: #fffaf4;
  --text-color: #1f2937;
  --sub-text-color: #9ca3af;
  /* Faded Gray */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;

  --btn-radius: 999px;

  --text-size-base: 16px;
  --text-size-sub: 12px;
  /* Legal / Small info */
  --text-size-h1: 24px;
  /* Question Title */
  --text-size-h2: 20px;
  /* Section Headers */

  /* Derived / Fixed */
  --card-bg: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: var(--text-size-base);
  line-height: 1.5;
}

.quiz-page-wrap {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding-top: 20px;
}

@media (min-width: 768px) {
  .quiz-page-wrap {
    padding-top: 32px;
  }
}

.quiz-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 12px 40px;
}

/* Steps Wrapper */
.quiz-step {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 20px 18px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
}

/* Progress bar */
.quiz-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

/* Typography */
.quiz-info-title,
.quiz-question,
.quiz-results-title,
.results-section-title {
  font-size: var(--text-size-h1);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-color);
}

.title-sub,
.quiz-info-text {
  font-size: var(--text-size-base);
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 16px;
}

/* Legal Notice & Small Text */
.quiz-legal-notice {
  font-size: var(--text-size-sub);
  color: var(--sub-text-color);
  text-align: center;
  line-height: 1.4;
  margin-top: 12px;
}

.quiz-legal-notice a {
  color: var(--sub-text-color);
  text-decoration: underline;
  opacity: 0.8;
}

.quiz-email-safe,
.graph-sub,
.plan-price {
  color: var(--sub-text-color) !important;
  font-size: var(--text-size-sub) !important;
}

/* Make icons in legal/safe sub-text fade too if needed */
.safe-icon {
  opacity: 0.6;
}

/* Buttons */
.quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--btn-radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: var(--text-size-base);
  transition: opacity 0.2s, transform 0.1s;
}

.quiz-btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.quiz-btn.primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.quiz-btn.secondary {
  background: #e5e5e5;
  color: #333;
}

.quiz-btn.ghost {
  background: transparent;
  border: 1px solid #ccc;
  color: var(--text-color);
}

/* Image Grid */
.quiz-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quiz-card {
  border-radius: 18px;
  background: #f9f9f9;
  border: 2px solid transparent;
  padding: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  /* Always dark on cards */
}

.quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
  /* Highlight on hover */
}

.quiz-card .card-image img,
.quiz-card .card-icon img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.quiz-card .card-label {
  flex: 1;
  font-weight: 600;
  padding: 0 12px;
  font-size: var(--text-size-base);
}

/* Rating Scale */
.rating-scale {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.rating-item {
  width: 42px;
  height: 42px;
  background: #eee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}

.rating-item:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Email Input */
.quiz-input {
  width: 100%;
  border-radius: var(--btn-radius);
  border: 1px solid #ddd;
  padding: 12px 16px;
  font-size: var(--text-size-base);
  margin-bottom: 10px;
  box-sizing: border-box;
}

.quiz-input:focus {
  outline: 2px solid var(--primary-color);
  border-color: transparent;
}


/* Results Page Components */
.results-text-section,
.results-image-section {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.results-section-title {
  font-size: var(--text-size-h2);
  margin-top: 0;
}

/* Buybox Plans */
.quiz-plan-card {
  border-radius: 16px;
  background: #f9f9f9;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  transition: all 0.2s;
}

.quiz-plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.quiz-plan-card.recommended {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.plan-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--primary-color);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: bold;
}

.plan-label {
  font-size: 110%;
  font-weight: 700;
  display: block;
}

.plan-price {
  font-size: 90%;
  opacity: 0.8;
}

/* Accordion FAQ */
.faq-question {
  width: 100%;
  padding: 16px;
  background: #f4f4f4;
  border: none;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: var(--text-size-base);
  display: flex;
  justify-content: space-between;
}

.faq-question.open {
  background: #e9e9e9;
}

.faq-answer {
  display: none;
  padding: 0 16px 16px;
  font-size: 90%;
  line-height: 1.5;
}

.faq-answer.open {
  display: block;
}