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

:root {
  --bg-deep: #0f0a1a;
  --bg-mid: #1a1030;
  --accent: #a78bfa;
  --text-muted: rgba(255, 255, 255, 0.55);
}

html,
body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(6, 182, 212, 0.15), transparent),
    linear-gradient(165deg, var(--bg-deep), var(--bg-mid));
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem 5rem;
}

.trigger {
  position: relative;
  display: inline-flex;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.center-image {
  display: block;
  max-width: min(72vw, 280px);
  height: auto;
}

.overlay-image {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  max-width: none;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.9) rotate(-3deg);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay-image.active {
  opacity: 1;
  transform: translateX(-50%) scale(1.05) rotate(0deg);
}

.hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.counter {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.counter #clickCount {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: linear-gradient(to top, rgba(15, 10, 26, 0.95), transparent);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}
