:root {
  color-scheme: dark;
  --bg: #06070a;
  --surface: #101216;
  --surface-2: #171a21;
  --line: #2a2d36;
  --text: #f4f7fb;
  --muted: #8992a3;
  --purple: #7c4dff;
  --violet: #b27cff;
  --cyan: #39d8ff;
  --green: #55e39b;
  --red: #ff6175;
  --amber: #ffc857;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(124, 77, 255, 0.12), transparent 34rem),
    radial-gradient(circle at 50% 0%, rgba(57, 216, 255, 0.1), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 7, 10, 0.86);
  backdrop-filter: blur(18px);
}

.brand,
.wallet-button,
.nav-links,
.hero-actions,
.stake-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 10px;
  background: #05070c;
  border: 1px solid rgba(124, 77, 255, 0.34);
  box-shadow: 0 0 28px rgba(124, 77, 255, 0.55);
}

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

.brand strong,
.brand small {
  display: block;
}

.brand small,
.nav-links a,
.wallet-button,
.eyebrow,
.pool-card p,
.health-metrics small,
.stat-strip small,
.panel-header small,
.rule-list small,
.stake-numbers small,
.section-title small,
.event small {
  color: var(--muted);
}

.nav-links {
  justify-content: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(124, 77, 255, 0.18);
}

.wallet-button {
  justify-self: end;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(124, 77, 255, 0.52);
  border-radius: 8px;
  background: rgba(124, 77, 255, 0.14);
  color: var(--text);
  cursor: pointer;
}

