:root {
  color-scheme: dark;
  --bg: #09111f;
  --bg-2: #0f1b32;
  --panel: rgba(11, 20, 37, 0.82);
  --panel-strong: rgba(9, 17, 31, 0.94);
  --border: rgba(148, 163, 184, 0.2);
  --text: #ecf3ff;
  --muted: #9db0c8;
  --soft: #c8d6ea;
  --accent: #7dd3fc;
  --accent-2: #f59e0b;
  --positive: #34d399;
  --negative: #fb7185;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
  font-family: 'Instrument Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(160deg, #08101d 0%, #0e1728 46%, #09101c 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 90%);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 120px;
}

.shell-panel {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 27, 47, 0.9), rgba(9, 17, 31, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel,
.controls-panel,
.feedback-panel,
.table-panel,
.summary-bar {
  border-radius: 28px;
}

.hero-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
  overflow: hidden;
}

.hero-panel::after {
  content: '';
  position: absolute;
  inset: auto -120px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.24), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
strong {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 4.2rem);
  line-height: 0.94;
  max-width: 12ch;
}

h2 {
  margin: 0;
  font-size: 1.2rem;
}

.hero-text,
.helper-copy,
.control-copy p,
.empty-text,
.asset-meta,
.metric-subtext,
.inline-note,
.mobile-meta,
.price-caption {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.wallet-form {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.7fr) minmax(160px, 0.55fr) auto;
  align-items: end;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group span,
.toggle-item span,
.summary-grid span,
.price-caption,
.stat-pill span {
  color: var(--soft);
  font-size: 0.84rem;
}

.field-group input,
.field-group select,
.cost-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(8, 14, 26, 0.88);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-group input:focus,
.field-group select:focus,
.cost-input:focus {
  border-color: rgba(125, 211, 252, 0.78);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.16);
}

.primary-button,
.ghost-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #7dd3fc, #f59e0b);
  color: #08111c;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.hero-meta {
  display: grid;
  gap: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  color: var(--soft);
  font-size: 0.85rem;
}

.content-stack {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.controls-panel,
.feedback-panel,
.table-panel {
  padding: 22px;
}

.controls-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.toggle-grid {
  display: grid;
  gap: 10px;
}

.toggle-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.feedback-panel {
  border-color: rgba(125, 211, 252, 0.24);
  background: linear-gradient(180deg, rgba(14, 31, 55, 0.88), rgba(10, 21, 39, 0.84));
}

.feedback-panel.is-error {
  border-color: rgba(251, 113, 133, 0.32);
}

.table-header-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-header-row p {
  margin: 8px 0 0;
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 20px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.empty-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.18);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.spinner--inline {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

.summary-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--soft);
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
}

.asset-table {
  width: 100%;
  min-width: 1360px;
  border-collapse: collapse;
}

.asset-table th,
.asset-table td {
  padding: 18px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}

.asset-table th {
  color: var(--soft);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.asset-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.asset-cell {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
}

.asset-image,
.asset-image-placeholder {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.2), rgba(245, 158, 11, 0.18));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.asset-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--soft);
  font-family: 'Space Grotesk', sans-serif;
}

.asset-name {
  margin: 0;
  font-size: 1rem;
}

.asset-meta {
  margin-top: 8px;
  font-size: 0.88rem;
}

.asset-link {
  color: var(--accent);
  text-decoration: none;
}

.asset-link:hover {
  text-decoration: underline;
}

.collection-cell {
  display: grid;
  gap: 8px;
}

.stat-pill {
  width: fit-content;
}

.price-stack {
  display: grid;
  gap: 6px;
}

.value-strong {
  font-size: 1.02rem;
}

.metric-subtext {
  font-size: 0.82rem;
}

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

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

.neutral {
  color: var(--soft);
}

.cost-input {
  min-width: 136px;
}

.input-with-prefix {
  position: relative;
}

.input-with-prefix::before {
  content: 'ETH';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.input-with-prefix input {
  padding-right: 52px;
}

.mobile-card-list {
  display: none;
  gap: 14px;
}

.asset-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.asset-card-top {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.mobile-meta {
  display: grid;
  gap: 12px;
}

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

.mobile-grid .price-stack {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.summary-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 20px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.95), rgba(7, 13, 25, 0.98));
}

.summary-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: min(100%, 1040px);
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.verdict-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.verdict-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.verdict-chip.positive {
  color: var(--positive);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.12);
}

.verdict-chip.negative {
  color: var(--negative);
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(244, 63, 94, 0.12);
}

.summary-helper {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 42ch;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .wallet-form,
  .controls-panel,
  .summary-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .controls-panel {
    justify-content: start;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 18px;
  }

  .hero-panel,
  .controls-panel,
  .feedback-panel,
  .table-panel,
  .summary-bar {
    border-radius: 22px;
  }

  .hero-panel,
  .controls-panel,
  .feedback-panel,
  .table-panel {
    padding: 18px;
  }

  .wallet-form {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    display: none;
  }

  .mobile-card-list {
    display: grid;
  }

  .mobile-grid {
    grid-template-columns: 1fr;
  }

  .summary-bar {
    position: static;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-helper {
    max-width: none;
  }
}
