*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --rose: #e8b4b8;
  --rose-deep: #c9898f;
  --blush: #fdf2f0;
  --cream: #faf7f2;
  --gold: #c9a962;
  --gold-light: #e8d5a3;
  --text: #3d2c2e;
  --text-muted: #7a6366;
  --white: #ffffff;
  --correct: #6b9e78;
  --wrong: #c97b7b;
  --shadow: 0 20px 60px rgba(61, 44, 46, 0.12);
  --shadow-sm: 0 8px 24px rgba(61, 44, 46, 0.08);
  --radius: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    var(--blush) 0%,
    var(--cream) 35%,
    #f5ebe0 65%,
    rgba(232, 180, 184, 0.35) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 18s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: transform;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.28;
  filter: blur(40px);
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
  bottom: 10%;
  left: -80px;
  animation-delay: -4s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--rose-deep) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

.app {
  position: relative;
  z-index: 10;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen {
  display: none;
  animation: fadeIn 0.5s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.ornament {
  text-align: center;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5em;
}

.eyebrow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.intro-text {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  opacity: 0.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.04em;
}

.btn-primary {
  background: linear-gradient(135deg, #a85563 0%, #c44d5e 50%, #b84355 100%);
  color: var(--white);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 8px 28px rgba(168, 61, 85, 0.45);
  width: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9a4a58 0%, #b83d50 50%, #a83848 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(168, 61, 85, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.welcome-card {
  text-align: center;
}

/* Quiz header */
.quiz-header {
  margin-bottom: 1.25rem;
}

.progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--rose-deep) 100%);
  border-radius: 99px;
  transition: width 0.5s ease;
  width: 0%;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.question-photo-wrap {
  margin: 0 0 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blush) 0%, var(--cream) 100%);
  box-shadow: var(--shadow-sm);
}

.question-photo-wrap.hidden {
  display: none;
}

.question-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: photoIn 0.45s ease;
}

@keyframes photoIn {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.question-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 169, 98, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.question-card h2 {
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 2px solid rgba(201, 137, 143, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  line-height: 1.45;
}

.option:hover:not(:disabled) {
  border-color: var(--rose);
  background: rgba(232, 180, 184, 0.08);
  transform: translateX(4px);
}

.option:disabled {
  cursor: default;
}

.option.correct {
  border-color: var(--correct);
  background: rgba(107, 158, 120, 0.12);
  color: #2d5a38;
}

.option.golden {
  border-color: var(--gold);
  background: rgba(201, 169, 98, 0.18);
  color: #6b5520;
  box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.35);
  animation: goldenPulse 1.2s ease-in-out infinite;
}

.option.golden-picked {
  background: rgba(201, 169, 98, 0.32);
  box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.55), 0 0 18px rgba(201, 169, 98, 0.35);
  transform: scale(1.01);
}

@keyframes goldenPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.45), 0 0 14px rgba(201, 169, 98, 0.25); }
}

.feedback.golden-win {
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(201, 169, 98, 0.1);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 98, 0.25);
}

.feedback-text strong.golden-label {
  color: var(--gold);
}

.option.wrong {
  border-color: var(--wrong);
  background: rgba(201, 123, 123, 0.1);
  color: #7a3a3a;
}

.option.dimmed {
  opacity: 0.45;
}

.feedback {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 137, 143, 0.2);
  animation: fadeIn 0.4s ease;
  position: relative;
  z-index: 11;
}

.feedback .btn-primary {
  position: relative;
  z-index: 12;
  margin-top: 1.25rem;
}

.feedback.hidden {
  display: none;
}

.feedback-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.feedback-text strong {
  color: var(--correct);
  font-style: normal;
}

.feedback-text .wrong-label {
  color: var(--wrong);
}

/* Results */
.result-card {
  text-align: center;
}

.score-circle {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin: 1.5rem 0;
}

.score-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1;
}

.score-total {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.result-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 480px) {
  .card {
    padding: 2rem 1.25rem;
  }

  .option {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-gradient {
    animation: none;
  }

  .shape {
    animation: none;
  }

  .option.golden {
    animation: none;
  }
}
