:root {
  --bg-top: #0b1020;
  --bg-bottom: #161927;
  --card-top: #222a45;
  --card-bottom: #151b2f;
  --text: #f3f6ff;
  --muted: #a9b2d1;
  --accent: #6ee7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Noto Sans KR', 'Segoe UI', sans-serif;
  background:
    radial-gradient(1000px 600px at 15% -10%, #24305a 0%, transparent 70%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  display: grid;
  place-items: center;
}

.wallet-wrap {
  width: min(92vw, 460px);
}

.wallet-card {
  background: linear-gradient(165deg, var(--card-top), var(--card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.chip {
  width: 56px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4d35e, #c99700);
  margin-bottom: 18px;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.brand {
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--muted);
}

.pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(110, 231, 255, 0.13);
  color: var(--accent);
}

.balance-block {
  margin: 14px 0;
}

.balance-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.token-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-block;
  margin-top: 2px;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.amount {
  margin: 0;
  font-weight: 700;
  font-size: clamp(24px, 6.5vw, 30px);
  line-height: 1.2;
}

.token {
  font-size: clamp(18px, 5.8vw, 30px);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wallet-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}

.send-btn {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #32d5ff, #5b8dff);
  color: #05101e;
  font-weight: 700;
  cursor: pointer;
}

.send-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 6, 20, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}

.hidden {
  display: none;
}

.send-panel {
  width: min(94vw, 420px);
  background: #0f1731;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 18px;
}

.send-panel h2 {
  margin: 0 0 12px;
}

.send-panel label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.send-panel input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.amount-quick {
  margin-top: 8px;
}

.amount-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.quick-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.send-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.send-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.confirm-btn {
  background: #2dd4bf;
  color: #022c22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.send-panel input:disabled,
.send-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(2, 44, 34, 0.3);
  border-top-color: #022c22;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.send-status {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(92vw, 560px);
  background: rgba(17, 24, 39, 0.95);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  white-space: pre-line;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .wallet-card {
    padding: 16px;
  }

  .token-icon {
    width: 52px;
    height: 52px;
  }

  .balance-row {
    gap: 10px;
  }
}
