:root {
  --bg: #0b1118;
  --panel: #17212b;
  --accent: #0098ea;
  --text: #e8f4fc;
  --muted: #7f91a4;
  --line: rgba(148, 180, 210, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(0, 152, 234, 0.22), transparent 58%),
    radial-gradient(700px 420px at 90% 80%, rgba(42, 171, 238, 0.08), transparent 50%),
    var(--bg);
}

button {
  font: inherit;
  color: inherit;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px 8px;
}

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

.logo {
  width: 50px;
  height: 50px;
  flex: none;
}

.logo svg {
  display: block;
  width: 50px;
  height: 50px;
}

.brand strong {
  display: block;
  font-family: Orbitron, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.wallet {
  position: relative;
  max-width: min(100%, 460px);
}

.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.wallet-btn:hover,
.wallet-btn[aria-expanded="true"] {
  border-color: rgba(0, 152, 234, 0.45);
  background: rgba(0, 152, 234, 0.1);
}

#wallet-label {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.caret {
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--muted);
}

.wallet-btn[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(420px, 80vw);
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #17212b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.wallet-menu a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.wallet-menu a:hover {
  background: rgba(0, 152, 234, 0.12);
}

.wallet-role {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet-addr {
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.stats {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stats article {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px 16px;
}

.stats span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.stats strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.daily-line {
  max-width: 1080px;
  margin: 18px auto 0;
  padding: 0 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.daily-line span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.divider {
  max-width: 1080px;
  height: 1px;
  margin: 56px auto 48px;
  background: linear-gradient(90deg, transparent, rgba(0, 152, 234, 0.5), transparent);
}

.divider-after-daily {
  margin-top: 28px;
}

.seed-row {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.seed-phrase {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.seed-copy {
  flex: none;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.seed-copy:hover {
  background: #1aa6f0;
}

.section-title {
  max-width: 1080px;
  margin: 0 auto 20px;
  padding: 0 24px;
  font-size: 28px;
  font-weight: 800;
}

.tx-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
  overflow-x: auto;
}

.tx {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.tx th,
.tx td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tx th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tx a {
  color: inherit;
  text-decoration: none;
}

.tx a:hover {
  color: var(--accent);
}

.tx td {
  font-size: 15px;
  font-weight: 600;
}

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

.tx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.pager button:hover:not(:disabled),
.pager button.is-current {
  border-color: rgba(0, 152, 234, 0.45);
  background: rgba(0, 152, 234, 0.14);
  color: #fff;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

.tx-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tx-state {
  color: #3dd68c;
}

.tx-state.is-down {
  color: #ff6b6b;
}

@media (max-width: 800px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand p {
    white-space: normal;
  }

  .wallet,
  .wallet-btn,
  .seed-row {
    width: 100%;
  }

  .seed-row {
    align-items: stretch;
    flex-direction: column;
  }

  .seed-copy {
    width: 100%;
  }

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

  .stats {
    margin-top: 0;
  }

  .tx-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}
