/* ============================================================
   Charlin · Personal Site — Design System
   科技感暗色主题：深空背景 + 青/紫渐变 + 玻璃拟态
   ============================================================ */
:root {
  --bg: #06070c;
  --bg-2: #0b0d16;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #e8eaf2;
  --text-dim: #9aa1b5;
  --text-faint: #5b6178;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --gradient: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));
  --font-sans: "Space Grotesk", "Noto Sans SC", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(139, 92, 246, 0.4); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ 开场遮罩（揭幕动画） ============ */
.intro {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: #04050a;
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.9s;
}
.intro.is-done {
  transform: translateY(-100%);
  visibility: hidden;
}
.intro.is-skip { display: none; }
.intro__inner { text-align: center; }
.intro__logo {
  font-family: var(--font-mono); font-size: clamp(34px, 5vw, 52px); font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: introLogoIn 0.7s var(--ease-out) both;
}
@keyframes introLogoIn { from { opacity: 0; transform: translateY(14px) scale(0.94); } }
.intro__bar {
  width: min(260px, 60vw); height: 2px;
  margin: 26px auto 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.intro__bar span {
  display: block; height: 100%; width: 0;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
  animation: introBar 1s var(--ease-out) 0.15s forwards;
}
@keyframes introBar { to { width: 100%; } }
.intro__hint {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4em;
  color: var(--text-faint);
  animation: introLogoIn 0.7s var(--ease-out) 0.25s both;
}

/* ============ 顶部滚动进度条（Linear 风格指示器） ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 1000;
  height: 2px; width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--gradient);
}
.scroll-progress__glow {
  position: absolute; right: 0; top: 50%;
  width: 90px; height: 10px;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.8), transparent);
  filter: blur(3px);
}

/* ============ 导航栏 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 64px);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.is-scrolled {
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  padding-top: 10px; padding-bottom: 10px;
}
.nav__logo {
  font-family: var(--font-mono); font-weight: 600; font-size: 17px;
  letter-spacing: 0.02em;
}
.nav__logo-bracket { color: var(--cyan); }
.nav__links {
  position: relative;
  display: flex; gap: 6px;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.nav__link {
  position: relative; z-index: 2;
  padding: 6px 16px;
  font-size: 13.5px; color: var(--text-dim);
  border-radius: 999px;
  transition: color 0.25s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
/* 滑动指示器（Linear 风格） */
.nav__indicator {
  position: absolute; z-index: 1; top: 6px; left: 0;
  height: calc(100% - 12px); width: 0;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35), 0 0 18px rgba(139, 92, 246, 0.25);
  opacity: 0;
  transition: left 0.35s var(--ease-spring), width 0.35s var(--ease-spring), opacity 0.2s;
}
.nav__indicator.is-visible { opacity: 1; }
.nav__cta { font-size: 13px; }

/* ============ 按钮（Luma 悬停跟随光效 + 磁吸） ============ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px;
  border-radius: 12px;
  font-size: 14.5px; font-weight: 500;
  transition: transform 0.25s var(--ease-out), box-shadow 0.3s;
  will-change: transform;
}
.btn--primary {
  background: var(--gradient);
  color: #0a0a12;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover { box-shadow: 0 6px 34px rgba(139, 92, 246, 0.55); }
.btn--ghost {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn--ghost:hover { border-color: rgba(139, 92, 246, 0.5); }
.btn__label { position: relative; z-index: 2; }
/* 跟随鼠标的径向高光 */
.btn__glow {
  position: absolute; z-index: 1; inset: 0;
  background: radial-gradient(120px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(255, 255, 255, 0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.btn:hover .btn__glow { opacity: 1; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px clamp(20px, 7vw, 96px) 80px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Horizon 风格引导渐变：缓慢旋转的锥形渐变光晕 */
.hero__gradient {
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(34, 211, 238, 0.10), rgba(139, 92, 246, 0.14),
    rgba(236, 72, 153, 0.10), rgba(34, 211, 238, 0.10));
  filter: blur(90px);
  animation: gradientSpin 26s linear infinite;
  pointer-events: none;
}
@keyframes gradientSpin { to { transform: rotate(360deg); } }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; max-width: 900px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.28em;
  color: var(--cyan);
  padding: 8px 16px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  margin-bottom: 28px;
}
.hero__eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 50% { opacity: 0.35; } }
.hero__title {
  font-size: clamp(40px, 7.5vw, 88px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero__title-line { display: block; }
.hero__title em { font-style: normal; color: var(--cyan); }
.hero__title-gradient {
  background: var(--gradient);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradient 5s ease-in-out infinite;
}
@keyframes textGradient { 50% { background-position: 100% 0; } }
.hero__type {
  margin-top: 26px;
  font-family: var(--font-mono); font-size: clamp(14px, 1.6vw, 17px);
  color: var(--text-dim);
  min-height: 1.8em;
}
.hero__caret {
  display: inline-block; width: 9px; height: 1.15em;
  vertical-align: text-bottom; margin-left: 3px;
  background: var(--cyan);
  animation: caretBlink 0.9s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.hero__actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.hero__scroll-hint {
  position: absolute; left: 50%; bottom: 34px;
  width: 24px; height: 40px;
  transform: translateX(-50%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}
.hero__scroll-hint span {
  position: absolute; left: 50%; top: 8px;
  width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--cyan);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 60% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(14px); opacity: 0; } }

/* 入场 stagger 动画（--d 为各元素延迟；开场遮罩播放时统一推迟 1.25s） */
.reveal { opacity: 0; transform: translateY(26px); animation: revealUp 0.9s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
body.intro-playing .hero .reveal { animation-delay: calc(var(--d, 0s) + 1.25s); }
.hero__eyebrow.reveal { --d: 0.10s; }
.hero__title .reveal:nth-child(1) { --d: 0.18s; }
.hero__title .reveal:nth-child(2) { --d: 0.30s; }
.hero__title .reveal:nth-child(3) { --d: 0.42s; }
.hero__type.reveal { --d: 0.55s; }
.hero__actions.reveal { --d: 0.70s; }
@keyframes revealUp { to { opacity: 1; transform: none; } }
/* 兜底：JS 超时强制终态（与动画终态一致，正常时无感） */
.hero .reveal.is-revealed { opacity: 1; transform: none; }

/* ============ 通用 Section ============ */
.section { padding: 110px clamp(20px, 7vw, 96px) 40px; max-width: 1280px; margin: 0 auto; }
.section__head { position: relative; margin-bottom: 48px; }
.section__index {
  font-family: var(--font-mono); font-size: 13px; color: var(--violet);
  letter-spacing: 0.2em;
}
.section__title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -0.01em; }
.section__sub {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.32em;
  color: var(--text-faint); margin-top: 4px;
}
.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 滚动虚化渐显（mortiva 参考：先虚化，逐段清晰） */
.blur-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), filter 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.blur-reveal.is-inview { opacity: 1; filter: blur(0); transform: none; }

/* ============ 个人简介 ============ */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.about__bio { padding: 34px; }
.about__bio h3 { font-size: 26px; }
.about__title {
  font-family: var(--font-mono); font-size: 13px; color: var(--cyan);
  margin: 6px 0 16px;
}
.about__text { color: var(--text-dim); font-size: 15px; }
.about__socials { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.about__socials a {
  font-family: var(--font-mono); font-size: 12.5px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  transition: all 0.25s;
}
.about__socials a:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); transform: translateY(-2px); }
.about__skills { padding: 30px 34px; display: flex; flex-direction: column; gap: 18px; }
.skill__row { display: flex; flex-direction: column; gap: 7px; }
.skill__meta { display: flex; justify-content: space-between; font-size: 13.5px; }
.skill__meta span:last-child { font-family: var(--font-mono); color: var(--text-faint); font-size: 12px; }
.skill__bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.skill__fill {
  height: 100%; width: 0;
  border-radius: 3px;
  background: var(--gradient);
  transition: width 1.2s var(--ease-out) 0.2s;
}
.is-inview .skill__fill { width: var(--level); }

/* ============ 项目展示 ============ */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.project-card {
  position: relative;
  padding: 28px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}
.project-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%),
              rgba(139, 92, 246, 0.12), transparent 55%);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.project-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.project-card__name { font-size: 19px; font-weight: 600; }
