:root {
  color-scheme: dark;
  --bg: #050608;
  --surface: rgba(17, 20, 26, 0.78);
  --surface-raised: rgba(24, 29, 37, 0.88);
  --surface-panel: rgba(10, 14, 20, 0.74);
  --text: #f6f7f9;
  --muted: #a4adba;
  --faint: rgba(246, 247, 249, 0.52);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --blue: #3b82f6;
  --cyan: #35d5e8;
  --green: #22c55e;
  --yellow: #e7b84a;
  --red: #ef4444;
  --ink: #07080b;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 8px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #070a0e 0%, #050608 42%, #07080b 100%);
  background-size: 64px 64px, 64px 64px, auto;
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: geometricPrecision;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  color: #d8fbff;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.16);
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 760;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--border);
}

.topbar__nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 28px);
}

.topbar__nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 680;
}

.topbar__nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: nowrap;
}

.status-pill[data-state="ok"] {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.42);
}

.status-pill[data-state="fail"] {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.42);
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 44px) 64px;
}

.hero {
  position: relative;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.82fr);
  gap: 52px;
  align-items: center;
  padding: 82px 0 82px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero__copy {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 22px;
  max-width: 660px;
  font-family: var(--display);
  font-size: 4.35rem;
  line-height: 1.02;
  font-weight: 800;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero__lead {
  max-width: 610px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  position: relative;
  width: 100%;
  min-height: 454px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 34px 26px 22px;
  z-index: 1;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: 24px 0 28px;
  background:
    linear-gradient(150deg, rgba(53, 213, 232, 0.1), transparent 36%),
    linear-gradient(330deg, rgba(231, 184, 74, 0.12), transparent 42%),
    var(--surface-panel);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 26px 78px rgba(0, 0, 0, 0.34);
  opacity: 0.96;
  z-index: -2;
}

.hero__visual::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 112px;
  height: 34px;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.72;
  z-index: -1;
}

.hero__pet {
  width: min(330px, 92%);
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.48));
}

.hero__dock {
  position: relative;
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: var(--radius);
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 34px rgba(0, 0, 0, 0.3);
  transform: translateY(-6px);
}

.hero__dock span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.hero__dock span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.hero__dock [data-state="standby"] {
  color: var(--blue);
}

.hero__dock [data-state="working"] {
  color: var(--yellow);
}

.hero__dock [data-state="completed"] {
  color: var(--green);
}

.hero__dock [data-state="attention"] {
  color: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 760;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 100ms ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.btn--primary {
  color: #031015;
  background: linear-gradient(180deg, #5ce7f4, var(--cyan));
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.16);
}

.btn--primary:hover:not(:disabled) {
  background: #67e8f9;
}

.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.btn--small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.section {
  padding: 74px 0;
  border-bottom: 1px solid var(--border);
}

.section--tight {
  padding-top: 58px;
}

.section__head {
  max-width: 660px;
  margin-bottom: 28px;
}

.section__head h2,
.claim-panel h2,
.petdex-copy h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 2.85rem;
  line-height: 1.08;
  font-weight: 800;
}

.section__head p,
.claim-panel p,
.petdex-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

.download-grid,
.feature-grid,
.support-grid {
  display: grid;
  gap: 16px;
}

.download-grid,
.support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-card,
.feature-card,
.claim-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.download-card {
  position: relative;
  min-height: 232px;
  display: grid;
  align-content: space-between;
  gap: 26px;
  padding: 24px;
  overflow: hidden;
}

.download-card.is-recommended {
  border-color: rgba(53, 213, 232, 0.42);
  background:
    linear-gradient(145deg, rgba(53, 213, 232, 0.11), transparent 58%),
    var(--surface);
}

.download-card.is-recommended::after {
  content: "当前设备";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 8px;
  border: 1px solid rgba(53, 213, 232, 0.32);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(53, 213, 232, 0.08);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.download-card__kicker {
  margin: 0 0 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.download-card h3,
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.download-card p,
.feature-card p {
  margin: 0;
  color: var(--muted);
}

.download-card__file {
  margin-top: 14px !important;
  color: var(--faint) !important;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.claim-section {
  padding: 76px 0;
}

.claim-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
  gap: 30px;
  align-items: start;
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(135deg, rgba(231, 184, 74, 0.08), transparent 42%),
    rgba(17, 20, 26, 0.84);
}

.claim-form {
  display: grid;
  gap: 10px;
}

.claim-form label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.claim-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.claim-form input {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
  color: var(--text);
  background: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  font-family: var(--mono);
}

.claim-form input:focus {
  border-color: rgba(34, 211, 238, 0.64);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-message.is-error {
  color: #fecaca;
}

.activation-result {
  grid-column: 2;
  padding: 14px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: var(--radius);
  background: rgba(34, 197, 94, 0.08);
}

.activation-result span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.activation-result__code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.activation-result code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 700;
}

.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(53, 213, 232, 0.08), transparent 58%),
    var(--surface);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.support-card__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.support-card h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.28rem;
  overflow-wrap: anywhere;
}

