@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E, U+2010-2011;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

:root {
  --bg: #0a0e16;
  --bg-elevated: #0d1220;
  --surface: #131928;
  --surface-2: #1a2233;
  --surface-glass: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  --line: #232c40;
  --line-soft: #1a2233;
  --ink: #eef1f8;
  --ink-soft: #a6b0c3;
  --muted: #6b7690;

  --primary: #7c93ff;
  --primary-2: #34d6e8;
  --primary-strong: #5b6fe0;
  --primary-light: rgba(124,147,255,.14);
  --gradient-brand: linear-gradient(120deg, #7c93ff, #34d6e8);

  --pass-fg: #4ade80;
  --pass-bg: rgba(74,222,128,.13);
  --pass-ring: #34d399;
  --fail-fg: #fb7185;
  --fail-bg: rgba(251,113,133,.13);
  --fail-ring: #f43f5e;
  --pending-fg: #fbbf24;
  --pending-bg: rgba(251,191,36,.13);
  --pending-ring: #f59e0b;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.025) inset;
  --shadow-md: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset;
  --shadow-glow: 0 0 0 1px rgba(124,147,255,.3), 0 12px 40px rgba(124,147,255,.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- ambient background glow ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
  will-change: transform;
}
body::before {
  top: -220px;
  inset-inline-end: -160px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(124,147,255,.55), transparent 70%);
  animation: driftA 22s ease-in-out infinite alternate;
}
body::after {
  bottom: -260px;
  inset-inline-start: -180px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(52,214,232,.4), transparent 70%);
  animation: driftB 26s ease-in-out infinite alternate;
}
@keyframes driftA { from { transform: translate(0,0); } to { transform: translate(-40px, 40px); } }
@keyframes driftB { from { transform: translate(0,0); } to { transform: translate(40px, -30px); } }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  html { scroll-behavior: auto; }
}

::selection { background: var(--primary); color: #05070d; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-strong); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 56px;
  scroll-margin-top: 90px;
}
section { scroll-margin-top: 88px; }

/* ---------- site header ---------- */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,14,22,.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
}
.brand-icon {
  font-size: 19px;
  filter: drop-shadow(0 0 10px rgba(124,147,255,.55));
}
.brand-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-header nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.site-header nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding-bottom: 4px;
  transition: color .15s;
}
.site-header nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a:hover::after,
.site-header nav a.active::after { transform: scaleX(1); }
.site-header nav a.active { color: var(--ink); }

/* ---------- hero / search section ---------- */
.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 0 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  text-align: center;
}
h1 {
  margin: 0;
  font-size: clamp(26px, 4.8vw, 36px);
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 30%, var(--primary) 75%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.25;
}
.sub {
  color: var(--ink-soft);
  margin: 12px 0 0;
  font-size: 15.5px;
  max-width: 460px;
  line-height: 1.75;
}
.stat-pill {
  margin-top: 18px;
  color: var(--ink);
  background: var(--primary-light);
  border: 1px solid rgba(124,147,255,.35);
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 13px;
  box-shadow: 0 0 24px rgba(124,147,255,.12);
}
.stat-pill strong {
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- search card ---------- */
.search-card {
  background: var(--surface-glass), var(--surface);
  background-blend-mode: overlay;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.search-card:has(input:focus) {
  border-color: rgba(124,147,255,.45);
  box-shadow: var(--shadow-glow);
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg.search-icon {
  position: absolute;
  right: 16px;
  width: 19px; height: 19px;
  color: var(--muted);
  pointer-events: none;
  transition: color .15s;
}
.search-card input {
  width: 100%;
  padding: 15px 46px;
  font-size: 16.5px;
  font-family: inherit;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  background: var(--bg-elevated);
  color: var(--ink);
}
.search-card input::placeholder { color: var(--muted); }
.search-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,147,255,.16);
  background: var(--surface-2);
}
.search-card input:focus ~ svg.search-icon { color: var(--primary); }
.clear-btn {
  position: absolute;
  left: 12px;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.clear-btn:hover { background: var(--line); color: var(--ink); }
.clear-btn.show { display: flex; }

#searchBtn {
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  color: #06070d;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124,147,255,.28);
  transition: filter .15s, transform .1s, box-shadow .2s;
}
#searchBtn:hover { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(124,147,255,.4); }
#searchBtn:active { transform: scale(.98); }
#searchBtn.loading .btn-label::after { content: "…"; }

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 15px;
  text-align: center;
}
.hint code {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 2px 7px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}

