:root {
  --bg: #050807;
  --panel: rgba(17, 22, 20, 0.88);
  --panel-strong: rgba(26, 32, 29, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f8f5;
  --muted: #adc0b5;
  --green: #15e86f;
  --red: #ff4d4d;
  --yellow: #f7d84a;
  --blue: #3f8dff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 20%, rgba(21, 232, 111, 0.16), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(247, 216, 74, 0.14), transparent 25%),
    linear-gradient(135deg, #020403 0%, #0b1410 52%, #160e08 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(74, 74, 74, 0.76), rgba(20, 20, 20, 0.9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand-b {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.blue {
  color: var(--blue);
}

.green {
  color: #32c56b;
}

.yellow {
  color: var(--yellow);
}

.brand-pill,
.contact-link,
.primary-button,
.status-dot {
  letter-spacing: 0;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
}

.brand-pill {
  padding: 8px 12px;
  border: 1px solid rgba(21, 232, 111, 0.55);
  color: #b7ffd1;
  background: rgba(21, 232, 111, 0.12);
}

.contact-link,
.primary-button {
  padding: 12px 16px;
  border: 1px solid rgba(247, 216, 74, 0.65);
  text-decoration: none;
  background: rgba(247, 216, 74, 0.1);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

#asset-search {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.48);
  font: inherit;
  font-weight: 700;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.filter-pill {
  flex: 0 0 auto;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(75, 75, 75, 0.86), rgba(29, 29, 29, 0.92));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.filter-pill.active {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(21, 232, 111, 0.22);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.hero-copy,
.status-panel article,
.radar-shell,
.quote-list-shell,
.cards article {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.hero-copy {
  padding: clamp(24px, 4vw, 46px);
}

.eyebrow,
.cards p {
  margin: 0 0 10px;
  color: #91ffb8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.primary-button {
  border-color: rgba(21, 232, 111, 0.75);
  background: rgba(21, 232, 111, 0.15);
}

.status-dot {
  color: var(--yellow);
}

.quote-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.quote-badges span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-weight: 900;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.status-panel article {
  padding: 20px;
}

.status-panel p {
  margin: 0 0 8px;
  color: #91ffb8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-panel strong {
  display: block;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
}

.status-panel span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.good {
  color: #76ff9c;
}

.bad {
  color: #ff7777;
}

.radar-shell {
  margin-top: 14px;
  overflow: hidden;
}

.bubble-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
  justify-items: center;
  min-height: 520px;
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(14, 35, 23, 0.82), rgba(12, 14, 13, 0.95));
  background-size: 52px 52px, 52px 52px, auto;
}

.market-bubble {
  position: relative;
  display: grid;
  place-content: center;
  gap: 3px;
  width: min(var(--size), 190px);
  height: min(var(--size), 190px);
  min-width: 108px;
  min-height: 108px;
  padding: 16px;
  border-radius: 999px;
  border: 2px solid var(--green);
  text-align: center;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.85), transparent 10%),
    radial-gradient(circle, rgba(21, 232, 111, 0.28), rgba(1, 20, 8, 0.95) 67%);
  box-shadow: 0 0 34px rgba(21, 232, 111, 0.65), inset 0 -14px 30px rgba(0, 0, 0, 0.42);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  animation: floatBubble 9s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: transform 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.market-bubble:hover {
  filter: saturate(1.18) brightness(1.08);
  transform: translate3d(0, -6px, 0) scale(1.03);
}

.market-bubble.negative {
  border-color: #ff2222;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.82), transparent 10%),
    radial-gradient(circle, rgba(255, 45, 45, 0.25), rgba(25, 3, 3, 0.95) 67%);
  box-shadow: 0 0 34px rgba(255, 0, 0, 0.55), inset 0 -14px 30px rgba(0, 0, 0, 0.42);
}

.asset-type,
.market-bubble small {
  color: #d9ffe4;
  font-weight: 900;
  font-size: 0.72rem;
}

.market-bubble strong {
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  line-height: 1;
}

.market-bubble em {
  font-style: normal;
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
  font-weight: 950;
  line-height: 1;
}

.market-bubble small {
  color: var(--yellow);
  line-height: 1;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
}

.section-title {
  padding: 22px 22px 0;
}

.section-title h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.quote-list-shell {
  margin-top: 14px;
  overflow: hidden;
}

.quote-list {
  display: grid;
  gap: 1px;
}

.quote-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 110px 160px 110px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 16px 22px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.quote-row:hover {
  background: rgba(21, 232, 111, 0.08);
}

.quote-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.cards article {
  padding: 22px;
}

.cards h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.cards span {
  color: var(--muted);
  line-height: 1.45;
}

.asset-modal[hidden] {
  display: none;
}

.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.asset-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(21, 232, 111, 0.18), transparent 25%),
    linear-gradient(180deg, rgba(58, 62, 58, 0.98), rgba(15, 18, 16, 0.98));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  font: inherit;
  font-size: 1.45rem;
  font-weight: 900;
  cursor: pointer;
}

.modal-heading {
  padding-right: 56px;
}

.modal-heading h2 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.modal-heading span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.modal-metrics article,
.chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.36);
}

.modal-metrics article {
  padding: 16px;
}

.modal-metrics p {
  margin: 0 0 8px;
  color: #91ffb8;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-metrics strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 1;
}

.chart-card {
  margin-top: 14px;
  padding: 14px;
}

#asset-chart {
  display: block;
  width: 100%;
  height: 320px;
}

#asset-history-status,
.modal-disclaimer {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.modal-disclaimer {
  font-size: 0.92rem;
}

@keyframes floatBubble {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -8px, 0);
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 18px, 680px);
    padding-top: 10px;
  }

  .hero,
  .cards,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  .modal-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .bubble-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 480px;
    padding: 24px 14px;
  }

  .market-bubble {
    width: min(var(--size), 144px);
    height: min(var(--size), 144px);
  }

  .quote-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #asset-chart {
    height: 260px;
  }
}

@media (max-width: 460px) {
  .brand {
    font-size: 1.95rem;
  }

  .bubble-board {
    grid-template-columns: 1fr;
  }

  .market-bubble {
    width: 152px;
    height: 152px;
  }

  .asset-modal {
    padding: 10px;
  }

  .asset-dialog {
    max-height: 92vh;
    border-radius: 22px;
  }

  .modal-metrics {
    grid-template-columns: 1fr;
  }

  .modal-heading h2 {
    font-size: 2.8rem;
  }
}
