/* NowMeta app — one shell, many tabs. Inherits the site's deep-space look. */
:root {
  --bg: #050614; --bg-2: #0a0c22;
  --ink: #ffffff; --ink-2: #c9cdea; --ink-3: #8f95bd;
  --line: rgba(255,255,255,.1);
  --glass: rgba(255,255,255,.045);
  --glass-2: rgba(255,255,255,.08);
  --red: #ee1c25; --hot: #ff3d71; --violet: #8b6cff;
  --blue: #3d7bff; --cyan: #2fe6d6; --gold: #ffc94a; --green: #2fe68a;
  --grad: linear-gradient(100deg,#ffd166 0%,#ff5d8f 30%,#a66bff 62%,#35d8ff 100%);
  --grad-btn: linear-gradient(120deg,#ff2d55 0%,#ff5d8f 38%,#a66bff 100%);
  --r-lg: 26px; --r-md: 18px; --r-sm: 12px;
  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden;
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

/* aurora backdrop */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% -10%, #171a52 0%, transparent 60%), var(--bg); }
.sky i { position: absolute; border-radius: 50%; }
.sky .a { width: 1000px; height: 1000px; left: -380px; top: -300px; background: radial-gradient(closest-side, rgba(255,45,85,.34), transparent); animation: drift 24s ease-in-out infinite alternate; }
.sky .b { width: 1200px; height: 1200px; right: -480px; top: -140px; background: radial-gradient(closest-side, rgba(61,91,255,.44), transparent); animation: drift 30s ease-in-out infinite alternate-reverse; }
.sky .c { width: 900px; height: 900px; left: 24%; top: 40%; background: radial-gradient(closest-side, rgba(139,61,255,.36), transparent); animation: drift 27s ease-in-out infinite alternate; }
.sky .d { width: 780px; height: 780px; right: -140px; bottom: -340px; background: radial-gradient(closest-side, rgba(47,230,214,.2), transparent); animation: drift 32s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(60px,-44px,0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .sky i { animation: none; } }

/* ---------------- header ---------------- */
.top { position: sticky; top: 0; z-index: 60; backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(5,6,20,.72); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; font-weight: 600; }
.logo img { height: 32px; width: auto; }
.top .spacer { margin-inline: auto; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(47,230,138,.18); }
.dot.off { background: var(--hot); box-shadow: 0 0 0 4px rgba(255,61,113,.18); }

/* network switch */
.netsw { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); flex: none; }
.netsw button { padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-3);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: .18s; }
.netsw button[aria-pressed="true"] { background: var(--grad-cool, linear-gradient(120deg,#3340ee,#5b66ff 50%,#2fa4f0)); color: #fff; }
.netsw button:not([aria-pressed="true"]):hover { color: #fff; background: var(--glass-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600;
  font-size: 15px; cursor: pointer; transition: transform .16s, filter .16s, background .16s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--grad-btn); color: #fff; box-shadow: 0 10px 30px -12px rgba(255,45,85,.6); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--glass); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--glass-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn.block { width: 100%; padding: 16px 20px; font-size: 17px; border-radius: var(--r-md); }

/* ---------------- tab rail ---------------- */
.rail { position: sticky; top: 68px; z-index: 55; background: rgba(5,6,20,.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.rail .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; }
.rail .wrap::-webkit-scrollbar { display: none; }
.rail button { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-3);
  font-size: 15px; font-weight: 500; cursor: pointer; transition: .18s; }
.rail button:hover { color: #fff; background: var(--glass); }
.rail button[aria-selected="true"] { color: #fff; background: var(--glass-2); border-color: var(--line); }
.rail button svg { width: 17px; height: 17px; flex: none; }

/* ---------------- panels ---------------- */
main { padding: 30px 0 90px; }
.panel[hidden] { display: none; }
.panel-head { margin-bottom: 22px; }
.panel-head h1 { font-size: clamp(28px, 4vw, 40px); }
.panel-head p { color: var(--ink-2); margin-top: 8px; max-width: 70ch; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card.tight { padding: 18px; border-radius: var(--r-md); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }

.stat { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.stat .k { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin-top: 6px; font-family: var(--mono); }
.stat .s { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* ---------------- the swap card ---------------- */
.swap-shell { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .swap-shell { grid-template-columns: minmax(0, 1fr); } }

.swapcard { position: relative; min-width: 0; padding: 20px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); }
.swapcard::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-composite: exclude; opacity: .34; pointer-events: none; }

.leg { background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.leg + .leg { margin-top: 6px; }
.leg .lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); }
.leg .lbl button { background: none; border: 0; color: var(--cyan); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.leg .mid { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-width: 0; }
.leg input { flex: 1; min-width: 0; background: none; border: 0; font-size: 30px; font-weight: 600;
  font-family: var(--mono); padding: 0; }
.leg input::placeholder { color: rgba(255,255,255,.22); }
.leg input:focus { outline: none; }
.leg .out { flex: 1; min-width: 0; font-size: 30px; font-weight: 600; font-family: var(--mono); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg .out.dim { color: rgba(255,255,255,.22); }

.pick { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 12px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--line); font-weight: 600; cursor: pointer; }
.pick:hover { background: rgba(255,255,255,.14); }
.pick .sym { font-size: 16px; }
.pick select { background: none; border: 0; font-weight: 600; cursor: pointer; max-width: 150px; }
.pick select option { background: #0a0c22; color: #fff; }

.flip { display: grid; place-items: center; margin: -13px 0; position: relative; z-index: 2; }
.flip button { width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--line);
  background: #0d1030; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: .2s; }
.flip button:hover { background: #151a46; transform: rotate(180deg); }

.facts { margin-top: 14px; display: grid; gap: 7px; font-size: 14px; }
.facts .f { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-3); }
.facts .f b { color: var(--ink-2); font-weight: 500; font-family: var(--mono); text-align: right; overflow-wrap: anywhere; min-width: 0; }
.facts .f.warn b { color: var(--gold); }
.facts .f.bad b { color: var(--hot); }

.slip { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.slip span { font-size: 13px; color: var(--ink-3); margin-right: 2px; }
.slip button { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  font-size: 13px; cursor: pointer; color: var(--ink-2); }
.slip button[aria-pressed="true"] { background: var(--glass-2); color: #fff; border-color: rgba(255,255,255,.3); }

.note { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); }
.note.ok { border-color: rgba(47,230,138,.35); background: rgba(47,230,138,.08); }
.note.bad { border-color: rgba(255,61,113,.4); background: rgba(255,61,113,.09); }
.note.work { border-color: rgba(47,230,214,.35); background: rgba(47,230,214,.07); }
.note a { color: var(--cyan); text-decoration: underline; }

/* ---------------- lists / tables ---------------- */
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); }
.item:hover { background: var(--glass-2); }
.item .t { font-weight: 600; }
.item .sub { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: rgba(0,0,0,.3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: rgba(47,230,214,.6); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.field select option { background: #0a0c22; }

.frame { width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #000; overflow: hidden; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 200% 100%; animation: shine 1.4s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); }
.pill.good { color: var(--green); border-color: rgba(47,230,138,.35); }
.pill.warn { color: var(--gold); border-color: rgba(255,201,74,.35); }
.pill.hot { color: var(--hot); border-color: rgba(255,61,113,.35); }

footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

@media (max-width: 700px) {
  .top .wrap { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .top .spacer { display: none; }
  .leg input, .leg .out { font-size: 24px; }
}

/* ---------------- price chart ---------------- */
.chart-wrap { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px 10px; }
.chart-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.chart-bar button { padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 600; cursor: pointer; transition: .18s; }
.chart-bar button:hover { color: #fff; background: var(--glass); }
.chart-bar button[aria-pressed="true"] { color: #fff; background: var(--glass-2); border-color: rgba(255,255,255,.28); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.chart-price { font-size: 26px; font-weight: 600; line-height: 1.1; }
.chart-chg.up { color: var(--green); }
.chart-chg.dn { color: var(--hot); }
.chart-svg { width: 100%; height: 300px; display: block; overflow: visible; }
.chart-svg .g { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.chart-svg .ax { fill: var(--ink-3); font-size: 11px; font-family: var(--mono); }
.chart-svg .ax.mid { text-anchor: middle; }
.chart-svg .wk { stroke-width: 1.2; }
.chart-svg .wk.up, .chart-svg .bd.up { stroke: var(--green); fill: var(--green); }
.chart-svg .wk.dn, .chart-svg .bd.dn { stroke: var(--hot); fill: var(--hot); }
.chart-svg .vl { opacity: .3; }
.chart-svg .vl.up { fill: var(--green); }
.chart-svg .vl.dn { fill: var(--hot); }
.chart-empty { display: grid; place-items: center; height: 240px; border: 1px dashed var(--line); border-radius: 14px; }
