:root {
  --bg: #0b0f1a;
  --bg-card: #141a28;
  --bg-card-2: #1b2233;
  --border: #232c40;
  --text: #e8edf7;
  --text-dim: #94a3b8;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --ok: #34d399;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(1200px 600px at 50% -10%, #16203a 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 48px 24px 72px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
}

header.page-head {
  text-align: center;
  margin-bottom: 40px;
}

header.page-head h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header.page-head p {
  color: var(--text-dim);
  margin: 0 auto;
  max-width: 620px;
  font-size: 15px;
}

.badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(110, 231, 255, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms ease, transform 200ms ease;
}

.card:hover {
  border-color: #34425f;
  transform: translateY(-2px);
}

.preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120px 120px at 50% 50%, rgba(110,231,255,0.05), transparent 70%),
    #0e1422;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
}

.card h2 {
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 600;
}

.card .desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
  flex: 1;
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(110, 231, 255, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  font-family: inherit;
}

.copy-btn:hover { background: rgba(110, 231, 255, 0.16); border-color: #345; }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied { background: rgba(52, 211, 153, 0.16); color: var(--ok); border-color: rgba(52,211,153,0.4); }

footer.page-foot {
  text-align: center;
  margin-top: 48px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ============ 1. 旋转圆环 ============ */
.spinner-ring {
  width: 50px; height: 50px;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ring-spin 0.9s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ============ 2. 脉冲圆点 ============ */
.pulse-dot {
  width: 50px; height: 50px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(0.55); opacity: 0.45; }
  50%      { transform: scale(1);    opacity: 1; }
}

/* ============ 3. 弹跳柱条 ============ */
.bars { display: flex; gap: 6px; align-items: flex-end; height: 56px; }
.bars span {
  width: 9px; height: 100%;
  background: var(--ok);
  border-radius: 5px;
  transform-origin: bottom;
  animation: bar-bounce 1s ease-in-out infinite;
}
.bars span:nth-child(2) { animation-delay: 0.15s; }
.bars span:nth-child(3) { animation-delay: 0.30s; }
.bars span:nth-child(4) { animation-delay: 0.45s; }
.bars span:nth-child(5) { animation-delay: 0.60s; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

/* ============ 4. 波纹圆圈 ============ */
.ripple { position: relative; width: 56px; height: 56px; }
.ripple span {
  position: absolute; inset: 0;
  border: 3px solid #f472b6;
  border-radius: 50%;
  animation: ripple-out 1.8s ease-out infinite;
}
.ripple span:nth-child(2) { animation-delay: 0.6s; }
.ripple span:nth-child(3) { animation-delay: 1.2s; }
@keyframes ripple-out {
  0%   { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(1);   opacity: 0; }
}

/* ============ 5. 渐变锥形旋转器 ============ */
.conic {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, #fbbf24 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
  animation: ring-spin 1s linear infinite;
}

/* ============ 6. 打字指示器 ============ */
.typing { display: flex; gap: 7px; }
.typing span {
  width: 11px; height: 11px;
  background: #60a5fa;
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0);     opacity: 0.4; }
  30%           { transform: translateY(-12px); opacity: 1;   }
}

/* ============ 7. 骨架屏微光 ============ */
.skeleton {
  width: 150px; height: 70px;
  background: #1b2233;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ============ 8. DNA 双螺旋 ============ */
.dna {
  position: relative;
  width: 46px; height: 70px;
  perspective: 240px;
}
.dna span {
  position: absolute;
  left: 50%; top: 0;
  width: 42px; height: 6px;
  margin-left: -21px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f87171, #22d3ee);
  transform-style: preserve-3d;
  animation: dna-rotate 1.6s linear infinite;
}
.dna span:nth-child(1) { top: 0;  animation-delay: -0.000s; }
.dna span:nth-child(2) { top: 7px; animation-delay: -0.178s; }
.dna span:nth-child(3) { top: 14px; animation-delay: -0.356s; }
.dna span:nth-child(4) { top: 21px; animation-delay: -0.533s; }
.dna span:nth-child(5) { top: 28px; animation-delay: -0.711s; }
.dna span:nth-child(6) { top: 35px; animation-delay: -0.889s; }
.dna span:nth-child(7) { top: 42px; animation-delay: -1.067s; }
.dna span:nth-child(8) { top: 49px; animation-delay: -1.244s; }
.dna span:nth-child(9) { top: 56px; animation-delay: -1.422s; }
.dna span:nth-child(10){ top: 63px; animation-delay: -1.600s; }
@keyframes dna-rotate {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* ============ 无障碍：尊重 prefers-reduced-motion ============ */
@media (prefers-reduced-motion: reduce) {
  .spinner-ring,
  .pulse-dot,
  .bars span,
  .ripple span,
  .conic,
  .typing span,
  .skeleton::after,
  .dna span {
    animation: none !important;
  }
  .spinner-ring { border-top-color: var(--accent); opacity: 0.6; }
  .pulse-dot { transform: scale(0.85); opacity: 0.7; }
  .bars span { transform: scaleY(0.6); }
  .typing span { transform: translateY(-4px); opacity: 0.8; }
  .typing span:nth-child(2),
  .typing span:nth-child(3) { transform: translateY(0); }
  .ripple span { opacity: 0.35; }
  .dna span { transform: rotateY(40deg); }
  .skeleton::after { opacity: 0.4; }
}
