/* ========== 基础 ========== */
:root {
  --bg: #05070d;
  --panel: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e6ebf4;
  --text-dim: #94a0b5;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #34d399;
  --radius: 18px;
  --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }

/* ========== 背景装饰 ========== */
#starfield { position: fixed; inset: 0; z-index: -4; }

.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: 0.17; pointer-events: none;
}
.bg-glow-a {
  width: 560px; height: 560px; background: var(--cyan); top: -180px; left: -120px;
  animation: drift-a 16s ease-in-out infinite alternate;
}
.bg-glow-b {
  width: 620px; height: 620px; background: var(--violet); top: -100px; right: -160px;
  animation: drift-b 20s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-140px, 100px) scale(0.9); } }

#cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -1;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.07), transparent 65%);
  pointer-events: none; opacity: 0; transition: opacity 0.6s;
}
.has-cursor-glow #cursor-glow { opacity: 1; }

/* ========== 导航 ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-end;
  max-width: var(--max); margin: 0 auto; padding: 18px 28px;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, padding 0.35s, box-shadow 0.35s;
}
.nav.scrolled {
  padding: 12px 28px;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: 0.4px; }
.brand-mark {
  font-family: "Cascadia Code", Consolas, monospace; font-size: 14px; font-weight: 700;
  padding: 4px 8px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #0b0f1a;
  box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  transition: box-shadow 0.3s, transform 0.3s;
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.55);
}
.brand-dot { color: var(--text-dim); font-weight: 500; }

.nav-links { display: flex; gap: 30px; font-size: 15px; }
.nav-links a { position: relative; color: var(--text-dim); padding: 4px 0; transition: color 0.25s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ========== Hero ========== */
main { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

.hero { position: relative; padding: 72px 0 56px; text-align: center; }

.hero-eyebrow {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px; letter-spacing: 4px; color: var(--cyan); margin-bottom: 22px;
}

.hero h1 { font-size: clamp(34px, 5.5vw, 58px); font-weight: 800; letter-spacing: 1px; line-height: 1.25; }

.grad {
  background: linear-gradient(120deg, var(--cyan), var(--violet), #f472b6, var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-flow 6s linear infinite;
}
@keyframes grad-flow { to { background-position: 300% 0; } }

.terminal {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 10px 22px;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 15px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 30px rgba(34, 211, 238, 0.04), 0 0 24px rgba(34, 211, 238, 0.06);
  min-height: 46px; min-width: 260px; justify-content: center;
}
.terminal-prompt { color: var(--cyan); }
#typewriter { color: var(--text); }
.terminal-caret {
  width: 8px; height: 18px; background: var(--cyan);
  animation: caret-blink 1s steps(1) infinite;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero-sub { margin: 24px auto 0; max-width: 680px; color: var(--text-dim); font-size: 15px; line-height: 2; }

.hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 30px; border-radius: 12px; font-size: 15px; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #0b0f1a;
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.22);
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(167, 139, 250, 0.4); }
.btn-primary:hover::after { left: 130%; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--panel); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 24px rgba(34, 211, 238, 0.15); }

.hero-stats { display: flex; justify-content: center; gap: 56px; margin-top: 56px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 26px; font-weight: 800; font-family: "Cascadia Code", Consolas, monospace; }
.stat-label { font-size: 13px; color: var(--text-dim); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1.5px solid var(--border); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
}
.scroll-hint span {
  width: 3px; height: 8px; border-radius: 3px; background: var(--cyan);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ========== 区块 ========== */
.section { padding: 56px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 28px; font-weight: 700; }
.section-head p { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

/* ========== 作品列表 ========== */
.plist { display: flex; flex-direction: column; gap: 26px; }

.prow {
  position: relative; display: flex; align-items: center; gap: 30px;
  padding: 32px 34px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.prow::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--accent, var(--cyan)), var(--violet));
  opacity: 0.38;
  transition: opacity 0.25s, width 0.25s;
}
.prow::after {
  content: ""; position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.prow:hover {
  transform: translateX(8px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.5);
}
.prow:hover::before { opacity: 1; width: 5px; }
.prow:hover::after { left: 120%; }

.accent-cyan { --accent: var(--cyan); }
.accent-violet { --accent: var(--violet); }
.accent-amber { --accent: var(--amber); }
.accent-green { --accent: var(--green); }

.prow-num {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 34px; font-weight: 800; line-height: 1; flex-shrink: 0;
  width: 76px; text-align: center; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent, var(--cyan)), rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.card-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #0b0f1a;
  background: linear-gradient(135deg, var(--accent, var(--cyan)), rgba(255, 255, 255, 0.65));
  transition: box-shadow 0.3s;
}

