:root {
  --ink: #10231f;
  --muted: #3d5a52;
  --accent: #0f8a6b;
  --glow: rgba(15, 138, 107, 0.28);
  --face: rgba(246, 250, 248, 0.78);
  --ring: rgba(16, 35, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 15% -10%, #c7efe3 0%, transparent 55%),
    radial-gradient(900px 600px at 95% 10%, #d9e8f2 0%, transparent 50%),
    linear-gradient(160deg, #eef6f2 0%, #dfece7 42%, #cfdfe0 100%);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 35, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 31, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 78%);
  animation: drift 18s ease-in-out infinite alternate;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: clamp(1rem, 3vh, 2rem) 1.25rem;
  text-align: center;
}

.brand {
  margin: 0;
  font-size: clamp(2rem, 6.2vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  animation: rise 0.8s ease both;
}

.analog {
  width: min(38vw, 260px);
  aspect-ratio: 1;
  margin: -0.35rem 0 0.85rem;
  animation: rise 0.85s ease 0.04s both;
  filter: drop-shadow(0 10px 28px rgba(15, 138, 107, 0.18));
}

.analog-face {
  display: block;
  width: 100%;
  height: 100%;
}

.analog-ring {
  fill: var(--face);
  stroke: var(--ring);
  stroke-width: 1.6;
}

.tick {
  stroke-linecap: round;
}

.tick-hour {
  stroke: var(--ink);
  stroke-width: 1.8;
}

.tick-minute {
  stroke: rgba(16, 35, 31, 0.22);
  stroke-width: 1;
}

.analog-numerals text {
  fill: var(--muted);
  font-size: 7px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  user-select: none;
}

.hand {
  stroke-linecap: round;
}

.hand-hour {
  stroke: var(--ink);
  stroke-width: 3.2;
}

.hand-minute {
  stroke: #1c4a40;
  stroke-width: 2.2;
}

.hand-second {
  stroke: #d62828;
  stroke-width: 1.15;
}

.analog-hub-ring {
  fill: var(--face);
  stroke: var(--ink);
  stroke-width: 0.7;
}

.analog-hub {
  fill: var(--accent);
}

.clock {
  display: block;
  margin: 0;
  font-family: "Cascadia Mono", "Consolas", "Menlo", "Courier New", monospace;
  font-size: clamp(2.2rem, 8.5vw, 5.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px var(--glow);
  animation: rise 0.9s ease 0.08s both, pulse 2.4s ease-in-out 1.2s infinite;
}

.support {
  margin: 0.15rem 0 0;
  max-width: 28ch;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--muted);
  animation: rise 1s ease 0.16s both;
}

.meta,
.timezone {
  margin: 0;
  max-width: 36rem;
  min-height: 1.35em;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
  animation: rise 1.1s ease 0.24s both;
}

.meta {
  margin-top: 0.35rem;
  font-size: 1.45rem;
}

.meta.is-error {
  color: #8a3b2b;
}

.timezone {
  font-size: 1rem;
  animation-delay: 0.28s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    text-shadow: 0 0 28px var(--glow);
  }
  50% {
    text-shadow: 0 0 52px rgba(15, 138, 107, 0.42);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -12px, 0);
  }
}

@media (max-width: 640px) {
  .stage {
    gap: 0.55rem;
    padding: 1.1rem 1rem 1.4rem;
  }

  .analog {
    width: min(68vw, 240px);
    margin: -0.2rem 0 0.7rem;
  }

  .support {
    font-size: 0.95rem;
  }

  .meta {
    font-size: 1.02rem;
  }

  .timezone {
    font-size: 0.92rem;
  }
}

@media (max-height: 720px) {
  .brand {
    font-size: clamp(1.7rem, 5vw, 3rem);
  }

  .analog {
    width: min(36vw, 210px);
  }

  .clock {
    font-size: clamp(1.9rem, 7vw, 3.6rem);
  }
}

@media (max-width: 640px) and (max-height: 720px) {
  .analog {
    width: min(62vw, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .brand,
  .analog,
  .clock,
  .support,
  .meta,
  .timezone {
    animation: none !important;
  }
}
