/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f0f1a;
  --surface: #16162a;
  --surface2: #1e1e36;
  --border: #2a2a4a;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
  --font: 'Segoe UI', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }
img { max-width: 100%; }

/* ── Layout ───────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section__title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.section__subtitle { color: var(--text-muted); text-align: center; margin-bottom: 2.5rem; }
.gradient-text { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Header ───────────────────────────────── */
.header { position: sticky; top: 0; z-index: 100; background: rgba(15,15,26,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.2rem; color: var(--text); }
.logo__icon { font-size: 1.4rem; }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav__link { padding: .4rem .8rem; border-radius: 8px; color: var(--text-muted); font-size: .9rem; transition: var(--transition); }
.nav__link:hover, .nav__link.active { color: var(--text); background: var(--surface2); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; margin-left: auto; }

/* ── Buttons ──────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .55rem 1.25rem; border-radius: 8px; border: none; cursor: pointer; font-size: .9rem; font-weight: 600; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--outline-white { background: transparent; border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn--outline-white:hover { background: rgba(255,255,255,.1); }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { background: #f0e7ff; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #dc2626; }
.btn--sm { padding: .3rem .75rem; font-size: .8rem; }
.btn--lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn--full { width: 100%; }

/* ── Forms ────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .35rem; font-size: .85rem; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .6rem .9rem; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .9rem; font-family: var(--font);
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}
.form-group select option { background: var(--surface2); }
.search-input { width: 100%; padding: .6rem 1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: .9rem; margin-bottom: 1rem; }
.search-input:focus { outline: none; border-color: var(--primary); }

/* ── Footer ───────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 4rem; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer__brand p { color: var(--text-muted); font-size: .85rem; margin-top: .5rem; }
.footer__links { display: flex; flex-direction: column; gap: .5rem; }
.footer__links h4 { margin-bottom: .5rem; }
.footer__links a { color: var(--text-muted); font-size: .9rem; }
.footer__links a:hover { color: var(--text); }
.footer__newsletter p { color: var(--text-muted); font-size: .85rem; margin-bottom: .75rem; }
.newsletter-form { display: flex; gap: .5rem; }
.newsletter-form__input { flex: 1; padding: .6rem .9rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: .85rem; }
.footer__bottom { text-align: center; padding: 1.5rem; color: var(--text-muted); font-size: .8rem; border-top: 1px solid var(--border); }

/* ── Utilities ────────────────────────────── */
.hidden { display: none !important; }
.mt { margin-top: 1rem; }
.empty-state { color: var(--text-muted); text-align: center; padding: 2rem; }
.page-main { padding: 2rem 0 4rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: .5rem; }
.page-subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* ── Wallet bar ───────────────────────────── */
.wallet-bar { display: flex; align-items: center; justify-content: space-between; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1.25rem; margin-bottom: 1.5rem; font-size: .95rem; }
.badge { background: var(--primary); color: #fff; padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; }

/* ── Modal ────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal__content { position: relative; background: var(--surface); border-radius: var(--radius); padding: 2rem; width: min(600px, 90vw); z-index: 1; max-height: 85vh; overflow-y: auto; }
.modal__close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1.25rem; cursor: pointer; }
.modal__close:hover { color: var(--text); }

/* ── App output ───────────────────────────── */
.app-code { background: #0d1117; padding: 1rem; border-radius: 8px; font-size: .85rem; color: #e6edf3; overflow-x: auto; margin-bottom: 1rem; white-space: pre-wrap; }
.app-output { background: var(--surface2); border-left: 3px solid var(--success); padding: 1rem; border-radius: 0 8px 8px 0; margin-top: 1rem; font-family: monospace; font-size: .9rem; }

/* ── Tabs ─────────────────────────────────── */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; flex-wrap: wrap; }
.tab { background: none; border: none; padding: .5rem 1rem; color: var(--text-muted); cursor: pointer; border-radius: 8px 8px 0 0; font-size: .9rem; font-weight: 600; transition: var(--transition); }
.tab.active, .tab:hover { color: var(--primary); background: var(--surface2); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── CTA Section ──────────────────────────── */
.cta-section { background: linear-gradient(135deg, var(--primary), #4f46e5); border-radius: var(--radius); padding: 4rem 2rem; text-align: center; }
.cta-section h2 { font-size: 2rem; color: #fff; margin-bottom: .75rem; }
.cta-section p { color: rgba(255,255,255,.8); margin-bottom: 2rem; }
.cta-section__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-section__trust { color: rgba(255,255,255,.7); font-size: .85rem; margin-top: 1rem; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); padding: 1rem; border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .hamburger { display: block; }
  .header .btn--primary { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
}