/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --accent: #ff3d7f;
  --accent-dark: #e62e6d;
  --accent-light: #ff6fa0;
  --accent-glow: rgba(255, 61, 127, 0.35);
  --bg: #fff6f9;
  --bg-card: #ffffff;
  --ink: #1a1330;
  --ink-soft: #5b5470;
  --ink-mute: #8d869f;
  --line: #f0e3eb;
  --success: #22c55e;
  --success-bg: #ecfdf5;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --gold: #f59e0b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(26, 19, 48, 0.06);
  --shadow: 0 10px 30px rgba(26, 19, 48, 0.08);
  --shadow-lg: 0 20px 50px rgba(255, 61, 127, 0.18);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(255, 61, 127, 0.12), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(255, 111, 160, 0.15), transparent 40%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ========== LAYOUT SHELL ========== */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
}

.screen {
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* ========== INTRO / HERO ========== */
.hero-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.hero-art {
  height: 200px;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/woi4pm/site/media/6a173777aff605.55963290.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 18px;
}

.badge {
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.hero-content {
  padding: 30px 22px 32px;
}

.title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 22px;
  line-height: 1.6;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

.meta-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.meta-item span {
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-large {
  padding: 16px 28px;
  font-size: 1.05rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: white;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ========== QUIZ ========== */
.quiz-card {
  padding: 24px 20px 26px;
}

.quiz-header {
  margin-bottom: 22px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.q-counter {
  color: var(--ink-mute);
  font-weight: 500;
}

.score-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 999px;
  width: 0;
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.question-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 22px;
}

.question-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  background: white;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
}

.answer-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #fff8fb;
  transform: translateX(2px);
}

.answer-btn:disabled {
  cursor: default;
}

.answer-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.answer-btn:hover:not(:disabled) .answer-letter {
  background: var(--accent);
  color: white;
}

.answer-btn.correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: #065f46;
}

.answer-btn.correct .answer-letter {
  background: var(--success);
  color: white;
}

.answer-btn.wrong {
  border-color: var(--error);
  background: var(--error-bg);
  color: #991b1b;
}

.answer-btn.wrong .answer-letter {
  background: var(--error);
  color: white;
}

.answer-btn.dim {
  opacity: 0.5;
}

/* Feedback */
.feedback {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  animation: fadeUp 0.3s ease;
}

.feedback.correct {
  background: var(--success-bg);
  border: 1px solid #bbf7d0;
}

.feedback.wrong {
  background: var(--error-bg);
  border: 1px solid #fecaca;
}

.feedback-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.feedback-text {
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

/* ========== EMAIL GATE ========== */
.gate-card {
  text-align: center;
  padding: 36px 24px;
}

.gate-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
  display: inline-block;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.gate-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.gate-sub {
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.email-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input {
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

.privacy {
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-align: center;
  margin: 6px 0 0;
}

/* ========== RESULTS ========== */
.results-card {
  text-align: center;
  padding-top: 32px;
}

.trophy-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 18px;
  position: relative;
}

.trophy-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.result-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}

.result-description {
  color: var(--ink-soft);
  margin: 0 0 22px;
  font-size: 1rem;
}

.score-display {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 26px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: 0 12px 30px var(--accent-glow);
}

.score-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.score-divider {
  opacity: 0.5;
  margin: 0 4px;
}

.score-percent {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* Share */
.share-row {
  margin-bottom: 22px;
}

.share-label {
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin: 0 0 10px;
}

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

.btn-share {
  padding: 10px 16px;
  background: white;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Share / Bonus Panel */
.share-panel {
  background: linear-gradient(135deg, #fff8fb 0%, #fff 100%);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 18px;
  text-align: left;
}

.share-panel h3 {
  margin: 0 0 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
}

.share-panel p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.share-url-row {
  display: flex;
  gap: 8px;
}

.share-url-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  background: white;
  color: var(--ink);
  min-width: 0;
}

/* ========== REVIEW ========== */
.review-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin: 0 0 18px;
  color: var(--ink);
}

.review-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.review-item:last-child { border-bottom: none; }

.review-question {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.95rem;
}

.review-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-choice {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-choice.correct {
  background: var(--success-bg);
  color: #065f46;
  font-weight: 600;
}

.review-choice.wrong {
  background: var(--error-bg);
  color: #991b1b;
  font-weight: 600;
  text-decoration: line-through;
}

.review-choice .marker {
  font-size: 1rem;
}

/* ========== LEADERBOARD ========== */
.leaderboard-card {
  padding: 24px 22px;
}

.lb-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 6px;
}

.lb-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin: 0;
  color: var(--ink);
}

.lb-sub {
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: transform 0.18s ease;
}

.lb-row.is-you {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 6px 18px var(--accent-glow);
}

.lb-row.is-you .lb-rank,
.lb-row.is-you .lb-score {
  color: white;
}

.lb-rank {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  width: 32px;
  flex-shrink: 0;
}

.lb-row[data-rank="1"] .lb-rank { color: var(--gold); }
.lb-row[data-rank="2"] .lb-rank { color: #9ca3af; }
.lb-row[data-rank="3"] .lb-rank { color: #d97706; }

.lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

.lb-empty {
  text-align: center;
  padding: 20px;
  color: var(--ink-mute);
  font-size: 0.9rem;
}

/* ========== STATUS CARDS ========== */
.status-card {
  text-align: center;
  padding: 50px 24px;
}

.status-emoji {
  font-size: 3.5rem;
  margin-bottom: 14px;
}

.status-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  margin: 0 0 10px;
  color: var(--ink);
}

.status-card p {
  color: var(--ink-soft);
  margin: 0;
}

/* ========== POWERED BY ========== */
#wbx-powered-by-slot {
  text-align: center;
  margin-top: auto;
  padding-top: 16px;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 600px) {
  .app-shell { padding: 32px 24px 60px; }
  .hero-art { height: 240px; }
  .title { font-size: 2.6rem; }
  .question-text { font-size: 1.55rem; }
  .card { padding: 32px 28px; }
  .score-big { font-size: 4rem; }
}
