/* HATCH20 - shared stylesheet
   Dark / neon BSC vibe with hatch-egg motif.
   Mobile-first, no framework. */

:root {
  --bg:        #07090d;
  --bg-2:      #0d1117;
  --panel:     #11161f;
  --panel-2:   #161c28;
  --line:      #1f2735;
  --line-2:    #2a3344;
  --ink:       #e8edf5;
  --ink-soft:  #8a93a6;
  --ink-faint: #59617a;
  --gold:      #f0b90b;        /* binance yellow */
  --gold-2:    #ffd34a;
  --green:     #1ef27a;
  --red:       #ff4d6d;
  --magenta:   #ff3da3;
  --cyan:      #2de8ff;
  --shadow:    0 6px 24px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body {
  background:
    radial-gradient(ellipse at top, rgba(240,185,11,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(30,242,122,0.03) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
code, .mono { font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace; font-size: 13px; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ====== nav ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  font-family: 'Bowlby One', system-ui;
  font-size: 22px; letter-spacing: 0.5px;
  color: var(--gold);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand .crack { color: var(--ink); }
.brand .egg {
  display: inline-block;
  width: 20px; height: 24px;
  background: var(--gold); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  box-shadow: 0 0 18px rgba(240,185,11,0.5);
}
.brand .egg::after {
  content: ''; position: absolute; top: 12px; left: 4px;
  width: 12px; height: 2px; background: var(--bg);
  clip-path: polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0);
}
.nav-links {
  margin-left: auto;
  display: flex; gap: 22px; align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: color .12s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--gold); color: #07090d;
  padding: 9px 18px; border-radius: 8px; font-weight: 700;
  border: 0; cursor: pointer; font-size: 14px;
  transition: transform .08s, box-shadow .08s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,185,11,0.3); }

/* ====== layout ====== */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 24px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-family: 'Bowlby One'; font-size: 28px; font-weight: 700; }
.section-head .desc { color: var(--ink-soft); font-size: 14px; max-width: 50ch; }
.section-head .right { margin-left: auto; }

/* ====== buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px;
  border: 0; border-radius: 8px;
  font-family: 'Inter'; font-size: 14px; font-weight: 700; letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .12s;
  text-decoration: none;
}
.btn-primary { background: var(--gold); color: #07090d; }
.btn-primary:hover { background: var(--gold-2); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,185,11,0.3); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--panel); border-color: var(--ink-soft); }
.btn-green { background: var(--green); color: #07090d; }
.btn-red { background: var(--red); color: white; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ====== panels / cards ====== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  transition: border-color .12s, transform .12s;
}
.card:hover { border-color: var(--line-2); }
.card.linkable { cursor: pointer; }
.card.linkable:hover { border-color: var(--gold); transform: translateY(-2px); }

/* ====== inputs ====== */
label.field { display: block; }
label.field > .lbl {
  display: block; font-size: 12px; letter-spacing: 0.5px;
  color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; font-weight: 600;
}
label.field > .help { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit; font-size: 14px;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,185,11,0.12);
}
.input.mono { font-family: 'JetBrains Mono', monospace; }
.textarea { resize: vertical; min-height: 80px; }

/* ====== chip / pill / status ====== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(240,185,11,0.10); color: var(--gold);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(240,185,11,0.25);
}
.chip-green { background: rgba(30,242,122,0.10); color: var(--green); border-color: rgba(30,242,122,0.3); }
.chip-red   { background: rgba(255,77,109,0.10); color: var(--red); border-color: rgba(255,77,109,0.3); }
.chip-bsc   { background: rgba(240,185,11,0.08); color: var(--gold-2); border-color: rgba(240,185,11,0.2); }

/* ====== hero (home) ====== */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}
.hero h1 {
  font-family: 'Bowlby One'; font-size: clamp(44px, 8vw, 88px);
  line-height: 0.95; letter-spacing: -0.5px;
  color: var(--ink);
}
.hero h1 .pop {
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 32px rgba(240,185,11,0.3));
}
.hero p.lead {
  font-size: 17px; color: var(--ink-soft);
  max-width: 60ch; margin: 24px auto 0;
}
.hero .cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1080px; margin: 56px auto 0; gap: 14px;
}
.hero-stats .s {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.hero-stats .s .l { font-size: 11px; letter-spacing: 1px; color: var(--ink-soft); text-transform: uppercase; }
.hero-stats .s .v { font-family: 'Bowlby One'; font-size: 24px; margin-top: 6px; color: var(--gold); }
@media (max-width: 740px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ====== coin grid (home + browse) ====== */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.coin-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
  text-decoration: none; color: var(--ink);
  display: block; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.coin-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.coin-card .head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.coin-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: #07090d;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bowlby One'; font-size: 16px; font-weight: 700;
  flex-shrink: 0;
  background-size: cover; background-position: center;
}
.coin-card .name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.coin-card .sym { color: var(--ink-soft); font-family: 'JetBrains Mono'; font-size: 12px; margin-top: 2px; }
.coin-card .tag { color: var(--ink-faint); font-size: 11px; }
.coin-card .desc { color: var(--ink-soft); font-size: 13px; line-height: 1.5; min-height: 38px; margin: 8px 0; }
.coin-card .stats {
  display: flex; gap: 10px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft);
}
.coin-card .stats > div { flex: 1; }
.coin-card .stats .v { color: var(--ink); font-weight: 600; font-family: 'JetBrains Mono'; }

/* ====== form ====== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 740px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { margin-top: 14px; }
.form-row:first-child { margin-top: 0; }

.toggle-row {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; cursor: pointer;
  user-select: none;
}
.toggle-row .switch {
  width: 38px; height: 22px; border-radius: 99px;
  background: var(--line-2); position: relative; transition: background .12s;
}
.toggle-row .switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); transition: left .12s;
}
.toggle-row.on .switch { background: var(--gold); }
.toggle-row.on .switch::after { left: 19px; background: #07090d; }

.split-row {
  display: grid; grid-template-columns: 1fr 100px 32px;
  gap: 8px; margin-top: 8px;
}

/* ====== preview card ====== */
.preview-shell {
  position: sticky; top: 88px;
}
.preview-shell h3 { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }

/* ====== footer ====== */
.ftr {
  margin-top: 64px; padding: 32px 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 13px;
}
.ftr-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap;
}
.ftr a { color: var(--gold); text-decoration: none; }
.ftr a:hover { color: var(--gold-2); }

/* ====== toast ====== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--gold); color: var(--gold);
  padding: 14px 22px; border-radius: 99px;
  font-family: 'JetBrains Mono'; font-size: 13px;
  display: none; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { display: block; }
.toast.error { color: var(--red); border-color: var(--red); }
.toast.ok { color: var(--green); border-color: var(--green); }

/* ====== utility ====== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 18px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 28px; }
.mt-6 { margin-top: 56px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hide-mobile { }
@media (max-width: 740px) { .hide-mobile { display: none; } }

/* progress bar */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div {
  height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .3s ease;
}

/* table */
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
table.t th { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
table.t tr:hover td { background: rgba(240,185,11,0.03); }
