/* Launchpad — dark, glassy, light on motion. No web fonts, no libraries: everything below is CSS.
   Animations only move transform/opacity/background-position and all stop under prefers-reduced-motion.
   Coin page parts re-render every 6 s, so entrance animations live only on the home grid, hero and modals. */
:root {
  --bg: #07080d; --card: rgba(22,25,36,.72); --card-solid: #151824; --card2: #1c2030; --ink: #f4f5f8;
  --ink2: #b6bbca; --muted: #7c8296; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.16);
  --accent: #e84142; --accent2: #ff6b5e; --good: #22c55e; --bad: #f05252; --warn: #f5b301;
  --grad: linear-gradient(120deg, #ff6b5e 0%, #e84142 35%, #b14bf4 70%, #6d7cff 100%);
  --radius: 16px; --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(232,65,66,.4); }

/* ── background: two slow-drifting colour fields + a faint grid ───────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.aurora::before { top: -35vmax; left: -20vmax; background: radial-gradient(closest-side, rgba(232,65,66,.22), transparent 70%);
  animation: drift1 26s ease-in-out infinite alternate; }
.aurora::after { bottom: -40vmax; right: -25vmax; background: radial-gradient(closest-side, rgba(124,92,255,.2), transparent 70%);
  animation: drift2 32s ease-in-out infinite alternate; }
.aurora i { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px),
  linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(1.15); } }

/* ── chrome ───────────────────────────────────────────────────────────────────────────────────────────── */
.testnet { background: linear-gradient(90deg, rgba(245,179,1,.14), rgba(245,179,1,.06)); color: #ffd36a; text-align: center;
  font-size: 13px; padding: 7px 16px; border-bottom: 1px solid rgba(245,179,1,.18); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(7,8,13,.7);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand:hover .logo { transform: rotate(-12deg) scale(1.06); }
.logo { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 6px 20px -6px rgba(232,65,66,.7); transition: transform .35s var(--ease); }
.logo::before { content: ""; width: 14px; height: 14px; background: #fff;
  clip-path: polygon(50% 0, 100% 100%, 68% 100%, 50% 64%, 32% 100%, 0 100%); }
nav { display: flex; gap: 8px; }
.btn { position: relative; overflow: hidden; background: var(--grad); background-size: 140% 100%; color: #fff; border: 0;
  border-radius: 12px; padding: 9px 15px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 24px -10px rgba(232,65,66,.75), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .15s var(--ease), box-shadow .2s, background-position .4s; }
.btn::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-150%) skewX(-20deg); }
.btn:hover { background-position: 100% 0; text-decoration: none; box-shadow: 0 10px 30px -10px rgba(232,65,66,.95), inset 0 1px 0 rgba(255,255,255,.25); }
.btn:hover::after { animation: shine .7s var(--ease); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: rgba(255,255,255,.03); border: 1px solid var(--line2); color: var(--ink); box-shadow: none; }
.btn.ghost:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.07); }
.btn.full { width: 100%; padding: 13px; font-size: 15px; }
@keyframes shine { to { transform: translateX(350%) skewX(-20deg); } }
main { max-width: 1160px; margin: 0 auto; padding: 22px 16px 48px; }
main.in { animation: viewIn .35s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ── home hero ────────────────────────────────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 34px 0 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink2);
  border: 1px solid var(--line2); background: rgba(255,255,255,.04); padding: 5px 12px; border-radius: 99px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.hero h1 { font-size: clamp(30px, 5.6vw, 54px); line-height: 1.06; letter-spacing: -.03em; margin: 16px auto 12px; max-width: 760px; font-weight: 850; }
