/* ── Color System ── */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --fg: #1c1917;
  --fg-soft: #44403c;
  --card: #ffffff;
  --border: #e7e5e4;
  --muted: #78716c;
  --primary: #18181b;
  --primary-fg: #fafafa;
  --accent: #2563eb;
  --accent-bg: #eff6ff;
  --accent-border: #bfdbfe;
  --link: #2563eb;
  --code-bg: #f4f4f5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --yellow: #d97706;
  --yellow-bg: #fffbeb;
  --yellow-border: #fde68a;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --donate: #f59e0b;
  --donate-bg: #fffbeb;
  --donate-border: #fde68a;
  --overlay: rgba(0,0,0,0.45);
  --sh1: 0 1px 3px rgba(0,0,0,0.08);
  --sh2: 0 4px 12px rgba(0,0,0,0.08);
  --sh3: 0 8px 24px rgba(0,0,0,0.1);
  --r1: 0.5rem;
  --r2: 0.75rem;
  --r3: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #1c1917;
    --surface-2: #292524;
    --fg: #fafaf9;
    --fg-soft: #d6d3d1;
    --card: #1c1917;
    --border: #292524;
    --muted: #a8a29e;
    --primary: #fafaf9;
    --primary-fg: #1c1917;
    --accent: #3b82f6;
    --accent-bg: #1e3058;
    --accent-border: #1d4ed8;
    --link: #60a5fa;
    --code-bg: #292524;
    --red: #ef4444;
    --red-bg: #2d1515;
    --red-border: #7f1d1d;
    --yellow: #f59e0b;
    --yellow-bg: #2d2210;
    --yellow-border: #78350f;
    --green: #22c55e;
    --green-bg: #0f2d1a;
    --green-border: #14532d;
    --donate: #fbbf24;
    --donate-bg: #2d200a;
    --donate-border: #78350f;
    --overlay: rgba(0,0,0,0.65);
    --sh1: 0 1px 3px rgba(0,0,0,0.3);
    --sh2: 0 4px 12px rgba(0,0,0,0.3);
    --sh3: 0 8px 24px rgba(0,0,0,0.4);
  }
}

/* ── Reset & Base ── */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Tahoma', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-size: 0.9rem;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 60px;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  direction: rtl;
}

/* ── Typography ── */

h1, h2, h3 { font-weight: 700; line-height: 1.25; margin-bottom: 12px; color: var(--fg); }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

a { text-decoration: none; color: var(--link); transition: opacity 0.18s; }
a:hover { opacity: 0.78; text-decoration: underline; }

p { margin: 8px 0; }
ul, ol { padding-right: 20px; }
li { margin-bottom: 8px; }

code {
  font-family: 'Courier New', monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82em;
  direction: ltr;
  display: inline-block;
  color: var(--fg);
}

pre {
  background: var(--code-bg);
  padding: 14px;
  border-radius: var(--r1);
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  border: 1px solid var(--border);
  margin: 12px 0;
}

pre code { background: none; padding: 0; font-size: 0.8rem; }

/* ── Navbar ── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar__brand {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.navbar__brand svg { color: var(--accent); }
.navbar__brand:hover { opacity: 0.85; text-decoration: none; }

.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r1);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.navbar__toggle:hover { color: var(--fg); background: var(--surface-2); }

.navbar__menu {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2px;
}

.navbar__menu li a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: var(--r1);
  transition: all 0.15s;
  display: block;
}

.navbar__menu li a:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }

@media (max-width: 600px) {
  .navbar { flex-wrap: wrap; position: relative; }
  .navbar__toggle { display: flex; }

  .navbar__menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 10px;
    gap: 2px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .navbar__menu--open { display: flex; }
  .navbar__menu li a { padding: 10px 8px; text-align: right; }
}

/* ── Hero ── */

.hero { text-align: center; padding: 48px 16px 36px; }

