:root {
  --bg: #08090d;
  --panel: #101218;
  --panel-2: #141720;
  --border: #242833;
  --text: #f4f5f7;
  --muted: #8b91a1;
  --accent: #8b7cff;
  --accent-2: #6f61ff;
  --green: #54d69a;
  --red: #ff6b7a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(110, 90, 255, 0.12),
      transparent 35%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 40px;

  border-bottom: 1px solid var(--border);

  background: rgba(8, 9, 13, 0.8);

  backdrop-filter: blur(12px);

  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: linear-gradient(
    135deg,
    var(--accent),
    #4f46e5
  );

  font-size: 20px;
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
}

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

.github-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.github-link:hover {
  color: var(--text);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 75px 0 45px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 55px;

  align-items: center;
}

.eyebrow {
  color: var(--accent);

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 2px;

  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 68px);

  line-height: 0.98;

  letter-spacing: -3px;

  margin: 0 0 22px;

  max-width: 650px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  max-width: 580px;

  color: var(--muted);

  font-size: 16px;

  line-height: 1.7;

  margin: 0;
}

.search-card {
  padding: 25px;

  background: rgba(16, 18, 24, 0.85);

  border: 1px solid var(--border);

  border-radius: 18px;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25);
}

.input-label {
  font-size: 12px;
  color: var(--muted);

  margin-bottom: 9px;
}

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

.search-row input {
  min-width: 0;
  flex: 1;

  background: #090b10;

  border: 1px solid var(--border);

  border-radius: 10px;

  color: var(--text);

  padding: 14px;

  outline: none;

  font-family: monospace;
}

.search-row input:focus {
  border-color: var(--accent);
}

.search-row button {
  border: 0;

  border-radius: 10px;

  padding: 0 20px;

  color: white;

  background: var(--accent);

  font-weight: 700;

  transition: 0.2s;
}

.search-row button:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.input-error {
  min-height: 18px;

  margin-top: 9px;

  color: var(--red);

  font-size: 12px;
}

.dashboard {
  padding-bottom: 70px;
}

.hidden {
  display: none !important;
}

.wallet-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  margin-bottom: 25px;
}

.wallet-info {
  display: flex;

  align-items: center;

  gap: 14px;
}

.wallet-avatar {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 14px;

  background: var(--panel-2);

  border: 1px solid var(--border);

  color: var(--accent);

  font-size: 22px;
}

.wallet-label {
  color: var(--muted);

  font-size: 10px;

  letter-spacing: 1.5px;

  margin-bottom: 5px;
}

.wallet-address {
  display: flex;

  align-items: center;

  gap: 7px;

  font-family: monospace;

  font-size: 14px;
}

.icon-button {
  border: 0;

  background: transparent;

  color: var(--muted);

  padding: 3px;

  font-size: 15px;
}

.icon-button:hover {
  color: white;
}

.network-control {
  display: flex;

  align-items: center;

  gap: 10px;
}

.network-control label {
  color: var(--muted);

  font-size: 12px;
}

.network-control select {
  background: var(--panel);

  color: var(--text);

  border: 1px solid var(--border);

  padding: 11px 35px 11px 13px;

  border-radius: 10px;

  outline: none;
}

.stats {
  display: grid;

  grid-template-columns: 1.5fr 1fr 1fr;

  gap: 15px;

  margin-bottom: 35px;
}

.stat-card {
  background: var(--panel);

  border: 1px solid var(--border);

  border-radius: 15px;

  padding: 22px;
}

.primary-stat {
  background:
    linear-gradient(
      135deg,
      rgba(139, 124, 255, 0.16),
      rgba(16, 18, 24, 0.95)
    );
}

.stat-label {
  color: var(--muted);

  font-size: 10px;

  letter-spacing: 1.4px;

  margin-bottom: 10px;
}

.stat-value {
  font-size: 27px;

  font-weight: 700;

  letter-spacing: -0.8px;
}

.stat-secondary {
  color: var(--muted);

  font-size: 12px;

  margin-top: 6px;
}

.portfolio-section,
.allocation-section {
  margin-top: 28px;
}

.section-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 15px;
}

.section-title {
  font-size: 19px;

  font-weight: 700;
}

.section-subtitle {
  color: var(--muted);

  font-size: 12px;

  margin-top: 4px;
}

.refresh-button {
  background: var(--panel);

  border: 1px solid var(--border);

  color: var(--text);

  padding: 9px 13px;

  border-radius: 9px;

  font-size: 12px;
}

.refresh-button:hover {
  border-color: var(--accent);
}

.table-wrap {
  overflow-x: auto;

  border: 1px solid var(--border);

  border-radius: 15px;

  background: var(--panel);
}

table {
  width: 100%;

  border-collapse: collapse;

  min-width: 700px;
}

