:root {
  --bg: #080c14;
  --card: #191e28;
  --card-soft: #202633;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f7f8fb;
  --muted: #aeb4c1;
  --green: #00ff9c;
  --danger: #ff7d7d;
  --tab: #1d2330;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(80, 116, 255, 0.18), transparent 28rem),
    linear-gradient(180deg, #101622 0%, var(--bg) 58%);
}

.page {
  display: grid;
  justify-items: center;
  min-height: 100vh;
  padding: 10px 16px 40px;
}

.page-tagline {
  width: 100%;
  max-width: min(780px, 100%);
  margin: 1.25rem 0 1rem;
  padding: 1.35rem 1.75rem;
  color: var(--green);
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-align: center;
}

.coin-tabs {
  position: sticky;
  top: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 64px;
}

.coin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 112px;
  padding: 12px 20px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--tab);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.coin-tab-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.coin-tab-label {
  line-height: 1;
}

.coin-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
}

.coin-tab.active {
  color: #11141a;
  background: #ffffff;
  border-color: #ffffff;
}

.card {
  width: min(780px, 100%);
  padding: clamp(24px, 5vw, 40px);
  background: linear-gradient(145deg, rgba(29, 34, 46, 0.96), rgba(24, 29, 39, 0.96));
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.card-header {
  text-align: left;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.description {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.wallet-form {
  margin-top: 26px;
}

.hidden {
  display: none !important;
}

.eth-network-row {
  margin-bottom: 18px;
}

.wallet-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

select {
  width: 100%;
  padding: 17px 44px 17px 18px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background-color: rgba(9, 12, 18, 0.86);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.12);
}

.address-row {
  display: flex;
  gap: 12px;
}

input {
  width: 100%;
  min-width: 0;
  padding: 17px 18px;
  color: var(--text);
  font: inherit;
  background: rgba(9, 12, 18, 0.86);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  outline: none;
}

input::placeholder {
  color: rgba(174, 180, 193, 0.7);
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.12);
}

#check-wallet {
  flex: 0 0 auto;
  padding: 0 22px;
  color: #07110d;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: var(--green);
  border: 0;
  border-radius: 14px;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

#check-wallet:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

#check-wallet:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.error {
  color: var(--danger);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.stat {
  padding: 22px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.stat span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.stat strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.1;
}

.main-stat {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.16), rgba(255, 255, 255, 0.045));
}

.main-stat strong {
  color: var(--green);
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.transactions {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.explorer-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

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

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

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.transaction-item:hover {
  border-color: rgba(0, 255, 156, 0.44);
}

.transaction-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.transaction-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-info small,
.empty-transactions {
  color: var(--muted);
}

.transaction-amount {
  flex: 0 0 auto;
  font-weight: 900;
  white-space: nowrap;
}

.transaction-amount.incoming {
  color: var(--green);
}

.transaction-amount.outgoing {
  color: var(--danger);
}

@media (max-width: 680px) {
  .page {
    padding-top: 10px;
  }

  .coin-tabs {
    gap: 8px;
    margin-bottom: 34px;
  }

  .coin-tab {
    min-width: 0;
    padding: 11px 13px;
    font-size: 0.9rem;
    gap: 8px;
  }

  .coin-tab-icon {
    width: 22px;
    height: 22px;
  }

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

  .address-row {
    display: grid;
  }

  #check-wallet {
    padding: 16px 22px;
  }

  .transaction-item,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
