/* 茄子咔咔下载页：暗房气质，对齐桌面启动画面的光晕 / 光圈 / 颗粒。 */

:root {
  color-scheme: dark light;
  --bg: #0c0b10;
  --bg-deep: #07060a;
  --text: #f3f1f8;
  --text-2: rgba(243, 241, 248, 0.66);
  --text-3: rgba(243, 241, 248, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(28, 26, 36, 0.55);
  --button: #f3f1f8;
  --button-text: #0c0b10;
  --button-ghost: transparent;
  --icon-glow: rgba(139, 92, 246, 0.45);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --bg-deep: #ececf0;
    --text: #1d1d1f;
    --text-2: rgba(29, 29, 31, 0.62);
    --text-3: rgba(29, 29, 31, 0.4);
    --line: rgba(29, 29, 31, 0.1);
    --line-strong: rgba(29, 29, 31, 0.16);
    --surface: rgba(255, 255, 255, 0.7);
    --button: #1d1d1f;
    --button-text: #f5f5f7;
    --icon-glow: rgba(109, 40, 217, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font: 15px / 1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 全幅氛围层 ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, #17131f 0%, transparent 55%),
    var(--bg-deep);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform, opacity;
}

.glow.violet {
  top: 8%;
  left: 50%;
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  background: radial-gradient(circle at 42% 42%, #8b5cf6 0%, #5b21b6 48%, transparent 72%);
  opacity: 0.72;
  transform: translateX(-52%);
  animation: drift-center 14s ease-in-out infinite;
}

.glow.amber {
  top: 42%;
  right: -8%;
  width: min(360px, 70vw);
  height: min(360px, 70vw);
  background: radial-gradient(circle, #f59e0b 0%, #b45309 46%, transparent 72%);
  opacity: 0.38;
  animation: drift 18s ease-in-out infinite reverse;
}

.glow.rose {
  bottom: -12%;
  left: -6%;
  width: min(340px, 65vw);
  height: min(340px, 65vw);
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  opacity: 0.32;
  animation: drift 16s ease-in-out infinite;
  animation-delay: -4s;
}

.lens {
  position: absolute;
  top: 18%;
  left: 50%;
  width: min(420px, 78vw);
  height: min(420px, 78vw);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--bg-deep) 0 22%, transparent 22.5%),
    repeating-conic-gradient(from 12deg, rgba(255, 255, 255, 0.1) 0 1.2deg, transparent 1.2deg 60deg),
    radial-gradient(circle, transparent 0 46%, rgba(255, 255, 255, 0.06) 47% 49%, transparent 50%),
    conic-gradient(
      from 210deg,
      rgba(196, 181, 253, 0.32),
      rgba(91, 33, 182, 0.08),
      rgba(245, 158, 11, 0.28),
      rgba(236, 72, 153, 0.18),
      rgba(196, 181, 253, 0.32)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 48px rgba(0, 0, 0, 0.55),
    0 36px 72px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  opacity: 0.55;
  animation: turn 36s linear infinite;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("./assets/grain.svg");
  mix-blend-mode: overlay;
  opacity: 0.2;
}

@media (prefers-color-scheme: light) {
  .glow.violet { opacity: 0.38; }
  .glow.amber { opacity: 0.22; }
  .glow.rose { opacity: 0.18; }
  .lens { opacity: 0.28; }
  .grain { opacity: 0.12; mix-blend-mode: multiply; }
}

/* ---------- 内容 ---------- */
main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(14vh, 72px) 0 64px;
  text-align: center;
}

.icon {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  outline: 1px solid rgba(255, 255, 255, 0.14);
  outline-offset: -1px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 22px 56px var(--icon-glow),
    0 8px 24px rgba(0, 0, 0, 0.4);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

h1 {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-wrap: balance;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.tagline {
  max-width: 28em;
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
  word-break: keep-all;
  line-break: strict;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  border-color: transparent;
  background: var(--button);
  color: var(--button-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.button.primary:hover {
  opacity: 0.92;
  border-color: transparent;
}

.version {
  margin: 18px 0 0;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

/* ---------- 折叠信息 ---------- */
.more {
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  padding: 18px 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  float: right;
  color: var(--text-3);
  font-weight: 400;
  content: "+";
  transition: transform 0.2s ease, color 0.15s ease;
}

details[open] summary::after {
  content: "−";
  color: var(--text-2);
}

summary:hover {
  color: var(--text);
}

details p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

details p:last-child {
  margin-bottom: 20px;
}

code {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  font: 11.5px / 1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  color: var(--text-2);
}

@media (prefers-color-scheme: light) {
  code {
    background: rgba(26, 21, 36, 0.06);
  }
}

footer {
  margin-top: auto;
  padding: 48px 0 36px;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ---------- 动效 ---------- */
@keyframes turn {
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.04); }
}

@keyframes drift-center {
  0%, 100% { transform: translateX(-52%) translate(0, 0) scale(1); }
  50% { transform: translateX(-52%) translate(8px, -14px) scale(1.05); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lens,
  .glow,
  .icon,
  h1,
  .tagline,
  .actions,
  .version {
    animation: none;
  }

  .icon,
  h1,
  .tagline,
  .actions,
  .version {
    opacity: 1;
    transform: none;
  }

  .button {
    transition: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: max(10vh, 56px);
    padding-bottom: 48px;
  }

  .icon {
    width: 104px;
    height: 104px;
    border-radius: 24px;
  }

  .button {
    width: 100%;
  }

  .lens {
    top: 12%;
    opacity: 0.4;
  }
}