.hero__icon {
  width: 68px;
  height: 68px;
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  overflow: hidden;
}

.hero__icon img { width: 38px; height: 38px; object-fit: contain; }
.hero__title { font-size: 1.55rem; font-weight: 700; margin-bottom: 8px; }
.hero__desc { color: var(--muted); font-size: 0.9rem; max-width: 400px; margin: 0 auto; line-height: 1.7; }

/* ── Status Badge ── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 14px;
}

.status-badge--open { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.status-badge--closed { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

.status-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge--open .status-badge__dot { animation: pulse 2s ease infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Cards ── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 24px;
  margin: 18px 0;
  box-shadow: var(--sh1);
}

.card--centered { text-align: center; }
.card--wide { text-align: right; line-height: 1.85; }
.card--success { border-color: var(--green); }
.card--danger { border-color: var(--red); }
.card--warning { border-color: var(--yellow); }

/* ── Register Card ── */

.register-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 28px 24px;
  margin: 0 0 18px;
  box-shadow: var(--sh2);
  text-align: center;
}

.register-card__title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--fg); }
.register-card__desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 22px; }

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 2.35rem;
  padding: 0 16px;
  border-radius: var(--r1);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--sh1); }
.btn--secondary { background: transparent; border: 1.5px solid var(--border); color: var(--fg); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: var(--sh1); }
.btn--donate { background: var(--donate); color: #1c1917; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.btn--full { width: 100%; }
.btn--sm { height: 1.8rem; padding: 0 10px; font-size: 0.8rem; }
.btn--lg { height: 2.7rem; padding: 0 24px; font-size: 0.95rem; border-radius: var(--r2); }

.action-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ── QR ── */

.qr-wrap { background: #fff; padding: 10px; border-radius: var(--r2); display: inline-block; margin: 14px 0; box-shadow: var(--sh1); }

/* ── Steps card ── */

.steps-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 20px 22px;
  margin: 18px 0;
  text-align: right;
}

.steps-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--fg);
}

.steps-card ol { margin: 0 0 14px; padding-right: 20px; }
.steps-card ol li { font-size: 0.875rem; color: var(--fg-soft); margin-bottom: 9px; line-height: 1.6; }

/* ── Code block ── */

.code-block {
  direction: ltr;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 11px 14px;
  border-radius: var(--r1);
  color: var(--fg);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  margin: 10px 0 0;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.5;
}

.code-block:hover { background: var(--surface-2); }
.code-block-wrap { position: relative; }

/* ── Alerts ── */

.alert {
  padding: 13px 15px;
  border-radius: var(--r2);
  margin: 14px 0;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: right;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert__body { flex: 1; }

.alert--info { background: var(--accent-bg); border: 1px solid var(--accent-border); }
.alert--danger { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red); }
.alert--warning { background: var(--yellow-bg); border: 1px solid var(--yellow-border); }
.alert--success { background: var(--green-bg); border: 1px solid var(--green-border); }

/* ── Closed banner ── */

.closed-banner {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--r3);
  padding: 28px 20px;
  text-align: center;
  margin: 0 0 18px;
}

.closed-banner__icon { font-size: 2.2rem; margin-bottom: 10px; }
.closed-banner__title { font-size: 1.05rem; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.closed-banner__desc { color: var(--muted); font-size: 0.875rem; }

/* ── Loading dots ── */

.loading-dots { display: inline-flex; gap: 4px; align-items: center; }

.loading-dots span {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Toast ── */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--fg);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), opacity 0.22s;
  z-index: 2000;
  pointer-events: none;
  box-shadow: var(--sh3);
  white-space: nowrap;
}

.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Modal ── */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
}

.modal__content {
  background: var(--card);
  border: 1px solid var(--border);
  margin: 12% auto;
  padding: 30px;
  width: 90%;
  max-width: 380px;
  border-radius: var(--r3);
  text-align: center;
  box-shadow: var(--sh3);
}

