:root {
  --bg-1: #000000;
  --bg-2: #000000;
  --line: rgba(165, 131, 255, 0.24);
  --text: #f0f1ff;
  --muted: #b4b2d8;
  --pulse-a: #622dff;
  --pulse-b: #cb95ff;
  --up: #53ffac;
  --down: #ff213f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 22% -8%, rgba(104, 63, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 0%, rgba(180, 132, 255, 0.08), transparent 22%),
    #000000;
  min-height: 100vh;
}

.layout {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 14px 14px 22px;
}

.hero-min {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 2px 4px;
}

.brand-title {
  margin: 0;
  font-size: 33px;
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--pulse-a), #9d63ff 48%, var(--pulse-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(128, 82, 255, 0.28), 0 0 38px rgba(122, 64, 255, 0.2);
}

.brand-sub {
  margin: 0;
  color: #a7a9c7;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", "SF Mono", "Menlo", monospace;
}

.market-line {
  margin: 0;
  font-size: 12px;
  color: #b8b8d0;
  font-family: "IBM Plex Mono", "SF Mono", "Menlo", monospace;
  letter-spacing: 0.04em;
}

.market-line.up {
  color: var(--up);
  text-shadow: 0 0 10px rgba(76, 255, 177, 0.36);
}

.market-line.down {
  color: var(--down);
  text-shadow: 0 0 12px rgba(255, 46, 82, 0.5);
}

.section-head {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  min-height: 1px;
}

.status {
  border: 1px solid rgba(158, 121, 255, 0.28);
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
  color: var(--muted);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(12, 10, 24, 0.7);
  font-family: "IBM Plex Mono", "SF Mono", "Menlo", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8990b2;
  box-shadow: 0 0 0 rgba(147, 108, 255, 0);
}

.status[data-state="live"] .status-dot {
  background: #8a5dff;
  animation: live-pulse 1.6s infinite;
}

.status[data-state="syncing"] .status-dot {
  background: #b58bff;
}

.status[data-state="degraded"] .status-dot {
  background: #ff334d;
}

.table-wrap {
  margin-top: 4px;
  overflow: auto;
  background: transparent;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 2px;
  min-width: 1160px;
  background: transparent;
}

thead th {
  text-align: left;
  font-size: 11px;
  color: #9da0c4;
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: "IBM Plex Mono", "SF Mono", "Menlo", monospace;
}

tbody td {
  padding: 9px 10px;
  border-bottom: none;
  font-size: 14px;
  vertical-align: middle;
  background: transparent;
  transition: background-color 0.22s ease, transform 0.22s ease;
  position: relative;
}

.fav-head {
  width: 34px;
}

tbody tr {
  transition: filter 0.2s ease;
}

tbody tr:hover {
  filter: brightness(1.08);
}

tbody tr:hover td {
  background: rgba(126, 94, 255, 0.14);
}

tbody tr:hover td.fav-cell {
  background: transparent;
}

tbody tr:hover td.rank-cell {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

tbody tr:hover td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

tbody tr:hover td.rank-cell::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ac7cff, #7140ff);
  box-shadow: 0 0 11px rgba(156, 112, 255, 0.72);
}

tbody tr.row-updated td {
  animation: row-tick 0.45s ease-out;
}

tbody tr.row-updated td.fav-cell {
  animation: none;
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.name {
  font-weight: 640;
  font-size: 15px;
  line-height: 1.1;
}

.ticker {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.price {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(173, 145, 255, 0.22);
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

.price.price-tick-up {
  animation: price-up 0.5s ease-out;
}

.price.price-tick-down {
  animation: price-down 0.5s ease-out;
}

.change {
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
}

.change.up {
  color: var(--up);
  text-shadow: 0 0 8px rgba(83, 255, 172, 0.42);
}

.change.down {
  color: var(--down);
  text-shadow: 0 0 10px rgba(255, 33, 63, 0.56);
}

.js-mcap {
  color: rgba(240, 241, 255, 0.95);
}

.js-fdv {
  color: rgba(240, 241, 255, 0.78);
}

.js-vol {
  color: rgba(240, 241, 255, 0.62);
}

.fav-cell {
  width: 34px;
  padding-right: 4px;
}

.fav-btn {
  border: none;
  background: transparent;
  color: rgba(196, 175, 255, 0.4);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.fav-btn:hover {
  color: #b983ff;
  text-shadow: 0 0 10px rgba(183, 131, 255, 0.5);
  transform: scale(1.08);
}

.fav-btn.active {
  color: #9f65ff;
  text-shadow: 0 0 12px rgba(169, 108, 255, 0.65);
}

.spark {
  width: 128px;
  height: 38px;
  opacity: 0;
  animation: spark-fade 0.35s ease-out forwards;
}

.spark-path {
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: spark-draw 0.9s ease-out forwards;
}

.spark-path-glow {
  opacity: 0.45;
  stroke-width: 2.8;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: none;
}

@keyframes spark-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes spark-fade {
  to {
    opacity: 1;
  }
}

@keyframes row-tick {
  0% {
    background: rgba(151, 109, 255, 0.22);
  }
  100% {
    background: transparent;
  }
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(147, 108, 255, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(147, 108, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(147, 108, 255, 0);
  }
}

@keyframes price-up {
  0% {
    color: #c8ffea;
    text-shadow: 0 0 14px rgba(97, 255, 184, 0.52);
  }
  100% {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(173, 145, 255, 0.22);
  }
}

@keyframes price-down {
  0% {
    color: #ffb2bd;
    text-shadow: 0 0 14px rgba(255, 33, 63, 0.66);
  }
  100% {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(173, 145, 255, 0.22);
  }
}

@media (min-width: 900px) {
  .layout {
    padding: 16px 18px 26px;
  }
}
