/* =====================================================================
   ZABANLY — Assessment / Onboarding styles
   Matches the homepage design tokens (orange brand, Vazirmatn font).
   RTL-aware via [dir="rtl"] on <html>.
   ===================================================================== */

:root {
  --orange: #ff7a3d;
  --orange-dark: #f2672f;
  --ink: #111111;
  --muted: #6b6b6b;
  --white: #ffffff;
  --lime: #dcfb62;
  --mint: #67e5c4;
  --coral: #ff9b77;
  --purple: #dba2ff;

  --card-radius: 28px;
  --btn-radius: 999px;
  --shadow-card: 0 30px 80px rgba(120, 40, 10, 0.18);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);

  --green-ok: #7ee08a;
  --green-ok-bg: #a8eeb0;
  --red-bad: #e57373;
  --red-bad-bg: #b54b4b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Vazirmatn", "Yekan Bakh", "IRANYekan", Inter, ui-sans-serif,
    system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  /* Same warm orange gradient backdrop as the Lingopie onboarding shots */
  background:
    radial-gradient(1200px 700px at 88% 78%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(135deg, #ff8a52 0%, #f2672f 55%, #e85d2a 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

[dir="ltr"] body { font-family: Inter, "Vazirmatn", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Decorative diagonal hatch in the corner, like the reference */
body::after {
  content: "";
  position: fixed;
  inset: auto -120px -160px auto;
  width: 520px;
  height: 520px;
  background-image: repeating-linear-gradient(45deg,
    rgba(255, 255, 255, 0.10) 0 2px, transparent 2px 16px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Brand / top bar ---------- */
.assess-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 34px;
}
.assess-brand .brand-logo { height: 30px; width: auto; display: block; }
.assess-brand .lang-switch {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px;
  border-radius: var(--btn-radius);
  backdrop-filter: blur(6px);
}
.assess-brand .lang-switch button {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.assess-brand .lang-switch button.is-active {
  background: #fff;
  color: var(--orange-dark);
}

/* ---------- Stage / card ---------- */
.assess-stage {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 18px 80px;
}

.assess-card {
  width: 100%;
  max-width: 920px;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  padding: 54px 56px 60px;
  animation: cardIn 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.step-kicker {
  text-align: center;
  color: #9aa0a6;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

.step-title {
  text-align: center;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 14px;
  color: #1d1d1f;
}

.step-subtitle {
  text-align: center;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 14px;
}

/* ---------- Primary / secondary buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 17px 40px;
  border-radius: var(--btn-radius);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 122, 61, 0.38);
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-blue {
  background: #5b9bff;
  color: #fff;
  box-shadow: 0 12px 26px rgba(91, 155, 255, 0.36);
}
.btn-blue:hover { filter: brightness(0.96); }

.btn-disabled,
.btn[disabled] {
  background: #d7d7da !important;
  color: #fff !important;
  box-shadow: none !important;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-block { width: 100%; }

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.link-btn {
  background: none;
  border: 0;
  color: var(--orange);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
}
.link-btn:hover { text-decoration: underline; }

/* skip link bottom-corner */
.skip-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}
[dir="rtl"] .skip-row { justify-content: flex-start; }
.skip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  font-weight: 700;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
[dir="rtl"] .skip-link .chev { transform: scaleX(-1); }

/* =====================================================================
   STEP: welcome
   ===================================================================== */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
[dir="rtl"] .welcome-grid { direction: rtl; }

.welcome-bubble {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 2px solid #ffd9c7;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}
.welcome-bubble .wb-kicker { color: var(--orange); font-weight: 700; font-size: 14px; }
.welcome-bubble .wb-word { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.welcome-bubble .wb-type { color: var(--muted); font-style: italic; font-size: 14px; }
.welcome-bubble::after {
  content: "";
  position: absolute;
  left: 28px; bottom: -10px;
  width: 18px; height: 18px;
  background: #fff;
  border-right: 2px solid #ffd9c7;
  border-bottom: 2px solid #ffd9c7;
  transform: rotate(45deg);
}
.welcome-flag { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.welcome-bigword {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 800;
  color: var(--orange);
  margin: 4px 0 18px;
}
.speaker-btn {
  border: 0; background: none; cursor: pointer; color: var(--orange);
  font-size: 18px; line-height: 1; padding: 2px;
}

.poster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.poster-grid .poster {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #2a2a2a center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; letter-spacing: 0.04em;
  text-align: center; font-size: 15px; padding: 10px;
  box-shadow: var(--shadow-soft);
}
.poster.p1 { background: linear-gradient(135deg,#6db33f,#3f7d2a); }
.poster.p2 { background: linear-gradient(135deg,#1b3a6b,#0d2347); }
.poster.p3 { background: linear-gradient(135deg,#c0392b,#7b241c); }
.poster.p4 { background: linear-gradient(135deg,#e67e22,#a85b14); }
.poster.p5 { background: linear-gradient(135deg,#34495e,#1c2833); grid-column: 1 / 2; }

/* =====================================================================
   STEP: howItWorks (carousel)
   ===================================================================== */
.hiw-media {
  margin: 22px auto 8px;
  width: min(420px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #1c1c1c center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 0.05em;
  box-shadow: var(--shadow-soft);
}
.hiw-dots { display: flex; gap: 8px; justify-content: center; margin: 18px 0 8px; }
.hiw-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #d8d8dc; transition: background 0.2s; }
.hiw-dots .dot.is-active { background: var(--orange); }

/* =====================================================================
   STEP: choice grids (gender / age / streamer / genres)
   ===================================================================== */
.choice-grid {
  display: grid;
  gap: 16px;
  margin: 18px auto 6px;
  max-width: 760px;
}
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.choice {
  position: relative;
  border: 1.5px solid #e7e7ea;
  border-radius: 18px;
  background: #fff;
  padding: 26px 14px;
  text-align: center;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
}
.choice:hover { border-color: var(--orange); box-shadow: 0 8px 20px rgba(255,122,61,0.16); }
.choice .emoji { display: block; font-size: 34px; margin-bottom: 10px; }
.choice.is-selected {
  border-color: var(--orange);
  background: #fff6f1;
  box-shadow: 0 8px 22px rgba(255,122,61,0.22);
}
.choice .check {
  position: absolute; top: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: none; align-items: center; justify-content: center; font-size: 13px;
}
[dir="ltr"] .choice .check { right: 10px; }
[dir="rtl"] .choice .check { left: 10px; }
.choice.is-selected .check { display: flex; }

/* checkbox style for streamer (multi) */
.choice.checkbox-style { text-align: start; padding: 22px 20px; display: flex; align-items: center; gap: 12px; }
.choice.checkbox-style .box {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid #c9c9cf; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.choice.checkbox-style.is-selected .box { background: var(--orange); border-color: var(--orange); }

/* genre cards with image */
.genre-card {
  position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden;
  cursor: pointer; border: 3px solid transparent; padding: 0;
  background: #333 center/cover no-repeat; transition: transform 0.12s, border-color 0.15s;
}
.genre-card:hover { transform: translateY(-2px); }
.genre-card .g-label {
  position: absolute; inset-inline: 0; bottom: 0; padding: 12px;
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}
.genre-card.is-selected { border-color: var(--orange); }
.genre-card .g-check {
  position: absolute; top: 8px; inset-inline-end: 8px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff;
  display: none; align-items: center; justify-content: center; font-size: 15px; z-index: 2;
}
.genre-card.is-selected .g-check { display: flex; }

/* =====================================================================
   STEP: matchGame
   ===================================================================== */
.mg-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.mg-progress-wrap { flex: 1; }
.mg-progress-label { color: var(--purple); font-weight: 800; font-size: 14px; margin-bottom: 6px; min-height: 18px; }
.mg-progress { height: 7px; border-radius: 999px; background: #ececf0; overflow: hidden; }
.mg-progress > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #b06bff, #ff5fa2);
  border-radius: 999px; transition: width 0.4s ease;
}
.mg-meta { display: flex; align-items: center; gap: 10px; }
.mg-count { color: var(--muted); font-weight: 700; font-size: 13px; }
.mg-hearts { display: flex; gap: 4px; font-size: 20px; }
.mg-hearts .heart.lost { filter: grayscale(1); opacity: 0.3; }

.mg-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; margin-top: 28px; }
[dir="rtl"] .mg-grid { direction: rtl; }
.mg-colhead { text-align: center; font-weight: 800; font-size: 18px; margin-bottom: 14px; }

.mg-prompts { display: flex; flex-direction: column; gap: 14px; }
.mg-prompt {
  border: 0; border-radius: 12px; background: #efeff2; color: var(--ink);
  padding: 17px 14px; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.mg-prompt:hover:not(.matched):not(:disabled) { box-shadow: inset 0 0 0 2px var(--orange); }
.mg-prompt.is-active { background: var(--green-ok-bg); color: #1d4d23; box-shadow: inset 0 0 0 2px var(--green-ok); }
.mg-prompt.matched { background: var(--green-ok-bg); color: #1d4d23; opacity: 0.65; cursor: default; }
.mg-prompt.shake { animation: shake 0.4s; }

.mg-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-content: start; }
.mg-option {
  border: 1.5px solid #e7e7ea; border-radius: 12px; background: #fff; color: var(--ink);
  padding: 15px 8px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; min-height: 52px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.mg-option:hover:not(.matched):not(:disabled) { border-color: var(--orange); }
.mg-option.is-active { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(176,107,255,0.4); }
.mg-option.correct { background: var(--green-ok-bg); border-color: var(--green-ok); color: #1d4d23; }
.mg-option.wrong { background: var(--red-bad); border-color: var(--red-bad-bg); color: #fff; }
.mg-option.matched { background: var(--green-ok-bg); border-color: var(--green-ok); color: #1d4d23; opacity: 0.6; cursor: default; }
.mg-option.shake { animation: shake 0.4s; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}

/* hearts modal */
.mg-modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,12,8,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.mg-modal {
  background: #fff; border-radius: 22px; padding: 34px 30px; max-width: 420px; width: 100%;
  text-align: center; box-shadow: var(--shadow-card); animation: cardIn 0.3s both;
}
.mg-modal .modal-hearts { font-size: 26px; margin-bottom: 12px; }
.mg-modal h3 { margin: 0 0 10px; font-size: 24px; font-weight: 800; }
.mg-modal p { margin: 0 0 22px; color: var(--muted); }

/* =====================================================================
   STEP: result (level chart)
   ===================================================================== */
.result-chart { width: min(560px, 100%); margin: 26px auto 6px; }
.result-weeks { display: flex; justify-content: space-around; margin-top: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }

/* =====================================================================
   STEP: watch (recommendations)
   ===================================================================== */
.watch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0 6px; }
.watch-card { text-align: center; }
.watch-card .thumb {
  aspect-ratio: 4 / 3; border-radius: 16px; background: #2a2a2a center/cover no-repeat;
  position: relative; box-shadow: var(--shadow-soft); display: flex; align-items: flex-start;
}
.watch-card .flag-pill {
  margin: 10px; background: #fff; border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center;
}
.watch-card .w-label { margin-top: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }

/* =====================================================================
   STEP: signup form
   ===================================================================== */
.signup-form { max-width: 420px; margin: 26px auto 0; display: flex; flex-direction: column; gap: 14px; }
.signup-form label { font-weight: 700; font-size: 14px; margin-bottom: -6px; }
.signup-form input {
  border: 1.5px solid #e2e2e6; border-radius: 12px; padding: 15px 16px; font: inherit; font-size: 16px;
  transition: border-color 0.15s;
}
.signup-form input:focus { outline: none; border-color: var(--orange); }
.signup-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 760px) {
  .assess-card { padding: 34px 22px 40px; border-radius: 22px; }
  .step-title { font-size: 30px; }
  .welcome-grid { grid-template-columns: 1fr; }
  .choice-grid.cols-3, .choice-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .mg-grid { grid-template-columns: 1fr; gap: 18px; }
  .mg-options { grid-template-columns: repeat(2, 1fr); }
  .watch-grid { grid-template-columns: 1fr; }
  .assess-brand { padding: 16px 18px; }
}
