:root {
  --bg0: #070b14;
  --bg1: #0d1528;
  --card: rgba(16, 24, 44, 0.88);
  --line: rgba(120, 170, 255, 0.18);
  --cyan: #3db8ff;
  --cyan2: #6ee7ff;
  --blue: #2563eb;
  --text: #e8eefc;
  --muted: rgba(200, 214, 240, 0.62);
  --ok: #34d399;
}

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

html,
body {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: "PingFang SC", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(61, 184, 255, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 55%, #0a1222);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.scene {
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 1.5rem 1.1rem 2rem;
  isolation: isolate;
}

.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.09) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

.pulse {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(61, 184, 255, 0.25);
  animation: pulse 4.5s ease-out infinite;
}

.pulse-a {
  width: 220px;
  height: 220px;
  top: 18%;
  left: 50%;
  margin-left: -110px;
}

.pulse-b {
  width: 320px;
  height: 320px;
  top: 12%;
  left: 50%;
  margin-left: -160px;
  animation-delay: 1.4s;
  opacity: 0.6;
}

@keyframes pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.55;
  }
  70% {
    opacity: 0.12;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  padding: 2rem 1.45rem 1.55rem;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 48px rgba(37, 99, 235, 0.15);
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #1d4ed8, #0ea5e9);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.45rem;
}

/* 纯转圈加载 */
.spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
}

.spinner-ring {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--cyan2);
  border-right-color: var(--cyan);
  -webkit-animation: spin 0.85s linear infinite;
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 18px rgba(61, 184, 255, 0.25);
}

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

.status {
  min-height: 1.5em;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  color: #f2f6ff;
}

.status.is-swap {
  animation: tipIn 0.35s ease;
}

@keyframes tipIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(6px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

.hint {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}

.jump-manual,
.done-panel {
  margin-top: 1rem;
}

.jump-manual[hidden],
.done-panel[hidden] {
  display: none !important;
}

.jump-btn,
.done-text {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #2563eb, #0ea5e9);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 560;
  border: none;
}

.done-text {
  background: transparent;
  color: var(--ok);
  padding: 0;
}

.footer {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(180, 198, 230, 0.35);
}

@media (max-width: 360px) {
  .card {
    padding: 1.65rem 1.15rem 1.35rem;
  }
  .brand-title {
    font-size: 1.05rem;
  }
}