.prow-main { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.prow-title { font-size: 21px; font-weight: 700; }
.prow-tagline { color: var(--text-dim); font-size: 14px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag {
  font-size: 12px; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 6px;
}

.prow-arrow { color: var(--accent, var(--cyan)); flex-shrink: 0; }
.prow-arrow svg { width: 26px; height: 26px; transition: transform 0.25s; }
.prow:hover .prow-arrow svg { transform: translateX(6px); }

/* ========== 关于 ========== */
.about-card {
  padding: 36px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
}
.about-card h2 { font-size: 24px; margin-bottom: 14px; }
.about-card p { color: var(--text-dim); max-width: 720px; }
.about-note { margin-top: 12px; font-size: 14px; }

.contact-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.contact-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}
.contact-label { font-size: 13px; color: var(--text-dim); }
.contact-value {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px; font-weight: 600; color: var(--text);
  user-select: all;
}

/* ========== 页脚 ========== */
.footer {
  max-width: var(--max); margin: 40px auto 0; padding: 30px 28px 40px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: 13px;
}
.footer a:hover { color: var(--cyan); }

/* ========== 详情页 ========== */
.detail { padding-top: 40px; padding-bottom: 40px; }

.back-link { display: inline-block; color: var(--text-dim); font-size: 14px; margin-bottom: 26px; transition: color 0.2s; }
.back-link:hover { color: var(--cyan); }

.detail-head { display: flex; gap: 20px; align-items: center; margin-bottom: 34px; }
.detail-head .card-icon { width: 64px; height: 64px; font-size: 30px; border-radius: 16px; }
.detail-head h1 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; }
.detail-tagline { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 24px; }
.detail-side { position: sticky; top: 96px; }

.panel {
  padding: 26px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
}
.panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.panel h2::before { content: ""; display: inline-block; width: 4px; height: 14px; border-radius: 2px; background: var(--accent, var(--cyan)); margin-right: 10px; vertical-align: -2px; }

.desc { color: var(--text-dim); font-size: 15px; }

.features { list-style: none; }
.features li { position: relative; padding: 7px 0 7px 24px; color: var(--text-dim); font-size: 15px; }
.features li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--cyan));
}

.shots { display: grid; gap: 14px; }
.shot { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.shot-placeholder {
  aspect-ratio: 16 / 8; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.06), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 12px, transparent 12px 24px);
  color: var(--text-dim); font-size: 14px; text-align: center; line-height: 2;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: "Cascadia Code", Consolas, monospace; font-size: 13px;
  padding: 5px 14px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-dim);
}

.dl-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 16px; border-radius: 12px; margin-bottom: 12px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s;
}
a.dl-item:hover { border-color: var(--accent, var(--cyan)); }
.dl-label { font-weight: 600; font-size: 15px; width: 100%; }
.dl-type { font-size: 12px; color: var(--text-dim); }
.dl-note { font-size: 12px; color: var(--text-dim); }
.dl-btn {
  margin-left: auto; font-size: 13px; font-weight: 600; padding: 5px 16px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent, var(--cyan)), var(--violet)); color: #0b0f1a;
}
.is-pending .dl-btn { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.dl-empty { color: var(--text-dim); font-size: 14px; }

.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.meta dt { color: var(--text-dim); }
.meta dd { text-align: right; }

.not-found { text-align: center; padding: 100px 0; }
.not-found h1 { margin-bottom: 26px; }

/* ========== 动画 ========== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .grad, .bg-glow-a, .bg-glow-b, .terminal-caret, .scroll-hint span { animation: none; }
  #cursor-glow, #starfield { display: none; }
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* 手机端：列表行改为「序号在左上 + 内容占满」的两栏网格，隐藏箭头腾出宽度 */
@media (max-width: 640px) {
  .nav { padding: 14px 18px; }
  .nav.scrolled { padding: 10px 18px; }
  .nav-links { gap: 22px; font-size: 14px; }

  main { padding: 0 18px; }

  .hero { padding: 52px 0 44px; }
  .hero-eyebrow { font-size: 11px; letter-spacing: 3px; margin-bottom: 16px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 14px; line-height: 1.9; margin-top: 18px; }

  .section { padding: 40px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 22px; }
  .section-head p { font-size: 14px; }

  .plist { gap: 18px; }
  .prow {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 4px 16px;
    padding: 22px 20px;
  }
  .prow-num { width: auto; font-size: 24px; text-align: left; }
  .prow-main { grid-column: 2; gap: 6px; }
  .prow-title { font-size: 18px; }
  .prow-tagline { font-size: 13px; line-height: 1.6; }
  .card-tags { margin-top: 2px; gap: 6px; }
  .tag { font-size: 11px; padding: 2px 8px; }
  .prow-arrow { display: none; }

  .about-card { padding: 26px 22px; }
  .about-card h2 { font-size: 20px; }
  .about-card p { font-size: 14px; }
  .contact-row { gap: 10px; margin-top: 18px; }
  .contact-item { padding: 8px 14px; gap: 8px; }
  .contact-value { font-size: 13px; }

  .footer { margin: 28px auto 0; padding: 24px 18px 32px; }

  .detail { padding-top: 24px; }
  .back-link { margin-bottom: 18px; font-size: 13px; }
  .detail-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .detail-head .card-icon { width: 54px; height: 54px; font-size: 24px; border-radius: 14px; }
  .detail-head h1 { font-size: 24px; }
  .detail-tagline { font-size: 14px; }

  .detail-main, .detail-side { gap: 16px; }
  .panel { padding: 20px 18px; }
  .panel h2 { font-size: 16px; }
  .desc { font-size: 14px; }
  .features li { font-size: 14px; padding: 6px 0 6px 20px; }
  .features li::before { top: 15px; }
  .chips { gap: 8px; }
  .chip { font-size: 12px; padding: 4px 10px; }

  .dl-item { padding: 14px; }
  .dl-label { font-size: 14px; }
  .dl-btn { font-size: 12px; padding: 4px 14px; }
  .meta { font-size: 13px; gap: 6px 14px; }

  .not-found { padding: 64px 0; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 28px; }
  .prow { grid-template-columns: 40px 1fr; padding: 20px 16px; }
  .prow-num { font-size: 21px; }
  .prow-title { font-size: 17px; }
}
