/* Layout base */
:root {
  --bg: #0f1221;
  --panel: #161a2d;
  --border: rgba(255,255,255,.08);
  --text: #e9f3ff;
  --muted: #a9b3c7;
  --accent: #35f0d0;
  --radius: 16px;
  --card-radius: 14px;
  --shadow: 0 10px 25px rgba(0,0,0,.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  background:
    radial-gradient(900px 500px at -10% -10%, rgba(53,240,208,.13), transparent),
    radial-gradient(900px 500px at 110% 10%, rgba(122,162,255,.10), transparent),
    var(--bg);
  color: var(--text);
}

/* Header */
.page-header {
  text-align: center;
  padding: 32px 16px 8px;
}
.page-header h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.page-header p {
  color: var(--muted);
}

/* Container */
.container {
  width: min(1100px, 92%);
  margin: 18px auto 40px;
}

/* Wallet Grid */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

/* Wallet Card (box not too big) */
.wallet-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  height: 110px;               /* not too big */
  padding: 12px;
  border-radius: var(--card-radius);
  text-align: center;

  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);

  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}

.wallet-card:hover,
.wallet-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(53,240,208,.35);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
  outline: none;
}

/* Logo */
.wallet-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: #0d1022;
  border: 1px solid var(--border);
  display: block;
}

/* Name */
.wallet-name {
  font-size: .92rem;
  line-height: 1.15;
  color: var(--text);
  max-width: 120px;
}

/* Fallback avatar if logo not found */
.wallet-card[data-initial]:has(img[onerror])::before {
  content: attr(data-initial);
}

/* Small screens */
@media (max-width: 520px) {
  .wallet-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .wallet-card { height: 105px; }
  .wallet-name { font-size: .9rem; }
}
