/* ═══════════════════════════════════════════════════════════════
   app.css — SolFortune Clone Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design tokens ──────────────────────────────────────────── */
:root {
  --bg-base:       #0a0a0f;
  --bg-card:       #13131a;
  --bg-card-hover: #1a1a25;
  --bg-input:      #1e1e2e;
  --border:        #2a2a3a;
  --border-focus:  #9945ff;

  --purple:        #9945ff;
  --purple-light:  #b56bff;
  --green:         #14f195;
  --green-dark:    #0db574;
  --yellow:        #fbbf24;
  --red:           #ef4444;

  --text-primary:  #f0f0f8;
  --text-secondary:#a0a0b8;
  --text-muted:    #606078;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-full:   9999px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --transition:    0.2s ease;

  --font:          'Inter', system-ui, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:  var(--bg-base);
  color:       var(--text-primary);
  line-height: 1.6;
  min-height:  100vh;
}
a { color: var(--purple-light); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: monospace; background: var(--bg-input); padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.85em; word-break: break-all; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container        { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width:  720px; margin: 0 auto; padding: 0 24px; }
.section          { padding: 72px 0; }
.section-dark     { background: var(--bg-card); }

/* ─── Navbar ──────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-container {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  height: 60px;
}
.nav-logo { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; flex: 1; }
.nav-links a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--transition); }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.wallet-area { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Wallet connect button */
.btn-wallet {
  background: var(--purple); color: #fff; border: none; cursor: pointer;
  padding: 8px 18px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600;
  transition: background var(--transition);
}
.btn-wallet:hover   { background: var(--purple-light); }
.btn-wallet.connected { background: var(--bg-input); color: var(--green); border: 1px solid var(--green); }

/* Wallet indicator dot */
.wallet-indicator { width: 8px; height: 8px; border-radius: 50%; transition: background var(--transition); }
.wallet-indicator.connected    { background: var(--green); box-shadow: 0 0 6px var(--green); }
.wallet-indicator.disconnected { background: var(--text-muted); }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition); text-decoration: none;
}
.btn-primary  { background: var(--purple);  color: #fff; }
.btn-primary:hover  { background: var(--purple-light); text-decoration: none; }
.btn-outline  { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-outline:hover  { border-color: var(--purple); color: var(--purple-light); text-decoration: none; }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm       { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg       { padding: 14px 32px; font-size: 1rem; }
.btn-full     { width: 100%; justify-content: center; }
.btn-link     { background: none; border: none; color: var(--purple-light); cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; }
.btn-copy     { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary); padding: 3px 8px; border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; }
.btn-copy:hover { border-color: var(--purple); color: var(--purple-light); }

/* ─── Hero ────────────────────────────────────────────────────── */
.hero { padding: 100px 24px 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(153,69,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block; background: rgba(153,69,255,0.15); color: var(--purple-light);
  border: 1px solid rgba(153,69,255,0.3); padding: 4px 14px; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 24px;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.hero-sub   { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 36px; }
.hero-cta   { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.network-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }

/* Dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── Features ────────────────────────────────────────────────── */
.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 48px; font-weight: 700; }
.feature-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.feature-card  {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: var(--purple); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.feature-card p  { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

/* ─── How It Works ────────────────────────────────────────────── */
.steps { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; justify-content: center; }
.step  { flex: 1; min-width: 160px; max-width: 220px; text-align: center; padding: 16px; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.step h4 { margin-bottom: 8px; }
.step p  { font-size: 0.85rem; color: var(--text-secondary); }
.step-arrow { color: var(--text-muted); font-size: 1.5rem; padding-top: 28px; }

/* ─── Wallet Info Card ────────────────────────────────────────── */
.wallet-info-card {
  max-width: 480px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.wi-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; }
.wi-body   { padding: 16px 20px; }
.wi-row    { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 12px; }
.wi-row span { color: var(--text-secondary); font-size: 0.9rem; flex-shrink: 0; }
.wi-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 12px; }

/* ─── Page Hero (inner pages) ─────────────────────────────────── */
.page-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--border); }
.page-hero .container h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero .container p  { color: var(--text-secondary); }

/* ─── Form Card ───────────────────────────────────────────────── */
.form-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; margin-top: 36px; box-shadow: var(--shadow-card);
}
.form-title         { font-size: 1.4rem; margin-bottom: 28px; }
.form-section       { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: none; }
.form-section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 20px; }
.form-row           { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group         { display: flex; flex-direction: column; gap: 6px; }
.form-group label   { font-size: 0.9rem; font-weight: 500; }
.form-control {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); padding: 10px 14px; font-size: 0.95rem; font-family: var(--font);
  transition: border-color var(--transition); width: 100%;
}
.form-control:focus  { outline: none; border-color: var(--border-focus); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; }
.hint       { font-size: 0.8rem; color: var(--text-muted); }
.hint-block { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }

/* ─── Wallet Guard ────────────────────────────────────────────── */
.wallet-guard { display: flex; justify-content: center; padding: 64px 0; }
.guard-inner  { text-align: center; max-width: 380px; }
.guard-icon   { font-size: 3rem; margin-bottom: 16px; }
.guard-inner h3 { margin-bottom: 10px; }
.guard-inner p  { color: var(--text-secondary); margin-bottom: 24px; }

/* ─── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: border-color var(--transition);
}
.upload-zone.drag-over { border-color: var(--purple); background: rgba(153,69,255,0.05); }
.upload-placeholder    { text-align: center; }
.upload-icon           { font-size: 2rem; display: block; margin-bottom: 10px; }
.upload-preview        { display: flex; align-items: center; gap: 20px; }
.upload-preview img    { width: 80px; height: 80px; border-radius: var(--radius); object-fit: cover; }

/* ─── Toggle switches ─────────────────────────────────────────── */
.toggle-list  { display: flex; flex-direction: column; gap: 16px; }
.toggle-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  cursor: pointer; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: border-color var(--transition);
}
.toggle-row:hover { border-color: var(--purple); }
.toggle-row > div { flex: 1; }
.toggle-row strong { font-size: 0.9rem; }
.toggle-row .hint  { margin-top: 4px; }
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: relative; display: block; flex-shrink: 0;
  width: 44px; height: 24px; border-radius: var(--radius-full);
  background: var(--bg-input); border: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}
