/* ═══════════════════════════════════════════════════════════
   النتيجة: الحكم + كروت التصحيح اللي بتتقلب + الاحتفال + إعادة المشهد
   ═══════════════════════════════════════════════════════════ */
.results {
  position: fixed; inset: 0; z-index: 45; overflow-y: auto; overscroll-behavior: contain; background: var(--sand);
  /* ألوان هادية خاصة بالنتيجة */
  --soft-red: #b86a58; --soft-red-bg: #f6e9e3; --soft-mint-bg: #e7f1ea;
}
.results__inner { width: min(60rem, 100% - 2rem); margin: 0 auto; padding: 7vh 0 10vh; }

/* ── كارت الحكم (صحيحة / باطلة) ── */
.verdict { text-align: center; padding: 3rem 2rem 2.4rem; border-radius: 34px; background: var(--paper); box-shadow: 0 30px 60px -45px rgba(60, 45, 20, .35); border: 1px solid var(--line); position: relative; overflow: hidden; }
.verdict::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: var(--vc, var(--mint-d)); }
.verdict.is-ok { --vc: var(--mint-d); }
.verdict.is-bad { --vc: var(--soft-red); }
.verdict.is-bad::before { height: 0; }
.verdict__icon { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; color: #fff; background: var(--vc); box-shadow: 0 0 0 10px color-mix(in srgb, var(--vc) 16%, transparent); }
.verdict.is-bad .verdict__icon { width: 56px; height: 56px; font-size: 1.6rem; font-weight: 700; color: var(--soft-red); background: var(--soft-red-bg); box-shadow: none; }
.verdict__eyebrow { margin: 0; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; }
.verdict__title { margin: .3rem 0 .6rem; font-family: var(--display); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.2; color: var(--vc); }
.verdict.is-bad .verdict__title { color: var(--ink); font-size: clamp(2.1rem, 4vw, 3.1rem); }
.verdict__sub { margin: 0 auto 1.8rem; max-width: 34rem; font-size: 1.12rem; line-height: 1.85; color: var(--ink-2); }

/* شريط النسبة: صح (أخضر) / معلومات (دهبي) / أخطاء (وردي) */
.verdict__bar { display: flex; gap: 4px; width: min(26rem, 100%); height: 10px; margin: 0 auto 1rem; border-radius: 999px; overflow: hidden; }
.verdict__bar:empty { display: none; }
.verdict__bar i { display: block; min-width: 10px; border-radius: 999px; }
.verdict__bar .ok { background: #8fc3a6; }
.verdict__bar .info { background: #e3c98f; }
.verdict__bar .bad { background: #d9a294; }
.verdict__stats { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; margin: 0; padding: 0; }
.verdict__stats li { padding: 0; border-radius: 16px; background: none; font-size: .88rem; color: var(--ink-2); display: flex; align-items: baseline; gap: .4rem; }
.verdict__stats li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.verdict__stats li:nth-child(1)::before { background: #8fc3a6; }
.verdict__stats li:nth-child(2)::before { background: #d9a294; }
.verdict__stats li:nth-child(3)::before { background: #e3c98f; }
.verdict__stats b { display: inline; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── الاحتفال (لو مفيش ولا غلطة) ── */
.celebrate { position: relative; width: 15rem; height: 19rem; margin: -.5rem auto 1.4rem; }
.celebrate__arch { position: absolute; inset: 0; clip-path: url(#arch-clip); overflow: hidden; background: #d7c0a0; }
.celebrate__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.celebrate__line { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--gold); stroke-width: 2.5; vector-effect: non-scaling-stroke; overflow: visible; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; pointer-events: none; display: none; }

/* ── القوايم (أخطاء / معلومات / أصبت فيها) ── */
.rlist { margin-top: 4rem; }
.rlist__h { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.4rem; font-family: var(--display); font-size: 1.6rem; color: var(--ink); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--bad { background: #d9a294; }
.dot--info { background: #e3c98f; }
.dot--good { background: #8fc3a6; }
.rlist__items { display: grid; grid-template-columns: 1fr; gap: 1.1rem; align-items: start; }
.rlist__chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.rlist__chips li { padding: .5rem .95rem; border-radius: 999px; background: var(--soft-mint-bg); font-size: .92rem; }
.rlist__chips li::before { content: '✓ '; color: var(--mint-d); font-weight: 700; }

/* ── كارت التصحيح (بيتقلب): الوش = الصورة + إجابتك والصواب، الضهر = الشرح + ابن باز + الدليل ── */
.fixc { perspective: 1400px; cursor: pointer; --fc: var(--soft-red); --fc-bg: var(--soft-red-bg); }
.fixc--gold { --fc: #a88238; --fc-bg: #f6eedb; }
.fixc__in { display: grid; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.fixc.is-flipped .fixc__in { transform: rotateY(180deg); }
.fixc__face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: none; display: flex; flex-direction: column; }
.fixc:hover .fixc__face { border-color: rgba(36, 50, 43, .2); }
.fixc__front { flex-direction: row; min-height: 15rem; }
.fixc__back { transform: rotateY(180deg); padding: 1.6rem 1.9rem; border-top: 0; box-shadow: inset 0 3px 0 var(--fc-bg); }

.fixc__img { position: relative; flex: 0 0 34%; margin: .6rem; margin-inline-end: 0; border-radius: 16px; overflow: hidden; background: var(--sand-2); }
.fixc__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.fixc__no { position: absolute; top: .6rem; inset-inline-start: .6rem; display: grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .5rem; border-radius: 999px; background: rgba(255, 252, 246, .92); color: var(--ink); font-weight: 700; font-size: .85rem; }
.fixc__body { flex: 1; padding: 1.4rem 1.7rem; display: grid; gap: .8rem; align-content: center; }
.fixc__tag { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: 0; border-radius: 999px; background: none; color: var(--fc); }
.fixc__tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fc); }
.fixc__title { margin: 0; font-family: var(--display); font-size: 1.45rem; line-height: 1.3; }
.fixc__back .fixc__title { font-size: 1.3rem; color: var(--ink); }
.fixc__ab { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.fixc__ab > div { padding: .7rem .9rem; border-radius: 12px; font-size: .95rem; line-height: 1.7; }
.fixc__ab small { display: block; font-size: .74rem; font-weight: 600; margin-bottom: .1rem; }
.fixc__you { background: var(--fc-bg); color: var(--ink-2); }
.fixc__you small { color: var(--fc); }
.fixc__right { background: var(--soft-mint-bg); }
.fixc__right small { color: var(--mint-d); }
.fixc__hint { margin: 0; font-size: .8rem; color: var(--ink-2); opacity: .8; }
.fixc__hint::before { content: "\21BB  "; color: var(--ink-2); }

.fixc__why { margin: .6rem 0 .9rem; font-size: 1rem; line-height: 1.8; color: var(--ink); }
.fixc__ib { margin-bottom: .9rem; padding: .9rem 1rem; border-radius: 14px; background: var(--soft-mint-bg); border-inline-start: 2px solid var(--mint-d); }
.fixc__ib b { display: block; font-size: .78rem; color: var(--mint-d); margin-bottom: .2rem; }
.fixc__ib p { margin: 0; line-height: 1.75; }
.fixc__dalil { margin: 0; padding: .8rem 1rem; border-radius: 14px; background: #f7f1e6; font-family: var(--f-text); font-size: 1.05rem; line-height: 1.85; }
.fixc__dalil b { display: block; font-family: var(--f-ui); font-size: .78rem; color: #9a7426; }
html[lang="en"] .fixc__dalil { font-size: .95rem; }
.fixc__note { margin: .7rem 0 0; font-size: .88rem; line-height: 1.7; color: var(--ink-2); }
.fixc__note b { color: #9a7426; }
.fixc__see { margin-top: 1rem; align-self: flex-start; }

/* ── الأزرار والملاحظة تحت ── */
.results__actions { margin-top: 3rem; text-align: center; display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.results__note { margin: 1.4rem auto 0; max-width: 34rem; text-align: center; font-size: .85rem; line-height: 1.8; color: var(--ink-2); }

/* ── إعادة المشهد الصحيح (زرار «شاهد الصواب») ── */
.replay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.replay__backdrop { position: absolute; inset: 0; background: rgba(36, 50, 43, .55); backdrop-filter: blur(6px); }
.replay__box { position: relative; width: min(60rem, 100%); padding: 1.4rem; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.replay__close { position: absolute; top: .8rem; inset-inline-end: .8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--sand); font-size: 1.4rem; line-height: 1; z-index: 2; }
.replay__kicker { margin: 0; color: var(--mint-d); font-weight: 700; font-size: .85rem; }
.replay__title { margin: .1rem 0 1rem; font-family: var(--display); font-size: 1.7rem; }
.stage--mini { position: relative; inset: auto; aspect-ratio: 1284 / 716; border-radius: 18px; }
.stage--mini .caption { bottom: 1.2rem; }
.stage--mini .caption span { font-size: .95rem; padding: .55rem 1.1rem; }
.stage--mini .bubble span { font-size: 1.1rem; }

/* ── الموبايل ── */
@media (max-width: 760px) {
  .verdict__sub { font-size: 1.35rem; }
  .verdict__bar { height: 12px; }
  .verdict__stats { gap: 1rem 1.4rem; }
  .verdict__stats li { font-size: 1.15rem; }
  .celebrate { width: 18rem; height: 23rem; }
  .fixc__front { flex-direction: column; min-height: 0; }
  .fixc__img { flex: none; aspect-ratio: 16 / 8; margin: .6rem .6rem 0; }
  .fixc__body { padding: 1.2rem 1.3rem 1.3rem; }
  .fixc__ab { grid-template-columns: 1fr; }
  .fixc__title { font-size: 1.8rem; }
  .fixc__ab > div, .fixc__why, .fixc__ib p, .fixc__dalil { font-size: 1.25rem; }
  .fixc__hint { font-size: 1.1rem; }
}
