:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #000;
  color: #fff;
  --type-size: clamp(26px, 2.54vw, 38px);
  --dot-size: clamp(28px, 2.68vw, 40px);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  background: #000;
  -webkit-font-smoothing: antialiased;
}

.header {
  position: absolute;
  z-index: 1;
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
}

.github-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #aaa;
  color: #080808;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.github-button:hover { background: #d5d5d5; }
.github-button:active { transform: scale(.97); }
.github-button:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

.stage {
  position: relative;
  height: 73.6svh;
  min-height: 260px;
}

.wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: var(--type-size);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.045em;
}

.animated-text {
  display: block;
  flex: none;
  overflow: hidden;
  width: auto;
  transition: width 85ms cubic-bezier(.2, .7, .3, 1);
}

.dot {
  display: block;
  flex: 0 0 var(--dot-size);
  width: var(--dot-size);
  height: var(--dot-size);
  margin-left: 2px;
  border-radius: 50%;
  background: #fff;
}

.footer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: min(50.85%, 760px);
  min-height: 26.4svh;
  margin: 0 auto;
  padding: 24px;
  border-radius: clamp(28px, 3.5vw, 52px) clamp(28px, 3.5vw, 52px) 0 0;
  background: #1e1e1e;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: #aaa;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.beian-link img { flex-shrink: 0; object-fit: contain; }
.beian-link span { overflow-wrap: anywhere; }
.beian-link:hover { color: #fff; }
.beian-link:focus-visible { outline: 2px solid #fff; outline-offset: 5px; border-radius: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .header { top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right)); }
  .github-button { padding-inline: 16px; font-size: 13px; border-radius: 12px; }
  .footer-panel { width: calc(100% - 36px); padding: 20px; border-radius: 30px 30px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .animated-text, .github-button { transition: none; }
}