th {
  color: var(--muted);

  font-size: 10px;

  letter-spacing: 1px;

  font-weight: 600;

  text-align: left;

  padding: 15px 18px;

  border-bottom: 1px solid var(--border);
}

td {
  padding: 16px 18px;

  border-bottom: 1px solid rgba(36, 40, 51, 0.65);

  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.asset {
  display: flex;

  align-items: center;

  gap: 11px;
}

.token-icon {
  width: 34px;
  height: 34px;

  border-radius: 50%;

  background: #1d2029;

  object-fit: cover;

  display: grid;

  place-items: center;

  font-size: 12px;

  font-weight: 700;
}

.asset-name {
  font-weight: 600;
}

.asset-address {
  color: var(--muted);

  font-family: monospace;

  font-size: 10px;

  margin-top: 3px;
}

.balance {
  font-family: monospace;
}

.usd {
  font-weight: 600;
}

.share-wrap {
  display: flex;

  align-items: center;

  gap: 9px;
}

.share-bar {
  width: 70px;
  height: 5px;

  background: #252934;

  border-radius: 10px;

  overflow: hidden;
}

.share-fill {
  height: 100%;

  background: var(--accent);

  border-radius: inherit;
}

.explorer {
  color: var(--accent);

  text-decoration: none;

  font-size: 16px;
}

.explorer:hover {
  color: white;
}

.empty-state {
  padding: 50px;

  text-align: center;

  color: var(--muted);

  font-size: 13px;
}

.allocation {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

.allocation-item {
  display: grid;

  grid-template-columns: 110px 1fr 80px;

  gap: 15px;

  align-items: center;

  background: var(--panel);

  border: 1px solid var(--border);

  padding: 12px 15px;

  border-radius: 10px;
}

.allocation-name {
  font-size: 12px;

  font-weight: 600;
}

.allocation-bar {
  height: 7px;

  background: #242731;

  border-radius: 10px;

  overflow: hidden;
}

.allocation-fill {
  height: 100%;

  background: var(--accent);

  border-radius: inherit;
}

.allocation-percent {
  text-align: right;

  font-family: monospace;

  font-size: 12px;

  color: var(--muted);
}

.loading {
  display: flex;

  align-items: center;

  gap: 13px;

  padding: 18px;

  margin-bottom: 20px;

  border: 1px solid var(--border);

  border-radius: 12px;

  background: var(--panel);
}

.loading strong {
  display: block;

  font-size: 13px;
}

.loading span {
  display: block;

  color: var(--muted);

  font-size: 11px;

  margin-top: 3px;
}

.spinner {
  width: 20px;
  height: 20px;

  border: 2px solid #30343f;

  border-top-color: var(--accent);

  border-radius: 50%;

  animation: spin 0.8s linear infinite;
}

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

.error-box {
  padding: 15px;

  margin-bottom: 20px;

  border: 1px solid rgba(255, 107, 122, 0.3);

  background: rgba(255, 107, 122, 0.07);

  border-radius: 10px;

  color: #ff9aa5;

  font-size: 12px;
}

.welcome {
  text-align: center;

  padding: 65px 20px 100px;
}

.welcome-icon {
  width: 70px;
  height: 70px;

  display: grid;

  place-items: center;

  margin: 0 auto 20px;

  border-radius: 20px;

  background: var(--panel);

  border: 1px solid var(--border);

  color: var(--accent);

  font-size: 32px;
}

.welcome h2 {
  font-size: 25px;

  margin: 0 0 9px;
}

.welcome p {
  color: var(--muted);

  font-size: 13px;

  margin: 0;
}

.features {
  display: flex;

  justify-content: center;

  gap: 12px;

  margin-top: 30px;

  flex-wrap: wrap;
}

.features div {
  min-width: 130px;

  display: flex;

  flex-direction: column;

  gap: 5px;

  padding: 14px;

  background: var(--panel);

  border: 1px solid var(--border);

  border-radius: 10px;
}

.features strong {
  color: var(--accent);

  font-size: 11px;
}

.features span {
  font-size: 12px;

  color: var(--muted);
}

footer {
  display: flex;

  justify-content: space-between;

  padding: 25px 40px;

  border-top: 1px solid var(--border);

  color: #5e6472;

  font-size: 11px;
}

@media (max-width: 800px) {

  .topbar {
    padding: 0 20px;
  }

  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    grid-template-columns: 1fr;

    gap: 30px;

    padding-top: 45px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

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

  .wallet-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .network-control {
    width: 100%;
  }

  .network-control select {
    flex: 1;
  }

  footer {
    padding: 20px;

    gap: 10px;

    flex-direction: column;
  }
}

@media (max-width: 520px) {

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    height: 46px;
  }

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

  .allocation-item {
    grid-template-columns: 75px 1fr 55px;
    gap: 8px;
  }
}
