:root {
  color: #111820;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: #f3f6f8; }

body { min-height: 100vh; margin: 0; background: #f3f6f8; }

button { font: inherit; }

.redirect-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.redirect-page::before,
.redirect-page::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
}

.redirect-page::before {
  top: -210px;
  right: -170px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(67, 111, 255, .11), rgba(67, 111, 255, 0) 70%);
}

.redirect-page::after {
  bottom: -180px;
  left: -190px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(17, 24, 32, .05);
  box-shadow: 0 0 0 54px rgba(255, 255, 255, .32), 0 0 0 108px rgba(255, 255, 255, .2);
}

.redirect-panel {
  width: min(100%, 430px);
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #dde4ea;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #53606c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #366bff;
  box-shadow: 0 0 0 4px rgba(54, 107, 255, .1);
}

.route-mark {
  display: grid;
  grid-template-columns: 38px minmax(80px, 128px) 48px;
  align-items: center;
  justify-content: center;
  margin: 44px 0 42px;
}

.route-point,
.route-arrow {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.route-point {
  width: 38px;
  height: 38px;
  border: 1px solid #ccd5de;
  background: #fff;
  box-shadow: inset 0 0 0 11px #f3f6f8;
}

.route-point::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111820;
  content: "";
}

.route-line {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: #ccd5de;
}

.route-line i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #366bff, transparent);
  animation: route-travel 1.8s ease-in-out infinite;
}

.route-arrow {
  width: 48px;
  height: 48px;
  background: #111820;
  color: #fff;
  box-shadow: 0 16px 30px rgba(17, 24, 32, .18);
}

.route-arrow svg,
.redirect-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.kicker {
  margin: 0 0 12px;
  color: #366bff !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .24em;
}

.copy h1 {
  margin: 0;
  color: #111820;
  font-size: clamp(31px, 8.5vw, 44px);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -.045em;
}

.copy > p:last-child {
  max-width: 300px;
  margin: 17px auto 0;
  color: #68747f;
  font-size: 14px;
  line-height: 1.75;
}

.progress {
  height: 3px;
  margin: 38px 0 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe5ea;
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #366bff;
  transform: scaleX(0);
  transform-origin: left;
}

.progress span.is-running { animation: progress-fill var(--redirect-duration) linear forwards; }
.progress span.is-waiting { width: 34%; animation: progress-wait 1.5s ease-in-out infinite; }

.redirect-status {
  min-height: 20px;
  margin: 0 0 20px;
  color: #7a8691;
  font-size: 12px;
}

.redirect-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: #111820;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 18px 36px rgba(17, 24, 32, .14);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.redirect-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 22px 42px rgba(17, 24, 32, .18); }
.redirect-button:active:not(:disabled) { transform: translateY(0); }
.redirect-button:focus-visible { outline: 3px solid rgba(54, 107, 255, .35); outline-offset: 4px; }
.redirect-button:disabled { cursor: wait; opacity: .46; box-shadow: none; }

.fallback-copy { margin: 14px 0 0; color: #98a2ab; font-size: 11px; }

noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 12px;
  border-radius: 10px;
  background: #111820;
  color: #fff;
  font-size: 12px;
  text-align: center;
}

@keyframes route-travel {
  from { transform: translateX(-105%); }
  to { transform: translateX(245%); }
}

@keyframes progress-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes progress-wait {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(405%); }
}

@media (max-height: 640px) {
  .redirect-page { place-items: start center; overflow-y: auto; }
  .route-mark { margin: 28px 0; }
  .progress { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .route-line i,
  .progress span.is-waiting { animation: none; transform: none; }
  .progress span.is-running { animation-duration: .01ms; }
  .redirect-button { transition: none; }
}
