:root {
  --accent: #c9a227;
  --ink: #f4f1ea;
  --muted: #a8a29a;
  --card: rgba(8, 8, 10, 0.82);
  --line: rgba(212, 196, 150, 0.22);
  --blue: #3b82f6;
  --font: Vazirmatn, Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.gate {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  background: #050506;
  overflow-x: hidden;
}
.theme-aurora { --accent: #34d399; }
.theme-royal { --accent: #e8b86d; }
.theme-ember { --accent: #ff7a3d; }
.theme-ocean { --accent: #38bdf8; }
.theme-midnight { --accent: #a78bfa; }

.haze {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 420px at 82% 18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%),
    radial-gradient(560px 380px at 8% 88%, #1d4ed822, transparent 58%);
  z-index: 0;
}
.ring {
  position: fixed;
  width: min(62vw, 640px);
  height: min(62vw, 640px);
  right: -8%;
  top: 6%;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 80px #ffffff08, 0 0 60px #ffffff06;
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(360px, 480px);
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  gap: 0;
  align-items: stretch;
}
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  filter: contrast(1.05) saturate(0.92);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050506 0%, transparent 46%),
    linear-gradient(180deg, transparent 72%, #050506aa);
  pointer-events: none;
}

.gate-card {
  margin: auto 24px auto 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 26px 22px;
  box-shadow: 0 30px 80px #000c, inset 0 1px 0 #ffffff14;
  backdrop-filter: blur(22px);
}
.gate-who { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.gate-who img, .ava {
  width: 64px; height: 64px; border-radius: 18px; object-fit: cover;
  box-shadow: 0 10px 28px #0008;
  border: 1px solid #ffffff22;
}
.ava {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #d4d4d8, #52525b);
  font-size: 26px; font-weight: 800; color: #0a0a0b;
}
.kicker {
  margin: 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .28em;
}
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: .02em; }
.sub, .bio { color: var(--muted); margin: 4px 0 0; }
.bio { margin: 12px 0 8px; line-height: 1.8; font-size: 14px; }
.socials { display: flex; gap: 12px; margin-bottom: 16px; }
.socials a { color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }

.goal-strip {
  background: #00000066;
  border: 1px solid #ffffff10;
  border-radius: 18px;
  padding: 14px 16px 12px;
  margin-bottom: 18px;
}
.goal-copy { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.goal-bar {
  height: 8px;
  margin: 10px 0 8px;
  background: #ffffff12;
  border-radius: 999px;
  overflow: hidden;
}
.goal-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #fde68a);
  border-radius: 999px;
}
.goal-strip p { margin: 0; color: var(--muted); font-size: 12px; }

.form, .form label { display: grid; gap: 8px; }
.label, label { color: var(--muted); font-size: 13px; }
.amount-label small { color: #78716c; }
input, textarea {
  width: 100%;
  border: 1px solid #ffffff16;
  background: #0b0b0d;
  color: var(--ink);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}
input:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-color: transparent;
}
.chips, .emojis { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .cta, .ghost {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.chip {
  background: #ffffff0e;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #ffffff12;
}
.chip:hover, .chip.on {
  background: linear-gradient(90deg, #d4d4d8, var(--accent));
  color: #111;
  font-weight: 800;
  border-color: transparent;
}
.cta {
  background: linear-gradient(90deg, #e8e4dc, var(--accent));
  color: #111;
  font-weight: 800;
  padding: 14px;
  border-radius: 14px;
  flex: 1;
  letter-spacing: .04em;
}
.ghost {
  background: #ffffff10;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
}
.emo { cursor: pointer; }
.emo input { display: none; }
.emo span {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: #ffffff0c;
  font-size: 22px;
  border: 1px solid #ffffff10;
}
.emo input:checked + span {
  outline: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, #000);
}
.switch { display: flex !important; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; }
.switch input { width: auto; }
.terms { font-size: 12px; line-height: 1.7; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.errors { background: #3d1020; color: #ffd4de; border-radius: 14px; padding: 10px 14px; }

.donor-drawer {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 280px;
  background: #0a0a0cee;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 50px #000a;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.donor-drawer ul { list-style: none; margin: 0; padding: 0; }
.donor-drawer li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #ffffff12; }

.result { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.pay-card {
  width: min(480px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(20px);
}
.pay-card .mark {
  width: 88px; height: 88px; object-fit: cover; border-radius: 22px;
  display: block; margin: 0 auto 12px;
  border: 1px solid #ffffff22;
}
.pay-card .eye { color: var(--accent); font-weight: 800; margin: 0; text-align: center; letter-spacing: .16em; }
.pay-card h1 { margin: 8px 0 12px; text-align: center; }
.pay-card .bio, .pay-card .meta { color: var(--muted); text-align: center; }
.pay-card .cta {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
  .hero { min-height: 42vh; max-height: 46vh; }
  .hero-veil {
    background: linear-gradient(180deg, transparent 48%, #050506 96%);
  }
  .gate-card { margin: -48px 14px 32px; }
  .ring { display: none; }
}
@media (max-width: 640px) {
  .gate-card { padding: 22px 16px; border-radius: 22px; }
  .donor-drawer { width: calc(100vw - 24px); }
}