.project-card__stars {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  display: flex; align-items: center; gap: 5px;
}
.project-card__stars svg { fill: #facc15; }
.project-card__summary { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.18);
}
.tag--violet { background: rgba(139, 92, 246, 0.08); color: #b79dfd; border-color: rgba(139, 92, 246, 0.2); }

/* ============ 随笔列表 ============ */
.essays { display: flex; flex-direction: column; gap: 14px; }
.essay-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 22px; align-items: center;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}
.essay-row:hover { border-color: rgba(34, 211, 238, 0.35); background: rgba(255, 255, 255, 0.055); transform: translateX(6px); }
.essay-row__date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.essay-row__title { font-size: 17px; font-weight: 600; margin-bottom: 4px; transition: color 0.25s; }
.essay-row:hover .essay-row__title { color: var(--cyan); }
.essay-row__summary { font-size: 13.5px; color: var(--text-dim); }
.essay-row__source {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--violet);
  margin-top: 6px; display: inline-block;
}
.essay-row__meta { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.essay-row__arrow { display: inline-block; margin-top: 8px; transition: transform 0.3s var(--ease-out); color: var(--cyan); }
.essay-row:hover .essay-row__arrow { transform: translateX(6px); }

/* ============ 知识沉淀 ============ */
.knowledge { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.knowledge-card { padding: 28px; border-radius: 20px; background: var(--panel); border: 1px solid var(--panel-border); cursor: pointer; transition: transform 0.35s var(--ease-out), border-color 0.3s; }
.knowledge-card:hover { transform: translateY(-6px); border-color: rgba(236, 72, 153, 0.35); }
.knowledge-card:hover .knowledge-card__title { color: var(--pink); }
.knowledge-card__cat {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--pink);
  padding: 4px 10px; border-radius: 6px;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.2);
  margin-bottom: 14px;
}
.knowledge-card__title { font-size: 17.5px; font-weight: 600; margin-bottom: 8px; }
.knowledge-card__summary { font-size: 13.5px; color: var(--text-dim); margin-bottom: 16px; }
.knowledge-card__points { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.knowledge-card__points li { font-size: 13px; color: var(--text-dim); padding-left: 18px; position: relative; }
.knowledge-card__points li::before { content: "▸"; position: absolute; left: 0; color: var(--violet); }
.knowledge-card__date { margin-top: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

/* ============ 模态弹窗（Luma 风格过渡） ============ */
.modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 5, 9, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.35s;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__card {
  position: relative;
  width: min(720px, 100%); max-height: 82vh; overflow-y: auto;
  border-radius: 24px;
  background: #0d0f18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.12);
  opacity: 0; transform: translateY(24px) scale(0.96);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-spring);
}
.modal.is-open .modal__card { opacity: 1; transform: none; }
.modal__close {
  position: sticky; top: 16px; margin-left: calc(100% - 56px);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  font-size: 18px; color: var(--text-dim);
  transition: all 0.25s; z-index: 2;
}
.modal__close:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }
.modal__body { padding: 8px 40px 44px; }
.modal__body h2 { font-size: 26px; margin-bottom: 10px; }
.modal__body .modal__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 24px; }
.modal__body .modal__meta em { font-style: normal; color: var(--violet); }
.modal__body p { color: var(--text-dim); font-size: 15px; margin-bottom: 14px; white-space: pre-line; }

