/* assets/exam.css — IranUni Exam design system
   نسخه‌ی «خفن»‌شده (۲۰۲۶-۰۹-۰۳): همون خانواده‌ی رنگیِ iranuni-panel («Nocturne» — زمینه‌ی
   تیره‌ی سرمه‌ای، لهجه‌ی بنفش‌آبی)، ولی با بلوب‌هایِ محیطیِ متحرک، کارتِ شیشه‌ای
   (glassmorphism)، دکمه‌های گرادیانیِ درخشان، و گزینه‌های آزمون با نشانِ حرفِ گزینه —
   طبقِ راهنمایِ اسکیلِ ui-ux-pro-max (سبکِ Modern Dark + Glassmorphism). */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/vazirmatn.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

.iexam-app {
  --iexam-bg: #12131f;
  --iexam-bg-2: #181a2a;
  --iexam-surface: rgba(35, 37, 50, .62);
  --iexam-surface-2: rgba(255, 255, 255, .05);
  --iexam-fg: #f1f1f5;
  --iexam-muted-fg: rgba(233, 233, 237, .58);
  --iexam-border: rgba(233, 233, 237, .12);
  --iexam-border-strong: rgba(233, 233, 237, .22);

  --iexam-accent: #8b7cf0;
  --iexam-accent-2: #5b8cff;
  --iexam-accent-hover: #9d8ff5;
  --iexam-accent-dim: rgba(139, 124, 240, .16);
  --iexam-accent-fg: #ffffff;
  --iexam-accent-glow: rgba(139, 124, 240, .35);

  --iexam-success: #4ade80;
  --iexam-destructive: #fb7185;
  --iexam-destructive-dim: rgba(251, 113, 133, .14);

  --iexam-radius: 20px;
  --iexam-radius-sm: 12px;
  --iexam-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 45px rgba(0, 0, 0, .45);

  position: relative;
  font-family: 'Vazirmatn', 'Inter', Tahoma, sans-serif;
  color: var(--iexam-fg);
  background: radial-gradient(120% 100% at 15% -10%, #23264a 0%, var(--iexam-bg) 45%), var(--iexam-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
}

.iexam-app * { box-sizing: border-box; }
.iexam-app a, .iexam-app button { cursor: pointer; }

/* ---- بلوب‌هایِ محیطیِ متحرک (پس‌زمینه) ---- */
.iexam-app::before,
.iexam-app::after {
  content: '';
  position: fixed;
  z-index: 0;
  width: 42vw;
  height: 42vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  pointer-events: none;
  animation: iexam-blob-drift 18s ease-in-out infinite alternate;
}
.iexam-app::before {
  top: -10%;
  right: -8%;
  background: radial-gradient(circle, var(--iexam-accent) 0%, transparent 70%);
}
.iexam-app::after {
  bottom: -14%;
  left: -10%;
  background: radial-gradient(circle, var(--iexam-accent-2) 0%, transparent 70%);
  animation-delay: -9s;
}
@keyframes iexam-blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 5%) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .iexam-app::before, .iexam-app::after { animation: none; }
}

.iexam-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--iexam-border);
  background: rgba(18, 19, 31, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-wrap: wrap;
}
.iexam-logo { display: flex; align-items: center; gap: .6rem; color: var(--iexam-fg); text-decoration: none; font-weight: 700; }
.iexam-logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--iexam-accent), var(--iexam-accent-2));
  color: var(--iexam-accent-fg); font-weight: 800;
  box-shadow: 0 4px 14px var(--iexam-accent-glow);
}

.iexam-main { position: relative; z-index: 1; flex: 1; padding: 2.5rem 1.5rem; }
.iexam-page { max-width: 960px; margin: 0 auto; }

.iexam-card {
  background: var(--iexam-surface);
  border: 1px solid var(--iexam-border);
  border-radius: var(--iexam-radius);
  box-shadow: var(--iexam-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 2.2rem;
  animation: iexam-rise .5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes iexam-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .iexam-card { animation: none; }
}

.iexam-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--iexam-border-strong); border-radius: var(--iexam-radius-sm);
  padding: .9rem 1.4rem; font-size: .95rem; font-weight: 700;
  background: var(--iexam-surface-2); color: var(--iexam-fg);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.iexam-btn:hover { transform: translateY(-1px); }
