@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Sora:wght@400;600;700&display=swap');

:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --border: #e5e5e7;
  --text: #111113;
  --text2: #6b6b76;
  --accent: #18181b;
  --accent-light: #f4f4f5;
  --radius: 12px;
  --green: #16a34a;
  --red: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: 'Sora', sans-serif; }
a { color: inherit; text-decoration: none; }

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-right { display: flex; gap: 8px; align-items: center; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #27272a; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #ebebed; }

.btn-ghost { background: none; color: var(--text2); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--surface); border-radius: 8px; }

.btn-lg { padding: 11px 24px; font-size: 15px; border-radius: 10px; }
.btn-full { width: 100%; justify-content: center; }

/* HERO */
.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 88px 24px 80px;
  text-align: center;
}
.hero-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero p {
  font-size: 18px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 36px;
}
.hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* SECTION */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 12px;
}
.section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.section-sub { color: var(--text2); font-size: 16px; margin-bottom: 44px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* STEPS */
.steps { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 2px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step { padding: 28px 24px; background: var(--bg); }
.step:not(:last-child) { border-right: 1px solid var(--border); }
.step-num { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 12px; }
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.step p { font-size: 14px; color: var(--text2); line-height: 1.5; }

/* FEATURES */
.features { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { padding: 28px; background: var(--bg); }
.feature-icon { font-size: 20px; margin-bottom: 12px; }
.feature h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature p { font-size: 14px; color: var(--text2); line-height: 1.5; }

/* CTA */
.cta { text-align: center; padding: 80px 24px; border-top: 1px solid var(--border); }
.cta h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.cta p { color: var(--text2); margin-bottom: 28px; }

/* FOOTER */
footer {
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text2);
  flex-wrap: wrap;
  gap: 8px;
}
footer a:hover { color: var(--text); }

/* FORM LAYOUT */
.page-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-sub { color: var(--text2); font-size: 14px; margin-bottom: 36px; }

/* CARD */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.card-header {
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
}
.card-body { padding: 20px; }

/* FORM FIELDS */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--text2); }
input, textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text2); opacity: 0.5; }
textarea { resize: vertical; min-height: 72px; }

.input-row { position: relative; }
.input-prefix {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text2); font-size: 14px; pointer-events: none;
}
.input-row input { padding-left: 26px; }

/* USERNAME CHECK */
.ucheck { font-size: 12px; margin-top: 5px; min-height: 16px; }
.ucheck.ok { color: var(--green); }
.ucheck.fail { color: var(--red); }

/* ALERTS */
.alert { border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info { background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; }

/* SUCCESS PAGE */
.success-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; text-align: center; }
.success-icon { font-size: 40px; margin-bottom: 16px; }
.success-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.success-card .sub { color: var(--text2); font-size: 14px; margin-bottom: 28px; }

.copy-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.copy-field span { flex: 1; padding: 10px 14px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-field button {
  flex-shrink: 0;
  background: var(--surface);
  border: none;
  border-left: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: background 0.15s;
}
.copy-field button:hover { background: #e8e8ea; }
.copy-field button.ok { color: var(--green); }

.key-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: left;
  margin: 16px 0;
}
.key-warning .warn-title { font-size: 13px; font-weight: 600; color: #c2410c; margin-bottom: 8px; }
.key-mono { font-family: 'Courier New', monospace; font-size: 13px; word-break: break-all; color: var(--text); line-height: 1.5; }

/* USER PAGE */
.user-wrap { max-width: 600px; margin: 0 auto; padding: 40px 20px 80px; }

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.avatar {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700;
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; }
.profile-handle { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.profile-bio { font-size: 14px; color: var(--text2); line-height: 1.5; }

/* CURRENCY TABS */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.wallet-panel { display: none; }
.wallet-panel.active { display: block; }
.wallet-panel > .card { margin-bottom: 0; }
.wallet-label { font-size: 12px; color: var(--text2); margin-bottom: 10px; font-weight: 500; }
.wallet-addr {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.wallet-addr span { font-family: 'Courier New', monospace; font-size: 12px; word-break: break-all; flex: 1; line-height: 1.5; }
.copy-btn {
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: var(--text2);
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-btn.ok { color: var(--green); border-color: #bbf7d0; }

/* DONATE FORM */
.donate-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.donate-header { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.donate-header h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.donate-header p { font-size: 13px; color: var(--text2); }
.donate-body { padding: 20px; }
.inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* WALL */
.wall-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wall-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.wall-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text2);
}
.wall-empty {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text2);
  font-size: 14px;
}
.donor-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.donor-avi {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 14px;
  flex-shrink: 0;
  color: var(--text);
}
.donor-body { flex: 1; min-width: 0; }
.donor-name { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.donor-msg { font-size: 13px; color: var(--text2); line-height: 1.4; margin-bottom: 5px; }
.donor-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.donor-amount {
  font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; color: var(--text);
}
.donor-time { font-size: 12px; color: var(--text2); }

/* TOAST */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--accent); color: #fff;
  border-radius: 8px; padding: 11px 18px;
  font-size: 14px; font-weight: 500;
  z-index: 999;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

@media(max-width:600px){
  nav { padding: 0 16px; }
  .hero { padding: 60px 20px; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
  .features { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; }
  .inline-2 { grid-template-columns: 1fr; }
}