.support-card .btn {
  flex: 0 0 auto;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(53, 213, 232, 0.76), rgba(231, 184, 74, 0.46), transparent 74%);
}

.petdex-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: center;
}

.petdex-copy {
  max-width: 650px;
}

.petdex-copy .hero__actions {
  margin-top: 22px;
}

.petdex-preview {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(34, 197, 94, 0.08), transparent 52%),
    var(--surface);
  overflow: hidden;
}

.petdex-preview::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: var(--radius);
  pointer-events: none;
}

.petdex-sprite {
  position: relative;
  width: min(250px, 72%);
  aspect-ratio: 1;
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.48));
  animation: petdex-float 8s ease-in-out infinite;
}

.petdex-sprite__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: petdex-frame 6.5s steps(1, end) infinite;
  animation-delay: calc(var(--frame) * 0.5s);
  animation-fill-mode: both;
}

.petdex-sprite__frame:first-child {
  opacity: 1;
}

@keyframes petdex-frame {
  0%,
  7.68% {
    opacity: 1;
  }
  7.69%,
  100% {
    opacity: 0;
  }
}

@keyframes petdex-float {
  0% {
    transform: translateX(-4px) translateY(0) rotate(-1.4deg);
  }
  36% {
    transform: translateX(5px) translateY(-9px) rotate(1.8deg);
  }
  68% {
    transform: translateX(2px) translateY(-2px) rotate(-0.6deg);
  }
  100% {
    transform: translateX(-4px) translateY(0) rotate(-1.4deg);
  }
}

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 48px) 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer span {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 920px) {
  .topbar__nav {
    display: none;
  }

  .hero {
    display: block;
    min-height: auto;
    padding: 58px 0 54px;
  }

  .hero h1 {
    max-width: 620px;
    font-size: 3.35rem;
  }

  .hero__lead {
    max-width: 620px;
    font-size: 1.04rem;
  }

  .hero__visual {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(410px, 100%);
    min-height: 424px;
    margin: 38px auto 0;
    padding: 30px 22px 20px;
  }

  .download-grid,
  .claim-panel,
  .feature-grid,
  .support-grid,
  .petdex-section {
    grid-template-columns: 1fr;
  }

  .activation-result {
    grid-column: auto;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section__head h2,
  .claim-panel h2,
  .petdex-copy h2 {
    font-size: 2.45rem;
  }
}

@media (max-width: 620px) {
  main {
    padding-inline: 16px;
  }

  .topbar {
    padding-inline: 16px;
  }

  .status-pill {
    display: none;
  }

  .hero__visual {
    width: min(300px, 100%);
    min-height: 350px;
    margin-top: 24px;
    padding: 24px 12px 14px;
    gap: 10px;
  }

  .hero__visual::before {
    inset: 14px 0 18px;
    background:
      linear-gradient(150deg, rgba(53, 213, 232, 0.08), transparent 38%),
      linear-gradient(330deg, rgba(231, 184, 74, 0.1), transparent 44%),
      var(--surface-panel);
    border-color: rgba(255, 255, 255, 0.045);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  }

  .hero__visual::after {
    left: 18%;
    right: 18%;
    bottom: 88px;
    height: 24px;
    filter: blur(14px);
  }

  .hero__pet {
    width: min(250px, 100%);
  }

  .hero__dock {
    width: min(286px, 100%);
    gap: 6px;
    padding: 6px;
    transform: translateY(-4px);
  }

  .hero__dock span {
    min-height: 28px;
    gap: 5px;
    font-size: 0.64rem;
  }

  .hero__dock span::before {
    width: 7px;
    height: 7px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero h1 span {
    white-space: normal;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .section__head h2,
  .claim-panel h2,
  .petdex-copy h2 {
    font-size: 2.05rem;
  }

  .claim-form__row,
  .activation-result__code-row {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .support-card {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .petdex-preview {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petdex-sprite,
  .petdex-sprite__frame {
    animation: none;
  }

  .petdex-sprite__frame {
    opacity: 0;
  }

  .petdex-sprite__frame:first-child {
    opacity: 1;
  }
}