.button-dot,
.live-badge::before,
.defense-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.hero {
  padding: 52px 32px 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.vault-health,
.pool-card,
.control-panel,
.stake-panel,
.event {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 48px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(124, 77, 255, 0.2), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 88px);
  mask-image: linear-gradient(90deg, #000 0%, transparent 86%);
  pointer-events: none;
}

.hero-copy > * {
  position: relative;
  max-width: 760px;
}

.eyebrow {
  margin-bottom: 18px;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

p {
  line-height: 1.8;
  color: #c5cad6;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.stake-actions button,
.small-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.primary-action {
  background: linear-gradient(135deg, var(--purple), #17d2b8);
  box-shadow: 0 14px 40px rgba(124, 77, 255, 0.26);
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.vault-health {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 430px;
  padding: 28px;
}

.health-header,
.card-top,
.panel-header,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.health-header strong {
  font-size: 3rem;
  color: var(--green);
}

.scan-ring {
  position: relative;
  display: grid;
  place-items: center;
  margin: 18px auto;
  width: min(300px, 76vw);
  aspect-ratio: 1;
  border: 1px solid rgba(178, 124, 255, 0.35);
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle, rgba(178, 124, 255, 0.2) 0 2px, transparent 2px 32px),
    radial-gradient(circle, rgba(124, 77, 255, 0.34), transparent 62%);
  box-shadow: inset 0 0 36px rgba(178, 124, 255, 0.18);
}

.scan-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  border: 1px solid rgba(57, 216, 255, 0.26);
  animation: pulse 2.8s ease-in-out infinite;
}

.scan-core {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(6, 7, 10, 0.72);
}

.scan-core span {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
}

.scan-core strong {
  font-size: 2rem;
}

.scan-core small {
  color: var(--muted);
}

.health-metrics,
.stat-strip,
.section-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

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

.health-metrics div,
.stat-strip div,
.rule-list div,
.stake-numbers div {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.health-metrics strong,
.stat-strip strong,
.rule-list strong,
.stake-numbers strong {
  display: block;
  margin-top: 6px;
}

.status-ready {
  color: var(--amber);
}

.stat-strip {
  grid-template-columns: repeat(4, 1fr);
  margin: 0 32px;
}

.section-grid {
  grid-template-columns: repeat(3, 1fr);
  padding: 24px 32px;
}

.pool-card {
  padding: 24px;
}

.card-top span {
  font-size: 2.4rem;
  font-weight: 900;
}

.defense-card .card-top span,
.defense-card strong {
  color: var(--red);
}

.reward-card .card-top span,
.reward-card strong {
  color: var(--green);
}

.marketing-card .card-top span,
.marketing-card strong {
  color: var(--amber);
}

.pool-card > strong {
  display: block;
  margin-top: 22px;
  font-size: 1.55rem;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  padding: 0 32px 24px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-panel,
.stake-panel {
  padding: 24px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(85, 227, 155, 0.1);
  color: var(--green);
  font-weight: 800;
  font-size: 0.76rem;
}

.defense-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  margin-top: 16px;
}

.defense-meter {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.meter-label {
  color: var(--muted);
}

.defense-meter strong {
  margin: 10px 0;
  font-size: 2.2rem;
  color: var(--red);
}

.meter-bar {
  display: flex;
  align-items: flex-end;
  width: 44px;
  height: 120px;
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.meter-bar span {
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--red), var(--amber));
}

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

.module-note {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(57, 216, 255, 0.22);
  border-radius: 8px;
  background: rgba(57, 216, 255, 0.07);
  color: #cfefff;
  font-size: 0.92rem;
  line-height: 1.75;
}

.wide-list {
  grid-template-columns: 1fr;
}

.wide-list div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 42px;
}

.wide-list strong {
  margin-top: 0;
  text-align: right;
  word-break: break-all;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 20px;
}

.ladder-card {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(124, 77, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ladder-card b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #19d67f, #10a668);
  color: #fff;
}

.ladder-card:nth-child(2) b {
  background: linear-gradient(135deg, #f7b733, #ff8a00);
}

.ladder-card:nth-child(3) b {
  background: linear-gradient(135deg, #ff784f, #ff3f55);
}

.ladder-card:nth-child(4) b {
  background: linear-gradient(135deg, #ff466e, #c23cff);
}

.ladder-card:nth-child(5) b {
  background: linear-gradient(135deg, #bb4dff, #6548ff);
}

.ladder-card small,
.ladder-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.ladder-card.active {
  border-color: rgba(85, 227, 155, 0.72);
  box-shadow: 0 0 0 1px rgba(85, 227, 155, 0.2), 0 0 28px rgba(85, 227, 155, 0.12);
}

.defense-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(85, 227, 155, 0.08);
  color: #c9f7dc;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.stake-numbers {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.stake-numbers strong {
  font-size: 1.4rem;
}

.stake-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stake-actions button,
.small-action {
  flex: 1;
  min-width: 116px;
  color: var(--text);
  background: rgba(124, 77, 255, 0.17);
  border-color: rgba(124, 77, 255, 0.34);
  cursor: pointer;
}

.small-action {
  flex: initial;
  min-width: 112px;
}

.amount-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.amount-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
}

.amount-field input:focus {
  border-color: rgba(124, 77, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.16);
}

.tx-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.events-section {
  padding: 0 32px 48px;
}

.section-title {
  margin: 8px 0 16px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.event strong {
  display: block;
}

.event .tag {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.16);
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 800;
}

.event a {
  color: var(--cyan);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

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

  .nav-links {
    display: none;
  }

  .hero-grid,
  .dashboard-grid,
  .ladder-grid {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 0 16px;
  }

  .brand small {
    display: none;
  }

  .wallet-button {
    padding: 0 12px;
  }

  .hero,
  .section-grid,
  .dashboard-grid,
  .events-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy,
  .vault-health,
  .control-panel,
  .stake-panel,
  .pool-card {
    padding: 20px;
  }

  .hero-copy,
  .vault-health {
    min-height: auto;
  }

  .stat-strip {
    margin: 0 16px;
  }

  .section-grid,
  .stat-strip,
  .health-metrics,
  .defense-layout,
  .ladder-grid,
  .rule-list,
  .event,
  .section-title {
    grid-template-columns: 1fr;
  }

  .event {
    gap: 8px;
  }
}
