*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 10px 16px 28px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* ── Header ── */
.header {
  flex-shrink: 0;
  text-align: center;
}

.header-row {
  display: flex;
  justify-content: center;
  gap: 24px;
}

h1, h2 {
  margin: 2px 0;
  font-size: 16px;
}

.divider {
  border: none;
  border-top: 2px solid black;
  width: 90%;
  margin: 4px auto 0;
}

/* ── Three-column coin panels ── */
.coins-row {
  display: flex;
}

.section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 20px 0;
}

.col-divider {
  width: 1px;
  background: #ddd;
  align-self: stretch;
  flex-shrink: 0;
  margin: 8px 0 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 8px;
}

.stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  width: 100%;
}

.stat-label {
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
}

.stats > div:not(.stat-label) {
  font-size: 13px;
}

/* ── Wallet section pinned to column bottom ── */
.wallet-section {
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.stats-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 4px;
}


/* ── DeFi TVL box ── */
.tvl-box {
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 8px 14px 10px;
  flex-shrink: 0;
}

.tvl-chains-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.tvl-chain-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tvl-chain-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tvl-chain-item > div:nth-child(2) {
  font-size: 12px;
}

.tvl-change {
  font-size: 11px;
}

.tvl-up   { color: #1a7a1a; }
.tvl-down { color: #a00; }

/* ── Refresh timer ── */
.timer {
  position: fixed;
  bottom: 6px;
  right: 10px;
  font-size: 11px;
  opacity: 0.5;
}