.gtext { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 8s ease-in-out infinite alternate; }
@keyframes flow { to { background-position: 100% 0; } }
.hero p { color: var(--ink2); font-size: clamp(15px, 2vw, 17px); max-width: 560px; margin: 0 auto 22px; }
.hero > * { animation: rise .6s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: .06s; } .hero > :nth-child(3) { animation-delay: .12s; }
.hero > :nth-child(4) { animation-delay: .18s; } .hero > :nth-child(5) { animation-delay: .24s; }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn { padding: 12px 20px; font-size: 15px; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 120px; }
.chip .k { color: var(--muted); font-size: 12px; }
.chip .v { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

/* ── list controls ────────────────────────────────────────────────────────────────────────────────────── */
.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; scroll-margin-top: 84px; }
.search { flex: 1; min-width: 200px; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; padding: 11px 14px 11px 38px; font-size: 15px; transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237c8296' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m14 14-3.2-3.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px 50%; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tab { background: transparent; border: 0; color: var(--ink2); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .2s, color .2s; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.tab.on { background: var(--ink); color: var(--bg); }

/* ── cards ────────────────────────────────────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
a.card { position: relative; color: var(--ink); display: block; isolation: isolate;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
a.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity .25s; z-index: -1; }
a.card:hover { text-decoration: none; transform: translateY(-3px); border-color: transparent;
  box-shadow: 0 18px 40px -18px rgba(232,65,66,.55), 0 6px 18px -10px rgba(124,92,255,.5); }
a.card:hover::before { opacity: 1; }
a.card:hover .avatar { transform: scale(1.06) rotate(-2deg); }
.grid > .card { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.coinhead { display: flex; gap: 12px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff; overflow: hidden; transition: transform .3s var(--ease);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.08); }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; border-radius: 20px; }
.cname { font-weight: 750; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.csym { color: var(--muted); font-size: 13px; }
.desc { color: var(--ink2); font-size: 13px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.stats { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); margin-top: 10px; gap: 8px; }
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.prog { position: relative; height: 8px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.prog > span { position: relative; display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--warn));
  border-radius: 99px; overflow: hidden; transform-origin: left; box-shadow: 0 0 12px rgba(245,179,1,.45); }
.prog > span::after { content: ""; position: absolute; inset: 0; width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: sweep 2.4s ease-in-out infinite; }
.grid .prog > span { animation: grow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms + .2s); }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(34,197,94,.14);
  color: var(--good); white-space: nowrap; border: 1px solid rgba(34,197,94,.3); }

/* loading skeletons */
.skel { pointer-events: none; }
.sk { background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 37%, rgba(255,255,255,.05) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ── coin page ────────────────────────────────────────────────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.kv > div { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: repeat(2, 1fr); } }
.kv .k { color: var(--muted); font-size: 12px; }
.kv .v { font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chart { margin-top: 14px; position: relative; }
.chart svg { width: 100%; height: 220px; display: block; }
.tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12px;
  padding: 2px 7px; border-radius: 6px; pointer-events: none; white-space: nowrap; display: none; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: -.01em; }
.side { position: sticky; top: 76px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; color: var(--ink2); border-radius: 9px; padding: 9px;
  font-weight: 750; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.seg button.on.buy { background: var(--good); color: #052e14; box-shadow: 0 6px 18px -8px rgba(34,197,94,.8); }
.seg button.on.sell { background: var(--bad); color: #fff; box-shadow: 0 6px 18px -8px rgba(240,82,82,.8); }
label { display: block; font-size: 13px; color: var(--ink2); margin: 12px 0 5px; font-weight: 500; }
input, textarea { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--line2); color: var(--ink); border-radius: 12px;
  padding: 10px 12px; font-size: 15px; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, .search:focus { outline: 0; border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(232,65,66,.22); }
.quick { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.quick button { background: rgba(255,255,255,.04); border: 1px solid var(--line2); color: var(--ink2); border-radius: 9px;
  padding: 5px 10px; font-size: 12px; cursor: pointer; transition: border-color .15s, color .15s, transform .15s; }
.quick button:hover { border-color: var(--accent2); color: var(--ink); }
.quick button:active { transform: scale(.95); }
.quote { font-size: 13px; color: var(--ink2); margin: 10px 0; min-height: 1.4em; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
tr:hover td { background: rgba(255,255,255,.025); }
td.r, th.r { text-align: right; }
.buy { color: var(--good); } .sell { color: var(--bad); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.addr { display: inline-flex; gap: 6px; align-items: center; }
.copy { background: none; border: 1px solid var(--line2); color: var(--ink2); border-radius: 6px; font-size: 11px; padding: 1px 6px; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--ink2); }
.form { max-width: 580px; margin: 0 auto; animation: rise .45s var(--ease) both; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px;
  max-width: 1160px; margin: 0 auto; padding: 18px 16px 30px; border-top: 1px solid var(--line); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; display: none; max-width: calc(100% - 32px); z-index: 30;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.8); animation: toastIn .3s var(--ease); }
#toast.err { background: var(--bad); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.graduated { border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.08); border-radius: 12px; padding: 12px; font-size: 14px; }
.scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .top { padding: 10px 16px; flex-wrap: wrap; row-gap: 8px; }
  nav { width: 100%; }
  nav .btn { flex: 1; text-align: center; padding: 9px 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .hero { padding: 20px 0 22px; }
  .chips { flex-wrap: nowrap; }
  .chip { min-width: 0; flex: 1; padding: 8px 10px; }
  .chip .v { font-size: 15px; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex: none; }
}
@media (max-width: 560px) {
  .brand { font-size: 17px; }
  .row2 { grid-template-columns: 1fr; }
}

.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.upl { display: flex; gap: 12px; align-items: flex-start; }
.upl input[type=file] { padding: 8px; font-size: 13px; }
.cbox { display: flex; gap: 8px; align-items: flex-end; }
.cbox textarea { flex: 1; }
.cmt { border-top: 1px solid var(--line); padding: 10px 0; }
.ctext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.warnnote { color: var(--warn); }
.modal { position: fixed; inset: 0; background: rgba(3,4,8,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; z-index: 20; overflow-y: auto; animation: fade .25s ease both; }
.modal .card { max-width: 560px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card-solid);
  animation: pop .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.terms p { color: var(--ink2); font-size: 14px; }
.chk { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; margin: 12px 0; }
.chk input { width: auto; }

.earn { color: var(--good); }
.earnbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 12px;
  border: 1px solid rgba(34,197,94,.35); background: rgba(34,197,94,.07); border-radius: 12px; }
.earnbox .k { color: var(--muted); font-size: 12px; } .earnbox .v { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
input[type=file]::file-selector-button { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid var(--line2);
  border-radius: 8px; padding: 5px 10px; margin-right: 10px; font: inherit; font-size: 13px; cursor: pointer; }