.modal__error { color: var(--red); margin-bottom: 16px; font-weight: 600; }

/* ── Avatar ── */

.avatar {
  width: 56px;
  height: 56px;
  background: var(--surface-2);
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  border: 1.5px solid var(--border);
}

/* ── Proxy box ── */

.proxy-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 20px;
  margin: 18px auto;
  max-width: 580px;
  text-align: center;
  box-shadow: var(--sh1);
}

.proxy-box__link {
  font-family: 'Courier New', monospace;
  background: var(--code-bg);
  padding: 10px;
  border-radius: var(--r1);
  color: var(--fg);
  cursor: pointer;
  word-break: break-all;
  display: block;
  font-size: 0.85rem;
  direction: ltr;
  margin: 10px 0;
  transition: opacity 0.15s;
  border: 1px solid var(--border);
}

.proxy-box__link:hover { opacity: 0.78; }

/* ── Doc list ── */

.doc-list { list-style: none; padding: 0; }
.doc-list li { margin: 6px 0; padding: 11px; border-radius: var(--r1); transition: background 0.15s; }
.doc-list li:hover { background: var(--surface-2); }
.doc-list a { font-weight: 600; display: block; margin-bottom: 3px; }
.doc-list span { font-size: 0.8rem; color: var(--muted); }

/* ── Cmd info ── */

.cmd-info { margin-bottom: 22px; padding: 13px; border-radius: var(--r1); }
.cmd-info h3 { margin-top: 0; }
.cmd-info p { margin: 4px 0; font-size: 0.875rem; color: var(--muted); }

/* ── Divider ── */

.divider { height: 1px; background: var(--border); margin: 22px 0; }

/* ── Footer ── */

.footer {
  margin-top: 52px;
  padding: 18px 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); text-decoration: none; }

/* ── Utilities ── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.text-warning { color: var(--yellow); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.mono { font-family: 'Courier New', monospace; direction: ltr; }
.rtl { direction: rtl; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { justify-content: center; }
.items-center { align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.list-plain { list-style: none; margin: 8px 0; padding: 0 15px; }

/* ── Responsive ── */

@media (max-width: 600px) {
  body { padding: 0 14px 48px; }
  .card, .register-card { padding: 18px 16px; }
  .hero { padding: 36px 8px 26px; }
  h1 { font-size: 1.4rem; }
}

/* ── Donate ── */

.donate-section {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 60%, #7c2d12 100%);
  border: 1px solid #b91c1c;
  border-radius: var(--r3);
  padding: 22px 20px 18px;
  margin: 0 0 18px;
  box-shadow: 0 4px 20px rgba(185,28,28,0.25);
  position: relative;
  overflow: hidden;
}

.donate-section::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.donate-section__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.donate-section__heart {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  color: #fca5a5;
  filter: drop-shadow(0 0 6px rgba(252,165,165,0.5));
  margin-top: 2px;
}

.donate-section__title {
  font-weight: 700;
  font-size: 1rem;
  color: #fef2f2;
  margin-bottom: 7px;
  line-height: 1.35;
}

.donate-section__desc {
  font-size: 0.83rem;
  color: #fca5a5;
  line-height: 1.7;
  margin: 0;
}

.donate-section__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  background: #fbbf24;
  color: #1c1917;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--r2);
  text-decoration: none;
  border: none;
  transition: background 0.15s, transform 0.15s;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(251,191,36,0.35);
}

.donate-section__btn:hover {
  background: #f59e0b;
  transform: translateY(-1px);
  text-decoration: none;
  color: #1c1917;
}

/* ── Download Grid ── */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  text-decoration: none;
  transition: all 0.15s;
  text-align: center;
}

.dl-item:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  transform: translateY(-2px);
  text-decoration: none;
}

.dl-item__icon {
  font-size: 1.6rem;
  line-height: 1;
}

.dl-item__label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--fg);
  direction: ltr;
}