/* ============================================================
   黑胶唱片角
   ============================================================ */
/* 滚动叙事：随滚动逐段浮现（--p 由 JS 按滚动进度驱动） */
.vinyl-intro {
  max-width: 720px;
  margin: 0 auto 80px;
  text-align: center;
}
.scrub-line {
  --p: 0;
  font-size: clamp(18px, 2.4vw, 27px);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0.01em;
  opacity: calc(0.04 + var(--p) * 0.96);
  filter: blur(calc((1 - var(--p)) * 10px));
  transform: translateY(calc((1 - var(--p)) * 22px));
  transition: filter 0.16s linear, opacity 0.16s linear, transform 0.16s linear;
  will-change: filter, opacity, transform;
}
.scrub-line--accent {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vinyl-section {
  position: relative;
  padding: 130px clamp(20px, 5vw, 72px) 90px;
  margin-top: 80px;
  background:
    radial-gradient(ellipse 60% 45% at 25% 55%, rgba(139, 92, 246, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(34, 211, 238, 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #0a0714 40%, var(--bg) 100%);
}
.vinyl-section .section__head { max-width: 1280px; margin-left: auto; margin-right: auto; }
.vinyl-stage {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(380px, 1fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

/* ---------- 唱片机（拟物化 v2：更接近真实唱机） ---------- */
.turntable {
  transform: translateX(-120%) rotate(-2deg);
  opacity: 0;
  transition: transform 1.4s var(--ease-out), opacity 0.8s;
}
.vinyl-stage.is-inview .turntable { transform: none; opacity: 1; }
.turntable__scene {
  position: relative;
  perspective: 1500px;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.55));
}
/* 防尘盖：烟熏亚克力，打开后倾 */
.dust-cover {
  position: absolute; left: 1%; right: 1%; bottom: 97%;
  height: 86%;
  transform-origin: 50% 100%;
  transform: rotateX(64deg);
  z-index: 1;
  pointer-events: none;
}
.dust-cover__panel {
  position: absolute; inset: 0;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(158deg,
    rgba(214, 198, 170, 0.17), rgba(160, 146, 120, 0.08) 40%, rgba(100, 88, 70, 0.10));
  border: 1px solid rgba(238, 228, 205, 0.4);
  border-bottom: 3px solid rgba(120, 100, 78, 0.5);
  backdrop-filter: blur(0.6px) brightness(1.06);
  -webkit-backdrop-filter: blur(0.6px) brightness(1.06);
  box-shadow: inset 0 0 60px rgba(255, 246, 225, 0.05);
  overflow: hidden;
}
.dust-cover__panel::after {   /* 一道斜向反光 */
  content: ""; position: absolute; top: -30%; bottom: -30%; left: 22%;
  width: 10%;
  transform: rotate(16deg);
  background: linear-gradient(90deg, transparent, rgba(255, 252, 240, 0.14), transparent);
}
.dust-cover__panel::before {  /* 提手凹槽 */
  content: ""; position: absolute; left: 50%; top: 10%;
  width: 10%; height: 4.5%;
  transform: translateX(-50%);
  background: rgba(25, 20, 14, 0.5); border-radius: 2px;
  z-index: 1;
}
.dust-cover__hinge {
  position: absolute; left: 8%; right: 8%; bottom: -3px;
  height: 6px; border-radius: 3px;
  background: linear-gradient(180deg, #7a5c3c, #3d2b17);
}
.dust-cover__hinge::before, .dust-cover__hinge::after {
  content: ""; position: absolute; top: -2px;
  width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(145deg, #c98e4a, #6e451e);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}
.dust-cover__hinge::before { left: 2%; }
.dust-cover__hinge::after { right: 2%; }

/* 胡桃木机箱：宽矩形 + 厚度感 */
.turntable__plinth {
  position: relative;
  border-radius: 12px;
  aspect-ratio: 1 / 0.72;
  background:
    repeating-linear-gradient(91deg, rgba(24, 14, 6, 0.10) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(89deg, rgba(255, 226, 180, 0.045) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(92.5deg, rgba(56, 34, 14, 0.14) 0 9px, transparent 9px 46px),
    radial-gradient(ellipse 80% 45% at 25% 6%, rgba(255, 216, 160, 0.13), transparent 55%),
    radial-gradient(ellipse 110% 80% at 50% 118%, rgba(18, 9, 3, 0.35), transparent 62%),
    linear-gradient(165deg, #8f6a42, #6b4b29 45%, #523419);
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 190, 0.20),
    inset 0 -4px 10px rgba(0, 0, 0, 0.5),
    inset 4px 0 10px rgba(0, 0, 0, 0.15),
    inset -4px 0 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 2;
}
/* 正面扬声器格栅（木质包边 + 深色密条） */
.turntable__grille {
  height: 46px;
  margin: 0 4px;
  border-radius: 0 0 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-top: none;
  background:
    repeating-linear-gradient(90deg, #100c09 0 3px, #2e241b 3px 5px, #100c09 5px 8px);
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.75);
}

/* 转盘：拉丝铝大盘 */
.platter {
  position: absolute; left: 4.5%; top: 50%;
  width: 60%; aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(40, 40, 46, 0.35) 0deg 0.5deg, transparent 0.5deg 3deg),
    conic-gradient(#d9d5cc, #b0aba0, #dedad2, #a5a096, #d9d5cc, #b0aba0, #dedad2);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.6),
    inset 0 2px 2px rgba(255, 255, 255, 0.7),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  display: grid; place-items: center;
}
.platter__rim {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.18) 80%, rgba(0, 0, 0, 0.4) 100%);
}
.platter__mat {
  position: absolute; inset: 4.5%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 5px, rgba(255, 255, 255, 0.022) 5px 6px),
    radial-gradient(circle, #1b1c22 55%, #101116);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}
.platter__spindle {
  position: absolute; width: 2.6%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2f4f8, #98a0b0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0,0,0,0.4);
  z-index: 5;
}

/* 唱片本体 */
.record {
  position: absolute; inset: 5%;
  border-radius: 50%;
  background: #0a0a0d;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s, transform 0.5s var(--ease-spring);
  z-index: 3;
}
.record.is-on { opacity: 1; transform: scale(1); }
.record__grooves {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-radial-gradient(circle,
      transparent 0 1.6px,
      rgba(255, 255, 255, 0.065) 1.6px 2.2px),
    conic-gradient(rgba(255, 255, 255, 0.10), transparent 15%, transparent 42%,
      rgba(255, 255, 255, 0.07) 55%, transparent 70%, rgba(255, 255, 255, 0.10));
}
/* 旋转时的流动反光（随唱片一起转） */
.record__sheen {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    conic-gradient(from 20deg,
      transparent 0deg,
      rgba(255, 255, 255, 0.13) 8deg,
      transparent 18deg,
      transparent 168deg,
      rgba(255, 255, 255, 0.08) 182deg,
      transparent 196deg),
    conic-gradient(from 200deg,
      transparent 0deg,
      rgba(255, 255, 255, 0.05) 30deg,
      transparent 60deg);
  mix-blend-mode: screen;
  pointer-events: none;
}
.record:not(.is-on) .record__sheen { display: none; }
.record__label {
  position: absolute; inset: 32%;
  border-radius: 50%;
  background: var(--label-bg, linear-gradient(145deg, #d4574a, #7b241c));
  background-size: cover;
  background-position: center;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.06);
}
.record__label.has-cover span { display: none; }
.record__label span {
  font-family: var(--font-mono); font-size: clamp(8px, 1vw, 11px);
  font-weight: 600; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.92);
  text-align: center; padding: 0 8%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.record__spindle-hole {
  position: absolute; left: 50%; top: 50%;
  width: 4%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: #0e1016;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.9);
}

/* 播放进度环 */
.progress-ring {
  position: absolute; inset: 0.8%;
  z-index: 4;
  transform: rotate(-90deg);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  overflow: visible;
}
.progress-ring.is-live { opacity: 1; }
.progress-ring circle { fill: none; }
.progress-ring__track { stroke: rgba(255, 255, 255, 0.10); stroke-width: 0.6; }
.progress-ring__fill {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 304.7;
  stroke-dashoffset: 304.7;
  filter: drop-shadow(0 0 1.5px rgba(34, 211, 238, 0.8));
}

/* 唱臂基座（纯装饰小板） */
.tonearm-base {
  position: absolute; right: 9.5%; top: 3.5%;
  width: 17%; aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(160deg, #2a2b31, #131418 75%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 5px 14px rgba(0, 0, 0, 0.55);
  z-index: 5;
}
/* 唱臂：pivot 在右上（贴近盘缘），臂杆下探到唱片 */
.tonearm {
  position: absolute; right: 11%; top: 5%;
  width: 32%; height: 64%;
  transform-origin: 72% 8%;
  transform: rotate(-10deg);        /* 停靠位 */
  transition: transform 1.5s cubic-bezier(0.45, 0, 0.15, 1);
  z-index: 6;
  pointer-events: none;
}
.tonearm.is-playing { transform: rotate(30deg); }   /* 落到唱片外圈（JS 会接管 30°→44°） */
.tonearm__pivot {
  position: absolute; left: 72%; top: 8%;
  width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #55565e, #17181d 72%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.tonearm__pivot::after {            /* 轴心螺丝 */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c8ccd6, #565b68);
}
.tonearm__counterweight {
  position: absolute; left: 50%; top: -52%;
  width: 66%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 4px),
    linear-gradient(145deg, #5a5b64, #1f2026);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
}
.tonearm__wand {
  position: absolute; left: 72%; top: 8%;
  width: 4.5%; height: 82%;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(90deg, #16171b, #4d4f59 45%, #101114);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.55);
}
.tonearm__headshell {
  position: absolute; left: 72%; top: 86%;
  width: 15%; height: 12%;
  transform: translateX(-60%) rotate(24deg);
  transform-origin: top center;
  border-radius: 2px 2px 5px 5px;
  background: linear-gradient(145deg, #31323a, #101114);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.14);
}
.tonearm__headshell::before {       /* 指托 */
  content: ""; position: absolute; right: -32%; top: 10%;
  width: 28%; height: 58%;
  border-radius: 2px;
  background: linear-gradient(180deg, #3d3e47, #1a1b20);
}
.tonearm__headshell::after {        /* 唱针 */
  content: ""; position: absolute; left: 46%; bottom: -16%;
  width: 8%; height: 24%; background: #d5dae6; border-radius: 2px;
}
/* 唱臂停靠扣（盘缘右侧） */
.tonearm-rest {
  position: absolute; right: 4.2%; top: 42%;
  width: 3%; height: 8%;
  border-radius: 3px;
  background: linear-gradient(145deg, #43444c, #1a1b1f);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
  z-index: 5;
}

/* 控制面板：黑色金属面板 + 黄铜旋钮 + 摇杆 */
.control-panel {
  position: absolute; right: 4.5%; bottom: 5.5%;
  display: flex; align-items: flex-end; gap: 18px;
  padding: 14px 18px 12px;
  border-radius: 10px;
  background: linear-gradient(165deg, #2b2723, #141210 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 5px 14px rgba(0, 0, 0, 0.55);
  z-index: 7;
}
.knob-block { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.knob-block__label {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em;
  color: rgba(255, 244, 220, 0.45);
}
.knob {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #f9efdb, #e0c891 38%, #a3804e 68%, rgba(0, 0, 0, 0) 69%),
    repeating-conic-gradient(#413a2e 0deg 3deg, #26211a 3deg 6deg);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.7),
    inset 0 1px 2px rgba(255, 248, 225, 0.85),
    inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--angle, 0deg));
  cursor: grab;
  transition: box-shadow 0.2s;
}
.knob:active { cursor: grabbing; }
.knob:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.knob--lg { width: 58px; height: 58px; }
.knob--sm { width: 36px; height: 36px; }
.knob__pointer {
  position: absolute; left: 50%; top: 7%;
  width: 3px; height: 24%;
  transform: translateX(-50%);
  border-radius: 2px;
  background: #241f16;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}
.knob__arc {
  position: absolute; top: -8px; left: 50%;
  width: 74px; height: 74px;
  transform: translateX(-50%);
  pointer-events: none;
}
.knob__arc circle {
  fill: none;
  stroke: rgba(255, 244, 220, 0.3);
  stroke-width: 1.2;
  stroke-dasharray: 122 164;
  transform: rotate(135deg);
  transform-origin: center;
}
.speed-marks {
  position: absolute; top: -4px; left: 50%;
  width: 60px; transform: translateX(-50%);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 8.5px; color: rgba(255, 244, 220, 0.5);
  pointer-events: none;
}
/* 摇杆式播放开关 */
.rocker-block { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.rocker {
  position: relative;
  width: 44px; height: 32px;
  border-radius: 7px;
  background: linear-gradient(160deg, #1b1a18, #0c0b0a);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.08);
  perspective: 140px;
}
.rocker__cap {
  position: absolute; inset: 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, #8e887a, #5f594d 55%, #413c33);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  transform: rotateX(14deg);
  transform-origin: 50% 100%;
  transition: transform 0.18s var(--ease-out), background 0.3s;
}
.rocker.is-on .rocker__cap { transform: rotateX(-16deg); }
.rocker__led {
  position: absolute; right: -8px; top: 50%;
  width: 5px; height: 5px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #3a352c;
  transition: background 0.3s, box-shadow 0.3s;
}
.rocker.is-on .rocker__led { background: #ff4d4d; box-shadow: 0 0 8px #ff4d4d; }
.turntable__brand {
  position: absolute; left: 5.5%; bottom: 6%;
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.32em; color: rgba(255, 240, 210, 0.5);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* 正在播放信息 */
.now-playing {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  font-size: 13.5px; color: var(--text-dim);
  min-height: 52px;
}
.now-playing__eq { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.now-playing__eq.is-live { display: inline-flex; }
.now-playing__eq i {
  width: 3px; background: var(--gradient); border-radius: 2px;
  animation: eqBounce 0.9s ease-in-out infinite;
}
.now-playing__eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.now-playing__eq i:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.now-playing__eq i:nth-child(3) { height: 45%; animation-delay: 0.3s; }
.now-playing__eq i:nth-child(4) { height: 80%; animation-delay: 0.45s; }
@keyframes eqBounce { 50% { transform: scaleY(0.35); } }

/* ---------- 唱片架 ---------- */
.shelf { position: relative; }
.shelf__title {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.3em;
  color: var(--text-faint); margin-bottom: 18px;
}
.shelf__rows { display: flex; flex-direction: column; gap: 26px; }
.shelf__row {
  display: flex; gap: 22px;
  padding: 0 10px 18px;
  position: relative;
}
/* 木纹层板 */
.shelf__row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 12px; border-radius: 3px;
  background: linear-gradient(180deg, #4a3527, #2c1f16);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.album {
  position: relative; z-index: 2;
  width: 46%; max-width: 190px;
  cursor: pointer;
  transition: transform 0.45s var(--ease-spring);
  transform-origin: bottom center;
}
.album:hover { transform: translateY(-10px) scale(1.07); z-index: 5; }
.album__cover {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  position: relative; z-index: 2;
  transition: box-shadow 0.35s;
}
.album:hover .album__cover { box-shadow: 0 22px 44px rgba(0, 0, 0, 0.65), 0 0 30px var(--glow, rgba(139, 92, 246, 0.3)), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
/* 悬浮时唱片从封套右侧抽出一截 */
.album::after {
  content: "";
  position: absolute; right: -20%; top: 4%;
  width: 96%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--c1) 0 16.5%, rgba(255, 255, 255, 0.25) 17%, transparent 17.5%),
    repeating-radial-gradient(circle, transparent 0 2.5px, rgba(255, 255, 255, 0.05) 2.5px 3.5px),
    #0b0b0e;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateX(-42%) rotate(-50deg);
  transition: opacity 0.3s, transform 0.65s var(--ease-spring);
  z-index: 1;
  pointer-events: none;
}
.album:hover::after { opacity: 1; transform: translateX(0) rotate(8deg); }
.album__cover img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.album__cover::before {   /* 封面底部文字衬底，保证可读性 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 42%; z-index: 2;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}
.album__name { font-size: 15px; font-weight: 700; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); position: relative; z-index: 3; }
.album__year { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255, 255, 255, 0.75); position: relative; z-index: 3; }
/* 悬浮简介气泡 */
.album__tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px);
  width: 240px;
  transform: translateX(-50%) translateY(8px) scale(0.96);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(13, 15, 24, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  font-size: 12.5px; line-height: 1.65; color: var(--text-dim);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.35s var(--ease-spring);
  z-index: 20;
}
.album__tip strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.album:hover .album__tip { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ---------- 选歌面板 ---------- */
.track-panel {
  position: absolute; inset: -10px -14px auto;
  min-height: 100%;
  padding: 26px;
  border-radius: 22px;
  background: rgba(10, 12, 20, 0.97);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.45s var(--ease-spring);
  z-index: 30;
}
.track-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.track-panel__close {
  position: absolute; right: 16px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px; color: var(--text-dim);
  transition: all 0.25s;
}
.track-panel__close:hover { color: var(--text); transform: rotate(90deg); }
.track-panel__head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.track-panel__cover {
  width: 64px; height: 64px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.track-panel__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-panel__head h4 { font-size: 18px; }
.track-panel__head p { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.track-panel__desc { font-size: 12.5px; color: var(--text-dim); margin-bottom: 16px; }
.track-panel__list { list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.track-panel__list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.track-panel__list li:hover { background: rgba(139, 92, 246, 0.12); color: var(--text); }
.track-panel__list li.is-playing { background: rgba(34, 211, 238, 0.1); color: var(--cyan); }
.track-panel__list .track-no { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); width: 20px; }
.track-panel__list .track-duration { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.track-panel__hint { margin-top: 14px; font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }

/* ---------- 飞行唱片 ---------- */
.flying-disc {
  position: fixed; z-index: 1500;
  width: 120px; height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--c1, #8b5cf6) 0 18%, #0b0b0e 19% 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: none;
  pointer-events: none;
}
.flying-disc img {
  position: absolute; left: 50%; top: 50%;
  width: 36%; height: 36%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* ============ 文章页 ============ */
.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 130px 22px 90px;
}
.article__loading { color: var(--text-faint); text-align: center; padding-top: 60px; }
.article__head { margin-bottom: 40px; }
.article__tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.article__head h1 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.25; letter-spacing: -0.01em; }
.article__meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-top: 14px; }
.article__meta em { font-style: normal; color: var(--violet); }
.article__missing { text-align: center; padding: 80px 0; }
.article__missing h1 {
  font-family: var(--font-mono); font-size: 72px;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.article__missing a { color: var(--cyan); }

/* 文章排版 */
.prose { font-size: 16px; line-height: 1.9; color: #c3c9d8; }
.prose h2 {
  font-size: 23px; color: var(--text);
  margin: 42px 0 16px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.prose h3 { font-size: 19px; color: var(--text); margin: 30px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--violet); }
.prose strong { color: var(--text); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 20px 0; padding: 12px 20px;
  border-left: 3px solid var(--violet);
  background: rgba(139, 92, 246, 0.07);
  border-radius: 0 10px 10px 0;
  color: var(--text-dim);
}
.prose code:not(pre code) {
  font-family: var(--font-mono); font-size: 0.86em;
  padding: 2.5px 7px; border-radius: 6px;
  background: rgba(34, 211, 238, 0.09);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.16);
}
/* 代码块 + Pygments 高亮 */
.prose pre {
  margin: 20px 0 24px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #0a0c13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  font-size: 13.5px; line-height: 1.75;
}
.prose pre code { font-family: var(--font-mono); background: none; border: none; padding: 0; color: #d7dce8; }
.prose .highlight pre { margin: 20px 0 24px; }
/* Pygments 通用 token 配色（暗色） */
.highlight .k, .highlight .kn, .highlight .kd { color: #c792ea; }        /* 关键字 */
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb { color: #9ece8c; } /* 字符串 */
.highlight .c, .highlight .c1, .highlight .cm { color: #5b6178; font-style: italic; } /* 注释 */
.highlight .nf, .highlight .nc { color: #6cb6ff; }                        /* 函数/类 */
.highlight .mi, .highlight .mf { color: #f78c6c; }                        /* 数字 */
.highlight .o, .highlight .ow { color: #89ddff; }                         /* 运算符 */
.highlight .n, .highlight .nv, .highlight .vi { color: #d7dce8; }
.highlight .bp, .highlight .nb { color: #ffcb6b; }                        /* 内建 */
.highlight .nn { color: #ffcb6b; }

/* ============ Footer ============ */
.footer {
  padding: 60px clamp(20px, 7vw, 96px) 40px;
  text-align: center;
  color: var(--text-faint); font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer__mono { font-family: var(--font-mono); font-size: 11.5px; margin-top: 8px; color: rgba(139, 92, 246, 0.6); }

/* ============ 移动端汉堡菜单 ============ */
.nav__burger {
  display: none;
  position: relative; z-index: 1001;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span {
  display: block; width: 16px; height: 1.6px;
  border-radius: 2px; background: var(--text);
  transition: transform 0.35s var(--ease-spring), opacity 0.2s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 950;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: rgba(4, 5, 10, 0.88);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s, visibility 0s 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.mobile-menu__link {
  font-size: 30px; font-weight: 600; letter-spacing: 0.02em;
  padding: 8px 20px;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring), color 0.25s;
}
.mobile-menu__link em {
  font-style: normal; font-family: var(--font-mono); font-size: 12px;
  color: var(--violet); vertical-align: super; margin-right: 8px;
}
.mobile-menu__link:hover { color: var(--cyan); }
.mobile-menu.is-open .mobile-menu__link { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__link:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { transition-delay: 0.24s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(5) { transition-delay: 0.30s; }
.mobile-menu__foot {
  position: absolute; bottom: 40px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4em;
  color: var(--text-faint);
}

/* 调试模式：?all-visible 全部静态显示（截图/审查用） */
.debug-all-visible .reveal,
.debug-all-visible .blur-reveal { opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important; }
.debug-all-visible .scrub-line { --p: 1 !important; }
.debug-all-visible .hero { min-height: 640px; }
.debug-all-visible .turntable { transform: none !important; opacity: 1 !important; }
.debug-all-visible .intro { display: none !important; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .vinyl-stage { grid-template-columns: 1fr; }
  .turntable { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav { padding: 10px 14px; }
  .nav__cta { display: none; }   /* 窄屏只留汉堡 */
  .nav__burger { display: flex; }
  .about { grid-template-columns: 1fr; }
  .essay-row { grid-template-columns: 1fr; gap: 8px; }
  .essay-row__meta { text-align: left; }
  .track-panel { inset: -6px -6px auto; }
  /* 唱片机小屏适配：控制面板等比缩小，防尘盖收敛 */
  .control-panel { transform: scale(0.78); transform-origin: 100% 100%; right: 3%; bottom: 4%; }
  .dust-cover { height: 72%; }
  .turntable__brand { font-size: 8px; }
  .now-playing { font-size: 12.5px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
