:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: rgba(17, 33, 53, 0.78);
  --surface-strong: #11243a;
  --line: rgba(154, 195, 230, 0.13);
  --text: #f4f8fc;
  --muted: #8da4b8;
  --blue: #51b8ff;
  --cyan: #73f0df;
  --green: #78e6a5;
  --red: #ff8f9d;
  --gold: #ffd37a;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0%, rgba(37, 131, 188, 0.18), transparent 34%),
    linear-gradient(160deg, #07111f 0%, #091827 52%, #06101d 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button {
  color: inherit;
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.ambient-one {
  top: 18%;
  right: -150px;
  background: var(--blue);
}

.ambient-two {
  bottom: 8%;
  left: -160px;
  background: var(--cyan);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(102px + env(safe-area-inset-bottom));
}

.topbar,
.profile-row,
.section-heading,
.identity-line {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(115, 240, 223, 0.34);
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 8px 28px rgba(81, 184, 255, 0.24);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.icon-button:active {
  transform: scale(0.94);
}

.icon-button.loading span {
  animation: spin 0.8s linear infinite;
}

.profile-row {
  gap: 12px;
  margin-bottom: 18px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #d9f8ff;
  background: linear-gradient(145deg, #264765, #14283f);
  font-size: 16px;
  font-weight: 800;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy h2 {
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy p {
  overflow: hidden;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(120, 230, 165, 0.18);
  border-radius: 999px;
  color: var(--green);
  background: rgba(120, 230, 165, 0.08);
  font-size: 10px;
  font-weight: 700;
}

.status-pill.unbound {
  border-color: rgba(255, 211, 122, 0.2);
  color: var(--gold);
  background: rgba(255, 211, 122, 0.08);
}

.balance-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 184px;
  padding: 26px;
  border: 1px solid rgba(115, 240, 223, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(29, 92, 127, 0.82), rgba(12, 39, 63, 0.96)),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.balance-card::after {
  position: absolute;
  z-index: -1;
  right: -45px;
  bottom: -75px;
  width: 190px;
  height: 190px;
  border: 28px solid rgba(115, 240, 223, 0.07);
  border-radius: 50%;
  content: "";
}

.balance-orbit {
  position: absolute;
  z-index: -1;
  top: -55px;
  right: 40px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.balance-label {
  margin-bottom: 10px;
  color: #acd0e3;
  font-size: 12px;
}

.balance-value {
  margin-bottom: 23px;
  font-size: clamp(38px, 11vw, 56px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.balance-meta {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #a9c0d0;
  font-size: 12px;
}

.balance-meta strong {
  color: var(--green);
  font-size: 15px;
}

.section-heading {
  justify-content: space-between;
  margin: 30px 2px 14px;
}

.section-heading.compact {
  margin-top: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.stat-card,
.identity-card,
.activity-list,
.asset-list {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
}

.stat-card {
  min-height: 124px;
  padding: 16px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 18px;
  border-radius: 10px;
  color: var(--blue);
  background: rgba(81, 184, 255, 0.1);
  font-weight: 800;
}

.stat-card.positive .stat-icon {
  color: var(--green);
  background: rgba(120, 230, 165, 0.1);
}

.stat-card.negative .stat-icon {
  color: var(--red);
  background: rgba(255, 143, 157, 0.1);
}

.stat-card p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.stat-card strong {
  font-size: 18px;
}

.asset-list,
.activity-list {
  overflow: hidden;
}

.asset-item,
.activity-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.asset-item:last-child,
.activity-item:last-child {
  border-bottom: 0;
}

.asset-icon,
.activity-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(81, 184, 255, 0.09);
}

.asset-copy,
.activity-copy {
  min-width: 0;
  flex: 1;
}

.asset-copy strong,
.activity-copy strong {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-copy span,
.activity-copy span {
  color: var(--muted);
  font-size: 10px;
}

.asset-value,
.activity-amount {
  font-size: 13px;
  font-weight: 800;
}

.activity-amount.positive {
  color: var(--green);
}

.activity-amount.negative {
  color: var(--red);
}
