:root {
  --bg: #041611;
  --bg-deep: #03100d;
  --panel: #08261e;
  --panel-2: #0a3025;
  --line: #15493b;
  --line-soft: rgba(75, 242, 196, 0.18);
  --text: #effff8;
  --muted: #86a99e;
  --mint: #4df0bf;
  --mint-2: #1fe5ad;
  --red: #ff5267;
  --amber: #ffc23b;
  --blue: #78b8ff;
  --silver: #cfd8d4;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(77, 240, 191, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 240, 191, 0.025) 1px, transparent 1px),
    var(--bg-deep);
  background-size: 42px 42px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: 220px minmax(240px, 430px) 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 16, 13, 0.94);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--mint);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--mint-2);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 18px rgba(77, 240, 191, 0.16);
}

.image-mark {
  overflow: hidden;
  border-color: rgba(77, 240, 191, 0.72);
  background: #001f18;
}

.brand-mark img,
.avatar.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text {
  color: var(--text);
  font-size: 15px;
  text-transform: uppercase;
}

.search {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 48, 37, 0.58);
  color: var(--muted);
}

.search input {
  min-width: 0;
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.search input::placeholder {
  color: #b4d2c8;
  opacity: 0.9;
}

.actions {
  justify-self: end;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ghost-btn,
.solid-btn,
.panel-cta {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.ghost-btn {
  color: var(--mint);
  background: rgba(10, 48, 37, 0.36);
}

.solid-btn,
.panel-cta {
  color: #02110d;
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 28px rgba(77, 240, 191, 0.22);
}

.ticker {
  height: 32px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #061d17;
}

.ticker-track {
  width: max-content;
  display: flex;
  align-items: center;
  min-height: 32px;
  animation: ticker 30s linear infinite;
}

.ticker span {
  position: relative;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding-right: 28px;
  color: #6f8981;
  font-weight: 900;
  white-space: nowrap;
}

.ticker span::after {
  content: "";
  width: 1px;
  height: 13px;
  background: var(--line);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.ticker b {
  color: #e7fff6;
}

.ticker i,
em {
  font-style: normal;
}

.up {
  color: var(--mint);
}

.down {
  color: var(--red);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.terminal {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 244px;
  gap: 14px;
  padding: 14px;
  min-height: calc(100vh - 126px);
}

.panel,
.hero,
.board {
  border: 1px solid var(--line);
  background: rgba(7, 32, 25, 0.91);
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
}

.panel-head {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-head span {
  color: var(--mint);
}

.market-list {
  display: grid;
}

.market-row,
.position-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.market-row p,
.position-row p,
.asset-name p,
.trade-list p {
  min-width: 0;
  margin: 0;
}

.market-row strong,
.position-row strong,
.asset-name strong,
.trade-list strong {
  display: block;
  color: #f3fff9;
  font-size: 14px;
  line-height: 1.05;
}

.market-row em,
.position-row em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
}

.market-row b,
.position-row b {
  font-size: 14px;
}

.coin,
.avatar,
.mini-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #041611;
  font-weight: 1000;
  text-align: center;
}

.coin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
}

.image-coin {
  background: #061d17;
  border-radius: 4px;
}

.image-coin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hype {
  background: var(--mint);
}

.eth {
  color: white;
  background: #9ba7bf;
}

.btc {
  color: white;
  background: #ff9f22;
}

.sol {
  color: white;
  background: linear-gradient(135deg, #7a5cff, #20e0b7);
}

.meme {
  color: #03100d;
  background: linear-gradient(135deg, var(--mint), var(--amber));
  font-size: 9px;
}

.doge,
.gold {
  background: var(--amber);
}

.zec {
  background: #f4b12c;
}

.pepe {
  color: white;
  background: #2e8d4b;
}

.oil {
  color: white;
  background: #d8dcd9;
}

.nvidia {
  background: #8bd80a;
}

.sp {
  color: white;
  background: #d41f36;
}

.xyz {
  color: #02110d;
  background: #6db4ff;
  font-size: 9px;
}

.panel-cta {
  width: calc(100% - 0px);
  height: 36px;
  margin-top: 10px;
}

.main-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: 146px 1fr;
  gap: 14px;
}

.hero {
  min-height: 146px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(3, 16, 13, 0.72), rgba(3, 16, 13, 0.2) 54%, rgba(3, 16, 13, 0.92)),
    repeating-linear-gradient(176deg, transparent 0 7px, rgba(77, 240, 191, 0.24) 8px, transparent 9px),
    repeating-linear-gradient(93deg, transparent 0 15px, rgba(77, 240, 191, 0.17) 16px, transparent 17px);
  transform: perspective(580px) rotateX(64deg) translateY(24px) scale(1.3);
  transform-origin: center bottom;
}

.mesh::before {
  content: "";
  position: absolute;
  inset: 10% -10% auto -10%;
  height: 70px;
  background: linear-gradient(90deg, transparent, rgba(77, 240, 191, 0.95), transparent);
  filter: blur(4px);
  transform: rotate(3deg);
  animation: wave 4.8s ease-in-out infinite alternate;
}

.mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 194, 59, 0.08), transparent 34%, rgba(120, 184, 255, 0.09));
}

@keyframes wave {
  from {
    transform: translateY(-6px) rotate(3deg);
  }
  to {
    transform: translateY(10px) rotate(-2deg);
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
}

.hero h1 {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--silver);
  font-weight: 300;
}

.hero h1::first-letter {
  color: var(--text);
}

.hero p {
  margin: 14px 0 0;
  color: #d9fff2;
  font-weight: 900;
}

.hero small {
  display: block;
  margin-top: 7px;
  color: #a4c6ba;
  font-weight: 700;
}