.dl-item__sub {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-item { flex-direction: row; justify-content: flex-start; padding: 12px 14px; gap: 12px; }
  .dl-item__icon { font-size: 1.3rem; }
}

/* ── Download Page ── */

.dl-section {
  margin: 0 0 8px;
}

.dl-section__label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  padding: 0 4px;
}

.dl-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--sh1);
  transition: box-shadow 0.15s, transform 0.15s;
}

.dl-card:hover {
  box-shadow: var(--sh2);
  transform: translateY(-1px);
}

.dl-card__icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.dl-card__body {
  flex: 1;
  min-width: 0;
}

.dl-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 4px;
  direction: ltr;
  text-align: right;
}

.dl-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.dl-card__actions {
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .dl-card { flex-wrap: wrap; }
  .dl-card__actions { width: 100%; }
  .dl-card__actions .btn { width: 100%; }
}

/* ── Security Page ── */

.sec-block {
  margin: 0 0 16px;
}

.sec-block__heading {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
  margin-bottom: 10px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sec-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--sh1);
}

.sec-feature__check {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.sec-feature__body {
  flex: 1;
}

.sec-feature__body strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--fg);
}

.sec-feature__body p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

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

.sec-numbered__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 18px 16px;
  box-shadow: var(--sh1);
}

.sec-numbered__num {
  width: 32px;
  height: 32px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.sec-numbered__body {
  flex: 1;
}

.sec-numbered__body strong {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9rem;
  color: var(--fg);
}

.sec-numbered__body p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

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

.sec-warning__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--r2);
  padding: 16px;
}

.sec-warning__icon {
  width: 28px;
  height: 28px;
  background: var(--yellow);
  color: #1c1917;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* ── Theme toggle (CSS vars override) ── */

html.dark {
  --bg: #0c0a09; --surface: #1c1917; --surface-2: #292524;
  --fg: #fafaf9; --fg-soft: #d6d3d1; --card: #1c1917;
  --border: #292524; --muted: #a8a29e; --primary: #fafaf9;
  --primary-fg: #1c1917; --accent: #3b82f6; --accent-bg: #1e3058;
  --accent-border: #1d4ed8; --link: #60a5fa; --code-bg: #292524;
  --red: #ef4444; --red-bg: #2d1515; --red-border: #7f1d1d;
  --yellow: #f59e0b; --yellow-bg: #2d2210; --yellow-border: #78350f;
  --green: #22c55e; --green-bg: #0f2d1a; --green-border: #14532d;
  --donate: #fbbf24; --donate-bg: #2d200a; --donate-border: #78350f;
  --overlay: rgba(0,0,0,0.65);
  --sh1: 0 1px 3px rgba(0,0,0,0.3);
  --sh2: 0 4px 12px rgba(0,0,0,0.3);
  --sh3: 0 8px 24px rgba(0,0,0,0.4);
}

html.light {
  --bg: #fafaf9; --surface: #ffffff; --surface-2: #f5f5f4;
  --fg: #1c1917; --fg-soft: #44403c; --card: #ffffff;
  --border: #e7e5e4; --muted: #78716c; --primary: #18181b;
  --primary-fg: #fafafa; --accent: #2563eb; --accent-bg: #eff6ff;
  --accent-border: #bfdbfe; --link: #2563eb; --code-bg: #f4f4f5;
  --red: #dc2626; --red-bg: #fef2f2; --red-border: #fecaca;
  --yellow: #d97706; --yellow-bg: #fffbeb; --yellow-border: #fde68a;
  --green: #16a34a; --green-bg: #f0fdf4; --green-border: #bbf7d0;
  --donate: #f59e0b; --donate-bg: #fffbeb; --donate-border: #fde68a;
  --overlay: rgba(0,0,0,0.45);
  --sh1: 0 1px 3px rgba(0,0,0,0.08);
  --sh2: 0 4px 12px rgba(0,0,0,0.08);
  --sh3: 0 8px 24px rgba(0,0,0,0.1);
}

/* ── Progress bar ── */

.progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  opacity: 0;
  z-index: 9999;
  transition: width 0.2s ease, opacity 0.4s ease;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--accent);
}