.iexam-btn:active { transform: translateY(0) scale(.98); }
.iexam-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--iexam-accent), var(--iexam-accent-2));
  color: var(--iexam-accent-fg);
  box-shadow: 0 8px 24px var(--iexam-accent-glow);
}
.iexam-btn--primary:hover { filter: brightness(1.08); box-shadow: 0 10px 30px var(--iexam-accent-glow); }
.iexam-btn--block { width: 100%; }
.iexam-btn--lg { padding: 1.05rem 1.6rem; font-size: 1.05rem; }
.iexam-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.iexam-group { margin-bottom: 1.15rem; }
.iexam-group label { display: block; margin-bottom: .5rem; font-weight: 600; font-size: .9rem; color: var(--iexam-fg); }
.iexam-field {
  width: 100%; padding: .85rem 1.05rem; border-radius: var(--iexam-radius-sm);
  border: 1px solid var(--iexam-border-strong); background: rgba(255, 255, 255, .04);
  color: var(--iexam-fg); font-family: inherit; font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.iexam-field:focus { outline: none; border-color: var(--iexam-accent); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 4px var(--iexam-accent-dim); }
.iexam-field::placeholder { color: var(--iexam-muted-fg); }

.iexam-alert {
  padding: .9rem 1.05rem; border-radius: var(--iexam-radius-sm); font-size: .9rem; font-weight: 600;
  margin-bottom: 1rem; display: none;
  border: 1px solid transparent;
}
.iexam-alert--error { background: var(--iexam-destructive-dim); color: var(--iexam-destructive); border-color: rgba(251, 113, 133, .3); }

/* ---- Landing: 3-card grid ---- */
.iexam-landing-title {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  font-weight: 800; text-align: center; margin: 0 0 .6rem;
  background: linear-gradient(90deg, var(--iexam-fg), var(--iexam-accent-hover));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.iexam-landing-sub { color: var(--iexam-muted-fg); text-align: center; margin: 0 0 2.4rem; font-size: 1.02rem; }
.iexam-landing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
@media (max-width: 720px) {
  .iexam-landing-grid { grid-template-columns: 1fr; }
}
.iexam-option-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .95rem; padding: 2.3rem 1.5rem; text-decoration: none;
  background: var(--iexam-surface);
  border: 1px solid var(--iexam-border); border-radius: var(--iexam-radius);
  box-shadow: var(--iexam-shadow);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s ease, box-shadow .25s ease;
}
.iexam-option-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--iexam-accent-dim), transparent 60%);
  opacity: 0; transition: opacity .25s ease;
}
.iexam-option-card:hover {
  border-color: var(--iexam-accent);
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 1px var(--iexam-accent-glow);
}
.iexam-option-card:hover::before { opacity: 1; }
.iexam-option-icon {
  position: relative; z-index: 1;
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; border-radius: 18px;
  background: linear-gradient(135deg, var(--iexam-accent-dim), rgba(91, 140, 255, .12));
  border: 1px solid var(--iexam-border);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.iexam-option-card:hover .iexam-option-icon { transform: scale(1.08) rotate(-4deg); }
.iexam-option-title { position: relative; z-index: 1; font-size: 1.12rem; font-weight: 800; color: var(--iexam-fg); }
.iexam-option-desc { position: relative; z-index: 1; font-size: .87rem; color: var(--iexam-muted-fg); }

/* ---- Quiz steps: question/options/timer (shared by placement/vak/final) ---- */
.iexam-q-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.iexam-q-counter { font-size: .85rem; font-weight: 700; color: var(--iexam-muted-fg); background: var(--iexam-surface-2); padding: .4rem .9rem; border-radius: 20px; border: 1px solid var(--iexam-border); }
.iexam-timer-badge { font-size: .9rem; font-weight: 800; color: var(--iexam-destructive); background: var(--iexam-destructive-dim); padding: .4rem .9rem; border-radius: 20px; font-variant-numeric: tabular-nums; }
.iexam-timer-track { width: 100%; height: 6px; background: var(--iexam-surface-2); border-radius: 10px; margin-bottom: 1.7rem; overflow: hidden; }
.iexam-timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--iexam-destructive), var(--iexam-accent)); transition: width .1s linear; border-radius: 10px; }
.iexam-q-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; direction: ltr; text-align: left; line-height: 1.55; }

