:root {
  color-scheme: light dark;
  background: #0b1220;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0b1220;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.viewport {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  background: #fff;
}

.target-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.loading-layer,
.empty-state {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  color: #e7edf7;
  background:
    radial-gradient(circle at 50% 38%, rgba(46, 134, 255, 0.17), transparent 34%),
    #0b1220;
}

.loading-layer {
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.loading-layer.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-layer p {
  margin: 19px 0 0;
  color: rgba(231, 237, 247, 0.66);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.loading-mark {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 31px;
}

.loading-mark i {
  display: block;
  width: 6px;
  height: 13px;
  border-radius: 8px;
  background: #54a0ff;
  animation: loading-bars 850ms ease-in-out infinite alternate;
}

.loading-mark i:nth-child(2) {
  height: 25px;
  animation-delay: 180ms;
  background: #82b9ff;
}

.loading-mark i:nth-child(3) {
  height: 19px;
  animation-delay: 360ms;
}

@keyframes loading-bars {
  from {
    transform: scaleY(0.45);
    opacity: 0.45;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.empty-state {
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(90, 160, 255, 0.18), transparent 38%),
    #0b1220;
}

.empty-state h1 {
  margin: 23px 0 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 280px;
  margin: 0;
  color: rgba(231, 237, 247, 0.62);
  font-size: 14px;
  line-height: 1.7;
}

.empty-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.empty-mark span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65aaff;
}

.empty-mark span:nth-child(2) {
  background: #a8cdff;
}

.empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 22px;
  border-radius: 999px;
  color: #07111f;
  background: #eaf3ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.load-notice {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  z-index: 7;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #eef4ff;
  background: rgba(17, 27, 44, 0.94);
  box-shadow: 0 14px 50px rgba(2, 9, 19, 0.35);
  backdrop-filter: blur(16px);
}

.load-notice p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
}

.load-notice > div {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.notice-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #07111f;
  background: #e9f2ff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.notice-button.quiet {
  color: #dce8f9;
  background: rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .loading-mark i {
    animation: none;
  }

  .loading-layer {
    transition: none;
  }
}
