:root {
  --space: #070914;
  --space-deep: #02030a;
  --ink: #f5f2e9;
  --muted: #a9afbe;
  --acid: #dcff55;
  --line: rgba(245, 242, 233, 0.18);
  --unit: 8px;
  --display-font: "SimHei", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --body-font: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow: hidden;
  background: var(--space-deep);
  color: var(--ink);
  font-family: var(--body-font);
}

.screen {
  isolation: isolate;
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 100% 72% at 50% 50%, rgba(32, 44, 112, 0.55) 0%, rgba(7, 9, 20, 0) 68%),
    linear-gradient(155deg, #101534 0%, var(--space) 50%, #03040b 100%);
}

.sky-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: #02030a;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: .04em;
}

.brand {
  margin: 0;
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .07em;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  content: "";
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  text-align: center;
}

.orbit {
  position: relative;
  display: grid;
  width: min(73vw, 318px);
  aspect-ratio: 1;
  place-items: center;
}

.orbit::before, .orbit::after {
  position: absolute;
  border: 1px solid rgba(245, 242, 233, .2);
  border-radius: 50%;
  content: "";
}

.orbit::before { inset: 5%; }
.orbit::after { inset: 18%; border-color: rgba(220, 255, 85, .35); transform: rotateX(64deg) rotateZ(-15deg); }

.signal {
  position: absolute;
  top: 9%;
  right: 13%;
  width: 9px;
  height: 9px;
  background: var(--acid);
  box-shadow: 0 0 16px 4px rgba(220, 255, 85, .72);
  animation: blink 1.8s ease-in-out infinite;
}

.moon-orbit {
  position: absolute;
  inset: -6%;
  animation: orbit 18s linear infinite;
}

.moon {
  position: absolute;
  top: 0;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 8px rgba(245, 240, 197, .52));
}

.moon-core {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ded6ad;
  clip-path: polygon(27% 0, 73% 0, 73% 8%, 87% 8%, 87% 21%, 100% 21%, 100% 73%, 87% 73%, 87% 87%, 73% 87%, 73% 100%, 27% 100%, 27% 92%, 13% 92%, 13% 79%, 0 79%, 0 27%, 13% 27%, 13% 13%, 27% 13%);
  animation: moon-turn 8s linear infinite;
}


.dog-frame {
  display: grid;
  width: 55%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 18px rgba(220, 255, 85, .035), 0 20px 48px rgba(0, 0, 0, .38);
}

.dog {
  display: block;
  width: 84%;
  height: auto;
  image-rendering: pixelated;
  animation: spin 20s linear infinite;
  filter: brightness(1.2) contrast(1.08) drop-shadow(0 0 12px rgba(245, 242, 233, .36));
}

h1 {
  max-width: 360px;
  margin: 16px 0 8px;
  font-family: var(--display-font);
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.045em;
  text-shadow: 2px 2px 0 rgba(220, 255, 85, .16);
  text-wrap: pretty;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: .04em;
}

.actions {
  display: grid;
  width: 100%;
  gap: 12px;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 0;
  color: rgba(169, 175, 190, .58);
  font-size: 11px;
  letter-spacing: .03em;
}

.legal-links button {
  min-height: auto;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(169, 175, 190, .3);
  text-underline-offset: 3px;
}

.legal-links button:hover, .legal-links button:focus-visible {
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.agreement-notice {
  margin: -5px 0 0;
  color: rgba(169, 175, 190, .58);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .03em;
  text-align: center;
}

button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: rgba(245, 242, 233, .035);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

button:active { transform: scale(.975); }
button:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

.register {
  border-color: var(--ink);
  color: #070914;
  background: var(--ink);
  box-shadow: 4px 4px 0 rgba(220, 255, 85, .68);
}

.login:hover, .login:focus-visible { border-color: rgba(245, 242, 233, .55); background: rgba(245, 242, 233, .1); }
.register:hover, .register:focus-visible { background: #ffffff; box-shadow: 6px 6px 0 rgba(220, 255, 85, .82); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes moon-turn { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .35; transform: scale(.72); } }

@media (min-width: 700px) {
  .screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 350px);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: clamp(48px, 9vw, 160px);
    align-items: center;
    padding-right: clamp(48px, 9vw, 150px);
    padding-left: clamp(48px, 9vw, 150px);
  }

  .masthead { grid-column: 1 / -1; grid-row: 1; }

  .main {
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    margin-top: 0;
    text-align: center;
  }

  .orbit { width: min(31vw, 350px); }

  h1 { max-width: 560px; font-size: clamp(42px, 4.4vw, 64px); text-align: center; }

  .actions {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    margin: 0;
    align-self: center;
    grid-template-columns: 1fr;
  }

  .legal-links, .agreement-notice { text-align: left; }
  .legal-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