/* ---------- status line ---------- */
#status {
  color: var(--ink-soft);
  margin-top: 18px;
  min-height: 22px;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ---------- results ---------- */
#results {
  width: 100%;
  max-width: 880px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface-glass), var(--surface);
  background-blend-mode: overlay;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm), 0 0 0 1px transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-inline-start: 4px solid var(--ring, var(--muted));
  animation: cardIn .35s ease backwards;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--ring, var(--muted)) 45%, var(--line));
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-main { display: flex; align-items: center; gap: 16px; min-width: 0; }

.ring {
  --pct: 0;
  --ring: var(--muted);
  width: 58px; height: 58px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--line-soft) 0);
  position: relative;
  box-shadow: 0 0 18px -4px var(--ring);
}
.ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-elevated);
}
.ring span {
  position: relative;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.card-info { min-width: 0; }
.card .name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.card .seat {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
  direction: ltr;
  display: inline-block;
}
.card .badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 7px;
}
.badge.pass { background: var(--pass-bg); color: var(--pass-fg); box-shadow: 0 0 0 1px rgba(74,222,128,.25) inset; }
.badge.fail { background: var(--fail-bg); color: var(--fail-fg); box-shadow: 0 0 0 1px rgba(251,113,133,.25) inset; }
.badge.pending { background: var(--pending-bg); color: var(--pending-fg); box-shadow: 0 0 0 1px rgba(251,191,36,.25) inset; }

.card-score {
  text-align: center;
  flex: none;
}
.card-score .degree {
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  direction: ltr;
}
.card-score .degree small { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-score .pct {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
  font-weight: 600;
}

.copy-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  flex: none;
}
.copy-btn:hover { background: var(--line); border-color: var(--primary); color: var(--ink); }
.copy-btn.copied { background: var(--pass-bg); color: var(--pass-fg); border-color: transparent; }

/* ---------- skeleton ---------- */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  height: 70px;
  overflow: hidden;
  position: relative;
}
.skeleton-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(124,147,255,.09) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 34px 10px;
}
.empty-state .emoji { font-size: 40px; display: block; margin-bottom: 10px; opacity: .85; filter: drop-shadow(0 0 12px rgba(124,147,255,.25)); }

.spinner {
  border: 3px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 15px; height: 15px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- content sections (SEO / informational) ---------- */
.content-section {
  width: 100%;
  max-width: 760px;
  background: var(--surface-glass), var(--surface);
  background-blend-mode: overlay;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.content-section.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .content-section { opacity: 1; transform: none; transition: none; }
}
.content-section h2 {
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  padding-inline-start: 12px;
  border-inline-start: 4px solid transparent;
  border-image: var(--gradient-brand);
  border-image-slice: 1;
}
.content-section p {
  line-height: 1.9;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.content-section p:last-child { margin-bottom: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px 8px;
  text-align: center;
  border-top: 3px solid var(--muted);
  transition: transform .15s ease, border-color .15s ease;
}
.stat-box:hover { transform: translateY(-3px); }
.stat-box.pass { border-top-color: var(--pass-ring); }
.stat-box.pending { border-top-color: var(--pending-ring); }
.stat-box.fail { border-top-color: var(--fail-ring); }
.stat-num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  direction: ltr;
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 5px;
}
.stats-note {
  font-size: 13px;
  color: var(--ink-soft);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  line-height: 1.8;
  font-size: 14.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.steps li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #06070d;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
  padding: 15px 0;
}
.faq-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-inline-end: 26px;
  transition: color .15s;
}
.faq-item summary:hover { color: var(--primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin-top: 11px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.85;
  animation: fadeSlideIn .25s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.about p { font-size: 13.5px; }

footer {
  color: var(--muted);
  margin-top: 34px;
  font-size: 12.5px;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 8px;
  max-width: 560px;
  line-height: 1.7;
  border-top: 1px solid var(--line-soft);
}
.footer-year { margin-top: 6px; opacity: .8; }

@media (max-width: 640px) {
  .content-section { padding: 24px 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .card { padding: 15px; }
  .card-main { width: 100%; }
  .card-score { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
  .copy-btn { width: 100%; }
  .ring { width: 50px; height: 50px; }
  .site-header-inner { justify-content: center; text-align: center; }
  .site-header nav { justify-content: center; }
}
