/* DateFlo Quiz styles
 * Dark theme with rose accents, matching app UI per CLAUDE.md
 */

.quiz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1a0a10 0%, #2d1320 40%, #3a1428 60%, #1a0a10 100%);
  padding: clamp(20px, 4vw, 40px);
  position: relative;
  overflow-x: hidden;
}

.quiz-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 87, 128, .12) 0%, rgba(224, 87, 128, .04) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}

.quiz-page::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(116, 185, 255, .08) 0%, rgba(249, 202, 36, .04) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(50px);
  z-index: 0;
}

/* Top progress bar */
.quiz-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 32px;
}

.quiz-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e05780, #c44569);
  border-radius: 999px;
  transition: width .35s ease;
}

.quiz-counter {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* Main quiz container */
.quiz-app {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}


.quiz-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.quiz-question {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.3;
  color: #fff;
  text-align: center;
  margin: 0;
  letter-spacing: -.01em;
}

.quiz-subtle {
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  color: rgba(255, 255, 255, .55);
  text-align: center;
  margin: -16px 0 0;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.quiz-option:hover {
  background: rgba(224, 87, 128, .08);
  border-color: rgba(224, 87, 128, .35);
}

.quiz-option:active {
  transform: scale(.98);
}

.quiz-option.is-selected {
  background: rgba(224, 87, 128, .15);
  border-color: #e05780;
}

.quiz-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(224, 87, 128, .15);
  color: #ffd1dc;
  font-family: 'Playfair Display', serif;
  font-size: .9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.quiz-option.is-selected .quiz-option-letter {
  background: #e05780;
  color: #fff;
}

/* Image grid for Q5 — 2x2 with a tight gap so the four mood boards
 * read as one cohesive set, not four separate floating tiles. */
.quiz-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.quiz-image-option {
  position: relative;
  border: 2px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, .2);
  transition: border-color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
  aspect-ratio: 4 / 5;
}

.quiz-image-option:hover {
  border-color: rgba(224, 87, 128, .5);
}

.quiz-image-option:active {
  transform: scale(.98);
}

.quiz-image-option.is-selected {
  border-color: #e05780;
  box-shadow: 0 0 0 4px rgba(224, 87, 128, .25);
}

.quiz-image-option picture {
  display: block;
  width: 100%;
  height: 100%;
}

.quiz-image-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Footer / back link */
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.quiz-back-link {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: rgba(255, 255, 255, .45);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color .2s ease;
}

.quiz-back-link:hover {
  color: rgba(255, 255, 255, .85);
}

/* Intro and outro screens */
.quiz-intro,
.quiz-outro {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.quiz-intro-title,
.quiz-outro-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3rem);
  color: #fff;
  margin: 0;
  letter-spacing: -.02em;
}

.quiz-intro-body,
.quiz-outro-body {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255, 255, 255, .75);
  max-width: 520px;
  line-height: 1.6;
  margin: 0;
}

.quiz-cta-button {
  margin-top: 16px;
  padding: 14px 36px;
  background: linear-gradient(135deg, #e05780, #c44569);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  letter-spacing: .02em;
}

.quiz-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(224, 87, 128, .35);
}

.quiz-cta-button:active {
  transform: translateY(0);
}

.quiz-cta-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Spinner for submission state */
.quiz-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, .12);
  border-top-color: #e05780;
  border-radius: 50%;
  animation: quizSpin 1s linear infinite;
}

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

.quiz-error {
  background: rgba(255, 99, 99, .1);
  border: 1px solid rgba(255, 99, 99, .35);
  color: #ffb8b8;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  text-align: center;
}