.toggle-input:checked + .toggle-slider { background: rgba(20,241,149,0.15); border-color: var(--green); }
.toggle-input:checked + .toggle-slider::after { transform: translateX(20px); background: var(--green); }

/* ─── Fee summary ─────────────────────────────────────────────── */
.fee-summary  { background: var(--bg-input); border-radius: var(--radius-lg); padding: 20px 24px; }
.fee-rows     { display: flex; flex-direction: column; gap: 10px; }
.fee-row      { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-secondary); }
.fee-total    { padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-primary); font-weight: 700; font-size: 1rem; }

/* ─── Form actions ────────────────────────────────────────────── */
.form-actions { margin-top: 28px; }
.btn-icon     { font-size: 1.1rem; }

/* ─── TX Status ───────────────────────────────────────────────── */
.tx-status { margin-top: 24px; background: var(--bg-input); border-radius: var(--radius-lg); padding: 20px; }
.tx-status-inner { display: flex; align-items: center; gap: 14px; }
.tx-spinner {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--border); border-top-color: var(--purple);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TX Result ───────────────────────────────────────────────── */
.tx-result {
  margin-top: 24px; background: rgba(20,241,149,0.07);
  border: 1px solid rgba(20,241,149,0.2); border-radius: var(--radius-lg); padding: 24px;
}
.result-icon { font-size: 2rem; margin-bottom: 10px; }
.tx-result h3 { margin-bottom: 16px; color: var(--green); }
.result-row   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 0.9rem; }
.result-row span { color: var(--text-secondary); flex-shrink: 0; }

/* ─── Toast ───────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 260px; max-width: 380px; padding: 12px 18px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow-card);
  opacity: 0; transform: translateX(40px); transition: opacity 0.25s, transform 0.25s;
}
.toast-visible         { opacity: 1; transform: translateX(0); }
.toast-success { background: rgba(20,241,149,0.15); border: 1px solid var(--green);  color: var(--green); }
.toast-error   { background: rgba(239,68,68,0.15);  border: 1px solid var(--red);    color: var(--red); }
.toast-warning { background: rgba(251,191,36,0.15); border: 1px solid var(--yellow); color: var(--yellow); }
.toast-info    { background: rgba(153,69,255,0.15); border: 1px solid var(--purple); color: var(--purple-light); }

/* ─── Badge ───────────────────────────────────────────────────── */
.badge-network { background: rgba(153,69,255,0.15); color: var(--purple-light); padding: 2px 10px; border-radius: var(--radius-full); font-size: 0.8rem; }

/* ─── Footer ──────────────────────────────────────────────────── */
.footer       { border-top: 1px solid var(--border); padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; gap: 10px; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .form-row  { grid-template-columns: 1fr; }
  .steps     { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
  .form-card { padding: 22px 16px; }
  .wi-footer { flex-direction: column; }
}
