/* ===================================================
   The Muse Atelier — Quiz Styles
   =================================================== */

/* ---------- Quiz Selector ---------- */
.quiz-selector {
  padding-top: 140px;
}

.quiz-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.quiz-select-card {
  background: var(--clr-surface);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.quiz-select-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(122,45,78,0.03) 100%);
  pointer-events: none;
}

.quiz-select-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-gold);
}

.quiz-select-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  margin: 0 auto var(--space-md);
  box-shadow: var(--shadow-md);
}

.quiz-select-card h3 {
  font-family: var(--ff-heading);
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.quiz-select-card p {
  font-size: var(--fs-small);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.quiz-select-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  font-size: var(--fs-xs);
  color: var(--clr-text-light);
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.quiz-start-btn {
  width: 100%;
}

/* ---------- Quiz Container ---------- */
.quiz-container {
  padding: 120px 0 var(--space-3xl);
  min-height: 100vh;
}

.quiz-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.quiz-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--clr-text-muted);
  cursor: pointer;
  margin-bottom: var(--space-md);
  transition: color var(--transition-fast);
}

.quiz-back-btn:hover { color: var(--clr-primary); }

.quiz-title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: var(--space-xs);
}

.quiz-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.quiz-main-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
}

.quiz-subtitle {
  font-size: var(--fs-body);
  color: var(--clr-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ---------- Progress ---------- */
.quiz-progress {
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--clr-cream);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

.quiz-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* ---------- Question Area ---------- */
.quiz-question-area {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-question {
  font-family: var(--ff-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xl);
  line-height: 1.3;
  animation: fadeInUp 0.5s ease;
}

.quiz-answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quiz-answer {
  background: var(--clr-surface);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  font-size: var(--fs-body);
  color: var(--clr-text);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.5s ease;
  position: relative;
  overflow: hidden;
}

.quiz-answer:nth-child(1) { animation-delay: 0.05s; }
.quiz-answer:nth-child(2) { animation-delay: 0.1s; }
.quiz-answer:nth-child(3) { animation-delay: 0.15s; }
.quiz-answer:nth-child(4) { animation-delay: 0.2s; }

.quiz-answer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,45,78,0.04), rgba(201,169,110,0.04));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.quiz-answer:hover {
  border-color: var(--clr-primary-light);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.quiz-answer:hover::before { opacity: 1; }

.quiz-answer-letter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--clr-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-small);
  color: var(--clr-text-muted);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.quiz-answer:hover .quiz-answer-letter {
  background: var(--clr-primary);
  color: #fff;
}

.quiz-answer.selected {
  border-color: var(--clr-primary);
  background: rgba(122,45,78,0.04);
}

.quiz-answer.selected .quiz-answer-letter {
  background: var(--clr-primary);
  color: #fff;
}

.quiz-answer.selected::after {
  content: '✓';
  position: absolute;
  right: 20px;
  font-size: 1.2rem;
  color: var(--clr-primary);
  font-weight: 700;
}

/* Clicked flash effect */
.quiz-answer.flash {
  border-color: var(--clr-accent);
  background: rgba(233,30,140,0.06);
}

/* ---------- Result ---------- */
.quiz-result {
  max-width: 680px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease;
}

.result-card {
  background: var(--clr-surface);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent), var(--clr-gold));
}

.result-emoji {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
  animation: bounceIn 0.6s ease 0.2s both;
}

.result-type-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--clr-gold);
  margin-bottom: var(--space-xs);
}

.result-title {
  font-family: var(--ff-heading);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.1;
  animation: fadeInUp 0.5s ease 0.3s both;
}

.result-description {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  animation: fadeInUp 0.5s ease 0.4s both;
}

.result-courses {
  background: var(--clr-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.5s ease 0.5s both;
}

.result-courses h4 {
  font-family: var(--ff-heading);
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.result-course-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.result-course-tag {
  padding: 8px 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--clr-primary);
}

.result-cta {
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.5s ease 0.6s both;
}

.result-cta p {
  font-size: var(--fs-small);
  color: var(--clr-text-muted);
  margin-bottom: var(--space-sm);
}

.result-share {
  margin-bottom: var(--space-xl);
}

.result-share p {
  font-size: var(--fs-xs);
  color: var(--clr-text-light);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  transform: translateY(-2px);
}

.result-other-quizzes {
  border-top: 1px solid var(--clr-border);
  padding-top: var(--space-md);
}

.result-other-quizzes h4 {
  font-family: var(--ff-heading);
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.other-quiz-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.other-quiz-link {
  padding: 10px 22px;
  background: transparent;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  transition: all var(--transition-base);
}

.other-quiz-link:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes confettiFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .quiz-cards { grid-template-columns: 1fr; }
  .quiz-question { font-size: 1.3rem; }
  .result-title { font-size: 2rem; }
  .result-card { padding: var(--space-lg); }
}