.contract-copy {
  width: min(100%, 620px);
  min-height: 34px;
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(77, 240, 191, 0.42);
  border-radius: 4px;
  background: rgba(3, 16, 13, 0.74);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 0 24px rgba(77, 240, 191, 0.12);
}

.contract-copy span,
.contract-copy b {
  color: var(--mint);
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
}

.contract-copy code {
  min-width: 0;
  overflow: hidden;
  color: #dffff5;
  font-family: inherit;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-copy.copied b {
  color: var(--amber);
}

.board {
  min-height: 0;
  overflow: hidden;
}

.board-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  align-items: end;
  align-self: stretch;
  gap: 18px;
}

.tabs a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  border-bottom: 2px solid transparent;
  color: #8fb4aa;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.tabs a.active {
  color: #fff;
  border-color: var(--mint);
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: end;
}

.filters span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #6d8a82;
  font-size: 11px;
  text-transform: uppercase;
}

.filters b {
  color: #abcac1;
}

.table {
  min-width: 900px;
}

.table-head,
.asset-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(210px, 1.25fr) minmax(130px, 0.65fr) minmax(180px, 0.9fr) minmax(100px, 0.45fr);
  align-items: center;
  gap: 12px;
}

.table-head {
  height: 48px;
  padding: 0 20px 0 10px;
  color: #baf3e0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.asset-row {
  min-height: 68px;
  padding: 10px 20px 10px 10px;
  border-top: 1px solid var(--line-soft);
}

.asset-row:hover {
  background: rgba(77, 240, 191, 0.035);
}

.asset-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, max-content) auto;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  text-transform: uppercase;
}

.avatar.logo {
  background: #07110e;
  color: white;
  font-size: 15px;
}

.avatar.stonks {
  color: white;
  background: linear-gradient(135deg, #23345e, #eacd48 52%, #da4b33);
}

.avatar.space {
  color: white;
  background:
    linear-gradient(155deg, transparent 0 45%, rgba(255, 255, 255, 0.8) 46% 49%, transparent 50%),
    #020506;
}

.avatar.goldbar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.65), transparent 28%),
    linear-gradient(135deg, #ffe45d, #da9707);
}

.avatar.alien {
  color: var(--mint);
  background:
    linear-gradient(135deg, rgba(77, 240, 191, 0.5), transparent 28%),
    #000a08;
}

.avatar.mim {
  color: white;
  background: linear-gradient(135deg, #1e6ff0, #ffd44a);
}

.avatar.rtx {
  background: #85da09;
}

.avatar.anon {
  color: #111;
  background: #f3f3f3;
}

.asset-name strong {
  font-size: 16px;
}

.asset-name em {
  display: block;
  margin-top: 4px;
  color: #c9f5e8;
  font-size: 12px;
  white-space: nowrap;
}

mark {
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  color: #ffe9a6;
  border: 1px solid rgba(255, 194, 59, 0.7);
  border-radius: 3px;
  background: rgba(255, 194, 59, 0.34);
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
}

.underlying {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #ecfff7;
  font-size: 13px;
  font-weight: 900;
}

.underlying b {
  color: var(--mint);
}

.asset-row > strong,
.asset-row > b {
  font-size: 16px;
}

.progress {
  width: min(100%, 172px);
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 194, 59, 0.12);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  box-shadow: 0 0 24px rgba(255, 194, 59, 0.45);
}

.side {
  display: grid;
  align-content: start;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.positions,
.trades {
  border: 1px solid var(--line);
  background: rgba(7, 32, 25, 0.91);
  box-shadow: var(--shadow);
}

.position-row {
  min-height: 66px;
}

.mini-logo {
  width: 28px;
  height: 28px;
  color: var(--text);
  background: #020907;
  border: 1px solid rgba(77, 240, 191, 0.3);
  border-radius: 4px;
  font-size: 8px;
}

.trade-list {
  max-height: calc(100vh - 274px);
  overflow: hidden;
}

.trade-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 51px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.trade-list strong {
  display: inline;
  font-size: 13px;
}

.trade-list em {
  margin-left: 4px;
  color: #6b8780;
  font-size: 11px;
}

.trade-list small {
  display: block;
  margin-top: 6px;
  color: #52746b;
}

.trade-list b {
  font-size: 14px;
}

.dock {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: #061d17;
  color: #c5ede0;
  font-size: 11px;
}

.dock a {
  color: #f0fff8;
}

.disclaimer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--line-soft);
  background: #041611;
  color: #7fa89b;
  font-size: 10px;
  line-height: 1.45;
}

.disclaimer p {
  max-width: 1160px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 1200px) {
  .terminal {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .side {
    grid-column: 1 / -1;
    grid-template-columns: 220px 1fr;
  }

  .trade-list {
    max-height: 210px;
    overflow: auto;
  }
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .actions {
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
  }

  .terminal {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .markets,
  .side {
    display: none;
  }

  .main-stage {
    grid-template-rows: auto auto;
  }

  .hero {
    min-height: 220px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .board {
    overflow-x: auto;
  }

  .board-toolbar {
    align-items: start;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .tabs {
    min-height: 38px;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
  }

  .tabs a {
    height: 32px;
    padding: 0 4px;
    font-size: 12px;
  }

  .filters {
    justify-content: start;
  }

  .dock {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    text-align: center;
  }

  .disclaimer {
    padding: 10px 12px 14px;
    font-size: 9px;
  }
}

@media (max-width: 520px) {
  .solid-btn,
  .ghost-btn {
    padding: 0 10px;
    font-size: 10px;
  }

  .hero-copy {
    padding: 18px;
  }

  .hero p,
  .hero small {
    font-size: 12px;
  }
}