/* ── Navbar icon button (theme toggle) ── */

.navbar__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r1);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.navbar__icon-btn:hover { color: var(--fg); background: var(--surface-2); }

/* Active nav link */
.navbar__menu li a.active {
  color: var(--accent);
  background: var(--accent-bg);
}

/* ── Page entrance animation ── */

.page-anim .hero,
.page-anim .register-card,
.page-anim .donate-section,
.page-anim .card,
.page-anim .steps-card,
.page-anim .sec-block,
.page-anim .alert,
.page-anim .dl-section,
.page-anim .closed-banner {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.4s ease forwards;
}

.page-anim .hero { animation-delay: 0.05s; }
.page-anim .register-card,
.page-anim .donate-section,
.page-anim .closed-banner { animation-delay: 0.12s; }
.page-anim .card:nth-of-type(1),
.page-anim .steps-card:nth-of-type(1) { animation-delay: 0.18s; }
.page-anim .card:nth-of-type(2),
.page-anim .steps-card:nth-of-type(2),
.page-anim .sec-block:nth-of-type(1) { animation-delay: 0.22s; }
.page-anim .card:nth-of-type(3),
.page-anim .sec-block:nth-of-type(2) { animation-delay: 0.26s; }
.page-anim .alert { animation-delay: 0.3s; }
.page-anim .dl-section { animation-delay: 0.15s; }

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

/* ── Account ready card ── */

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--r2);
  padding: 13px 16px;
  margin-bottom: 14px;
  animation: fadeUp 0.3s ease forwards;
}

.account-card__icon { font-size: 1.3rem; flex-shrink: 0; }

.account-card__body { flex: 1; min-width: 0; }

.account-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 2px;
}

.account-card__email {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--fg);
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Copy with checkmark ── */

.btn--copied {
  background: var(--green) !important;
  color: #fff !important;
  border-color: var(--green) !important;
}

/* ── Download card detected ── */

.dl-card--detected {
  border-color: var(--accent) !important;
  background: var(--accent-bg) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent) !important;
}

.dl-card__badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  margin-right: 8px;
  vertical-align: middle;
}

/* ── Server Notice ── */

.snotice {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.snotice.hidden { display: none !important; }

.snotice__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* کادر اصلی — مشکی شیشه‌ای، گوشه‌های کاملاً گرد بالا، نوک‌تیز پایین */
.snotice__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px 24px 6px 6px;
  padding: 26px 22px 24px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.07) inset;
  animation: popIn 0.3s cubic-bezier(.34,1.4,.64,1);
}

@media (max-width: 480px) {
  .snotice__sheet {
    padding: 22px 18px 22px;
  }
}

@keyframes popIn {
  from { transform: scale(0.9) translateY(16px); opacity: 0; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.snotice__header {
  text-align: right;
  margin-bottom: 18px;
  position: relative;
  padding-left: 36px;
}

.snotice__close {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.snotice__close:hover {
  background: rgba(239,68,68,0.35);
  color: #fff;
  border-color: rgba(239,68,68,0.5);
}

.snotice__title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.snotice__sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
  line-height: 1.5;
}

.snotice__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.snotice__group {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
}

.snotice__group-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  direction: ltr;
  text-align: left;
}

.snotice__addr {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  direction: ltr;
  text-align: left;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: all;
  display: block;
}

.snotice__addr:last-child { margin-bottom: 0; }

.snotice__addr:hover {
  background: rgba(96,165,250,0.15);
  border-color: rgba(96,165,250,0.35);
  color: #fff;
}

.snotice__copy-all {
  width: 100%;
  padding: 13px;
  background: #fff;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.snotice__copy-all:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