.iexam-opt-box {
  position: relative;
  display: flex; align-items: center; gap: .9rem;
  background: rgba(255, 255, 255, .035); border: 2px solid var(--iexam-border);
  padding: 1rem 1.1rem; border-radius: var(--iexam-radius-sm); margin-bottom: .8rem; cursor: pointer;
  direction: ltr; text-align: left; font-size: 1rem;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.iexam-opt-box:hover { border-color: var(--iexam-border-strong); background: rgba(255, 255, 255, .06); transform: translateY(-1px); }
.iexam-opt-box.is-selected {
  border-color: var(--iexam-accent);
  background: var(--iexam-accent-dim);
  box-shadow: 0 0 0 3px var(--iexam-accent-dim);
}
.iexam-opt-box input { display: none; }
.iexam-opt-letter {
  flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800;
  background: var(--iexam-surface-2); color: var(--iexam-muted-fg);
  border: 1px solid var(--iexam-border);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.iexam-opt-box.is-selected .iexam-opt-letter {
  background: linear-gradient(135deg, var(--iexam-accent), var(--iexam-accent-2));
  color: var(--iexam-accent-fg);
  border-color: transparent;
}
.iexam-opt-text { flex: 1; }

.iexam-final-result { text-align: center; padding: 2rem 0; }
.iexam-final-result::before {
  content: '✓';
  display: flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--iexam-accent), var(--iexam-accent-2));
  color: #fff; font-size: 1.9rem; font-weight: 800;
  box-shadow: 0 10px 30px var(--iexam-accent-glow);
  animation: iexam-pop .45s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes iexam-pop {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .iexam-final-result::before { animation: none; }
}

/* =====================================================================
   تعیینِ سطح — ظاهرِ تازه (۲۰۲۶-۱۰-۱۳): هیرو با اوربِ متحرک، کارتِ ویژگی‌ها، مراحل،
   فیلدهایِ آیکن‌دار، نوارِ پیشرفتِ سؤال‌ها، ورودِ نرمِ هر سؤال، صفحه‌یِ پایانِ جشن‌طور.
   ===================================================================== */
.iexam-pl { max-width: 720px; margin: 0 auto; padding: 2rem 1.6rem 1.8rem; }
.iexam-pl-hero { text-align: center; margin-bottom: 1.4rem; }
.iexam-pl-orb { position: relative; width: 92px; height: 92px; margin: 0 auto 1rem; display: grid; place-items: center; }
.iexam-pl-orb span { position: relative; z-index: 2; width: 70px; height: 70px; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem;
  background: linear-gradient(140deg, var(--iexam-accent), var(--iexam-accent-2)); box-shadow: 0 14px 34px var(--iexam-accent-glow), inset 0 1px 0 rgba(255,255,255,.35); transform: rotate(-6deg); }
.iexam-pl-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--iexam-accent); opacity: 0; animation: iexam-ring 2.8s ease-out infinite; }
.iexam-pl-orb i + i { animation-delay: 1.4s; }
@keyframes iexam-ring { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }
.iexam-pl-eye { display: inline-block; margin-bottom: .55rem; padding: .3rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 800;
  color: #ffe08a; background: rgba(255, 196, 64, .12); border: 1px solid rgba(255, 196, 64, .3); }
.iexam-pl .iexam-landing-title { margin-bottom: .45rem; }
.iexam-pl .iexam-landing-sub { margin: 0 auto; max-width: 30em; }

.iexam-pl-feats { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.iexam-pl-feats li { display: grid; justify-items: center; text-align: center; gap: .15rem; padding: .9rem .4rem .8rem; border-radius: 16px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--iexam-border); transition: transform .2s ease, border-color .2s ease; }
.iexam-pl-feats li:hover { transform: translateY(-2px); border-color: var(--iexam-border-strong); }
.iexam-pl-feats i { font-style: normal; font-size: 1.45rem; margin-bottom: .2rem; }
.iexam-pl-feats b { font-size: .86rem; font-weight: 800; }
.iexam-pl-feats small { font-size: .74rem; color: var(--iexam-muted-fg); }
.iexam-pl-feats li:nth-child(1) { box-shadow: inset 0 3px 0 #5b8cff; } .iexam-pl-feats li:nth-child(2) { box-shadow: inset 0 3px 0 #8b7cf0; }
.iexam-pl-feats li:nth-child(3) { box-shadow: inset 0 3px 0 #4ade80; } .iexam-pl-feats li:nth-child(4) { box-shadow: inset 0 3px 0 #fbbf24; }

.iexam-pl-steps { list-style: none; margin: 0 0 1.5rem; padding: .7rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  border-radius: 16px; background: rgba(139, 124, 240, .08); border: 1px dashed rgba(139, 124, 240, .35); counter-reset: s; }
.iexam-pl-steps li { flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem; font-size: .84rem; font-weight: 700; color: var(--iexam-fg); position: relative; }
.iexam-pl-steps em { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 900;
  background: linear-gradient(135deg, var(--iexam-accent), var(--iexam-accent-2)); color: #fff; flex: none; }

.iexam-pl-form { padding: 1.3rem; border-radius: 18px; background: rgba(255, 255, 255, .03); border: 1px solid var(--iexam-border); }
.iexam-pl-field { position: relative; }
.iexam-pl-field i { position: absolute; top: 50%; right: .9rem; transform: translateY(-50%); font-style: normal; font-size: 1.05rem; opacity: .85; pointer-events: none; }
.iexam-pl-field .iexam-field { padding-right: 2.6rem; height: 52px; font-size: 1rem; }
.iexam-pl-field input[dir="ltr"] { text-align: left; padding-right: 2.6rem; letter-spacing: .04em; }
.iexam-pl-go { gap: .7rem; margin-top: .4rem; position: relative; overflow: hidden; }
.iexam-pl-go b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.2); transition: transform .2s ease; }
.iexam-pl-go:hover b { transform: translateX(-4px); }
.iexam-pl-go::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); animation: iexam-shine 3.2s ease-in-out infinite; }
@keyframes iexam-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.iexam-pl-trust { margin: .8rem 0 0; text-align: center; font-size: .78rem; color: var(--iexam-muted-fg); }

/* سؤال‌ها */
.iexam-pl-prog { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .55rem; }
.iexam-pl-prog span { font-size: .88rem; font-weight: 800; padding: .35rem .9rem; border-radius: 99px; background: var(--iexam-accent-dim); color: #d9d3ff; border: 1px solid rgba(139,124,240,.35); }
.iexam-pl-prog small { font-size: .78rem; color: var(--iexam-muted-fg); }
.iexam-pl-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 1.3rem; }
.iexam-pl-track i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--iexam-accent-2), var(--iexam-accent), #f472b6); box-shadow: 0 0 12px var(--iexam-accent-glow); transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.iexam-pl-q { padding: 1.3rem 1.2rem .5rem; margin-bottom: 1rem; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--iexam-border); }
.iexam-pl-q.is-in { animation: iexam-qin .35s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes iexam-qin { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.iexam-pl .iexam-q-title { font-size: 1.28rem; line-height: 1.7; margin-bottom: 1.2rem; }
.iexam-pl .iexam-opt-box { padding: 1.05rem 1.1rem; font-size: 1.04rem; }
.iexam-pl .iexam-opt-box.is-selected .iexam-opt-letter { transform: scale(1.08); }
.iexam-pl-keys { margin: .7rem 0 0; text-align: center; font-size: .76rem; color: var(--iexam-muted-fg); }
@media (hover: none) { .iexam-pl-keys { display: none; } }
.iexam-pl-quit { margin-top: .7rem; background: transparent; color: #fcd34d; border: 1px dashed rgba(252, 211, 77, .45); font-size: .86rem; }
.iexam-pl-quit:hover { background: rgba(252, 211, 77, .08); }

/* پایان */
.iexam-pl-done { font-size: 1.45rem; font-weight: 900; margin-bottom: .5rem; }
.iexam-pl-done-sub { color: var(--iexam-muted-fg); max-width: 28em; margin: 0 auto; line-height: 1.95; }
.iexam-pl-next { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.4rem; }
.iexam-pl-next small { font-weight: 600; opacity: .85; margin-right: .3rem; font-size: .8rem; }
.iexam-btn--outline { background: transparent; }

/* کارتِ توضیحات */
.iexam-pl-info { max-width: 720px; margin: 1.4rem auto 0; padding: 1.6rem; }
.iexam-pl-info h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.iexam-pl-info ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .8rem; }
.iexam-pl-info li { display: flex; gap: .8rem; align-items: flex-start; }
.iexam-pl-info li i { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-style: normal; font-size: 1.2rem; background: rgba(255,255,255,.05); border: 1px solid var(--iexam-border); }
.iexam-pl-info li p { margin: 0; line-height: 2; color: rgba(241,241,245,.86); font-size: .94rem; }
.iexam-pl-more { display: inline-block; font-weight: 800; color: #c4bbff; text-decoration: none; }
.iexam-pl-more:hover { color: #fff; }

@media (max-width: 640px) {
  .iexam-main { padding: 1.2rem .7rem; }
  .iexam-pl { padding: 1.4rem 1rem 1.2rem; }
  .iexam-pl-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iexam-pl-steps { flex-direction: column; align-items: stretch; }
  .iexam-pl-steps li { justify-content: flex-start; }
  .iexam-pl .iexam-q-title { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
  .iexam-pl-orb i, .iexam-pl-go::after, .iexam-pl-q.is-in { animation: none; }
}
