/* ===== 全局变量 & 基础样式 ===== */
:root {
  --bg: #e2d4c0;
  --coffee: #c4a882;
  --coffee-dark: #8b6914;
  --coffee-light: #e0d3c0;
  --wood: #a0845c;
  --wood-dark: #7a5f3e;
  --wood-light: #c9b38c;
  --text: #4a3728;
  --text-light: #8a7560;
  --white: #faf8f4;
  --shadow: rgba(74, 55, 40, 0.15);
  --door-width: 200px;
  --door-height: 320px;
  --transition-speed: 0.8s;
}

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

html {
  font-size: 16px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== 首页：开篇介绍页 ===== */
.home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* 门容器 */
.door-container {
  position: relative;
  width: calc(var(--door-width) + 40px);
  height: calc(var(--door-height) + 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.35s ease;
}

.door-container:hover {
  transform: scale(1.06);
}

.door-container:hover .door-frame {
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.2),
    0 12px 40px rgba(74, 55, 40, 0.28),
    0 4px 14px rgba(74, 55, 40, 0.12);
}

.door-container:hover .door-hint {
  color: var(--coffee-dark);
}

/* 门框 */
.door-frame {
  position: absolute;
  inset: 0;
  border: 12px solid var(--wood-dark);
  border-radius: 4px;
  background: var(--coffee-dark);
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.2),
    0 8px 28px rgba(74, 55, 40, 0.16),
    0 2px 8px rgba(74, 55, 40, 0.08);
}

/* 门体 */
.door {
  position: relative;
  width: var(--door-width);
  height: var(--door-height);
  background: linear-gradient(
    180deg,
    var(--wood-light) 0%,
    var(--wood) 30%,
    var(--wood) 60%,
    var(--wood-dark) 100%
  );
  border-radius: 2px;
  z-index: 2;
  transform-origin: left center;
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 2px 0 8px rgba(255,255,255,0.15),
    inset -2px 0 8px rgba(0,0,0,0.1),
    4px 4px 16px var(--shadow);
}

/* 木纹纹理 */
.door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 8px,
    rgba(139, 105, 20, 0.08) 8px,
    rgba(139, 105, 20, 0.08) 10px
  );
  border-radius: 2px;
}

/* 门把手 */
.door::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 40% 40%, #d4b896, #8b6914);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-50%);
}

/* 门面板装饰 */
.door-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  border: 2px solid rgba(139, 105, 20, 0.2);
  border-radius: 2px;
  background: rgba(139, 105, 20, 0.04);
}
.door-panel.top {
  top: 24px;
  height: 35%;
}
.door-panel.bottom {
  bottom: 24px;
  height: 30%;
}

/* 推门动画状态 */
.door-container.opening .door {
  transform: perspective(800px) rotateY(-85deg);
}

/* 门下方文案 */
.door-hint {
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--text-light);
  letter-spacing: 2px;
  z-index: 10;
  transition: color 0.3s;
  animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== 飘散图标 ===== */
.floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.floating-icon {
  position: absolute;
  opacity: 0.6;
  animation: floatAround 6s ease-in-out infinite;
}

/* 位置和延迟由 HTML 内联 style 控制 */

@keyframes floatAround {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  25% { transform: translateY(-18px) translateX(8px) scale(1.05); }
  50% { transform: translateY(-6px) translateX(-6px) scale(0.95); }
  75% { transform: translateY(14px) translateX(-10px) scale(1.02); }
}

/* ===== 走廊页面 ===== */
.corridor-page {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* 两侧墙壁：固定，向远处收窄 */
.corridor-wall {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 18vw;
  pointer-events: none;
  z-index: 5;
}
.corridor-wall-left {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(122, 95, 62, 0.35) 0%,
    rgba(139, 105, 20, 0.12) 60%,
    transparent 100%
  );
  clip-path: polygon(0 0, 100% 18%, 100% 82%, 0 100%);
}
.corridor-wall-right {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(122, 95, 62, 0.35) 0%,
    rgba(139, 105, 20, 0.12) 60%,
    transparent 100%
  );
  clip-path: polygon(100% 0, 0 18%, 0 82%, 100% 100%);
}

/* 地板：固定底部梯形 */
.corridor-floor-panel {
  position: fixed;
  bottom: 0;
  left: 5vw;
  right: 5vw;
  height: 8vh;
  background: linear-gradient(
    to bottom,
    rgba(196, 168, 130, 0.45),
    rgba(122, 95, 62, 0.25)
  );
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 5;
}

/* 返回主页按钮 */
.home-return-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  padding: 8px 18px;
  border: 1px solid var(--coffee-dark);
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 2px;
  transition: all 0.3s;
  z-index: 20;
  background: rgba(226, 212, 192, 0.85);
  backdrop-filter: blur(4px);
}

.home-return-btn:hover {
  background: var(--coffee-dark);
  color: var(--white);
}

/* 3D 场景 */
.corridor-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
}

/* 轨道（不使用 3D，仅用于动画） */
.corridor-track {
  position: absolute;
  inset: 0;
}

/* 每个深度步：用 scale 模拟远近 + z-index 控制层叠 */
.corridor-step {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20vw;
  transform: scale(var(--s, 1));
  transform-origin: center center;
  transition: transform 1.2s cubic-bezier(0.22, 0.1, 0.15, 1), opacity 0.5s ease;
  z-index: var(--zi, 0);
  pointer-events: none;
}

/* 步在镜头后方 → 隐藏 */
.corridor-step.behind {
  opacity: 0;
  z-index: 0;
}

/* 当前步 → 最上层、可交互 */
.corridor-step.at-camera {
  z-index: 20;
}

/* 门槽 */
.door-slot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
}
.door-slot:empty {
  visibility: hidden;
}

/* 中间点击前进区 */
.corridor-advance {
  position: absolute;
  top: 30%;
  bottom: 30%;
  left: 28vw;
  right: 28vw;
  z-index: 10;
  cursor: pointer;
}

/* 后退按钮 */
.corridor-back-btn {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 20;
  padding: 8px 18px;
  border: none;
  background: rgba(74, 55, 40, 0.7);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}
.corridor-back-btn:hover {
  background: rgba(74, 55, 40, 0.9);
}
/* 初始位置时隐藏后退 */
.corridor-back-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 底部提示 */
.corridor-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 2px;
  z-index: 20;
  pointer-events: none;
  background: rgba(226, 212, 192, 0.75);
  padding: 8px 22px;
  border-radius: 20px;
  animation: hintPulse 3s ease-in-out infinite;
}

/* 镜头前的门：高亮可交互 */
.corridor-step.at-camera .small-door-wrapper {
  cursor: pointer;
}
.corridor-step.at-camera .small-door-label {
  color: var(--text);
}
.corridor-step.at-camera .small-door-wrapper:hover .small-door-label {
  color: var(--coffee-dark);
}

/* 小门容器 */
.small-door-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.small-door-wrapper:hover {
  transform: scale(1.08);
}

.small-door-wrapper:hover .small-door-frame {
  box-shadow:
    0 10px 36px rgba(74, 55, 40, 0.28),
    0 3px 12px rgba(74, 55, 40, 0.12);
}

.small-door-label {
  font-size: 0.85rem;
  color: var(--text);
  letter-spacing: 1px;
  text-align: center;
  transition: color 0.3s;
}

.small-door-wrapper:hover .small-door-label {
  color: var(--coffee-dark);
}

/* 小门框 */
.small-door-frame {
  width: 120px;
  height: 180px;
  border: 8px solid var(--wood-dark);
  border-radius: 3px;
  background: var(--coffee-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(74, 55, 40, 0.16),
    0 2px 6px rgba(74, 55, 40, 0.08);
}

/* 小门体 */
.small-door {
  width: 104px;
  height: 164px;
  background: linear-gradient(
    180deg,
    var(--wood-light) 0%,
    var(--wood) 35%,
    var(--wood) 60%,
    var(--wood-dark) 100%
  );
  border-radius: 1px;
  transform-origin: left center;
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow:
    inset 1px 0 4px rgba(255,255,255,0.15),
    inset -1px 0 4px rgba(0,0,0,0.1),
    2px 2px 10px rgba(0,0,0,0.1);
}

.small-door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 5px,
    rgba(139, 105, 20, 0.08) 5px,
    rgba(139, 105, 20, 0.08) 6px
  );
}

.small-door::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 40% 40%, #d4b896, #8b6914);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transform: translateY(-50%);
}

/* 小门推门动画 */
.small-door-wrapper.opening .small-door {
  transform: perspective(500px) rotateY(-85deg);
}

/* ===== 音乐子页面 ===== */
.music-page {
  min-height: 100vh;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-btn {
  align-self: flex-start;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--coffee);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s;
  border-radius: 2px;
  margin-bottom: 30px;
}

.back-btn:hover {
  background: var(--coffee);
  color: var(--white);
}

.music-title {
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin-bottom: 36px;
  font-weight: normal;
  color: var(--text);
}

/* 专辑网格：桌面端固定 3 列 */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 700px;
}

.album-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(74, 55, 40, 0.2);
}

.album-card.playing {
  box-shadow: 0 0 0 3px var(--coffee);
}

.album-cover {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--coffee-light), var(--coffee));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  position: relative;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.03);
}

.album-info {
  padding: 14px 16px;
}

.album-name {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 4px;
}

.album-artist {
  font-size: 0.8rem;
  color: var(--text-light);
}

.album-playing-badge {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  z-index: 2;
}

.album-card.playing .album-playing-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coffee-dark);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
}

/* 播放提示条 */
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--coffee-light);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 12px var(--shadow);
  z-index: 100;
}

.now-playing-bar.active {
  transform: translateY(0);
}

.now-playing-info {
  font-size: 0.85rem;
  color: var(--text);
}

.now-playing-info span {
  color: var(--text-light);
  font-size: 0.75rem;
}

.now-playing-stop {
  padding: 6px 16px;
  border: 1px solid var(--coffee);
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.now-playing-stop:hover {
  background: var(--coffee);
  color: var(--white);
}

/* ===== 占位子页面通用样式 ===== */
.placeholder-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.placeholder-page h1 {
  font-size: 1.4rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-weight: normal;
}

.placeholder-page p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 767px) {
  :root {
    --door-width: 150px;
    --door-height: 240px;
  }

  /* 飘散图标缩小 */
  .floating-icon {
    transform: scale(0.7);
  }

	  /* 走廊：移动端缩小墙壁、调整间距 */
	  .corridor-wall {
	    width: 10vw;
	  }

	  .corridor-floor-panel {
	    left: 2vw;
	    right: 2vw;
	    height: 5vh;
	  }

	  .corridor-step {
	    padding: 0 10vw;
	  }

	  .door-slot {
	    width: 100px;
	  }

	  .corridor-advance {
	    left: 18vw;
	    right: 18vw;
	  }

  .small-door-frame {
    width: 100px;
    height: 150px;
    border-width: 6px;
  }

  .small-door {
    width: 88px;
    height: 138px;
  }

  .small-door-label {
    font-size: 0.75rem;
  }

  /* 音乐页：移动端 2 列 */
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .album-cover {
    font-size: 1.8rem;
  }

  .album-name {
    font-size: 0.8rem;
  }
}

/* ===== 全局音乐图标 ===== */
.global-music-toggle {
  position: fixed;
  top: 22px;
  left: 26px;
  z-index: 200;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.85);
  border: 1.5px solid var(--coffee);
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.global-music-toggle:hover {
  background: var(--coffee);
  border-color: var(--coffee-dark);
}

.global-music-toggle:hover svg rect,
.global-music-toggle:hover svg polygon {
  fill: var(--white);
}

.global-music-toggle:hover svg path,
.global-music-toggle:hover svg line {
  stroke: var(--white);
}

/* ===== 音乐详情侧边面板 ===== */
.music-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.music-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.music-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  min-width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  padding: 50px 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 28px rgba(0,0,0,0.12);
  overflow-y: auto;
}
.music-detail-panel.active {
  transform: translateX(0);
}

.detail-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.detail-close-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.detail-cover {
  width: 200px;
  height: 200px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--coffee-light), var(--coffee));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  margin-bottom: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-align: center;
}

.detail-artist {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-align: center;
}

.detail-play-btn {
  padding: 10px 32px;
  border: 2px solid var(--coffee);
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 1px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 32px;
}
.detail-play-btn:hover {
  background: var(--coffee);
  color: var(--white);
}
.detail-play-btn.playing {
  background: var(--coffee-dark);
  border-color: var(--coffee-dark);
  color: var(--white);
}

.detail-desc-section {
  width: 100%;
  border-top: 1px solid var(--coffee-light);
  padding-top: 20px;
}

.detail-desc-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.detail-desc-text {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 2;
  white-space: pre-wrap;
}

/* 移动端面板全宽 */
@media (max-width: 768px) {
  .music-detail-panel {
    width: 100%;
    max-width: 100%;
    padding: 40px 24px 30px;
  }
  .detail-cover {
    width: 160px;
    height: 160px;
    font-size: 2.8rem;
  }
}

/* ===== 结语 ===== */
.message-body {
  max-width: 700px;
  width: 100%;
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 2;
  letter-spacing: 0.5px;
  text-align: left;
}

.message-body p {
  margin: 0 0 24px;
}

.message-body p:last-child {
  margin-bottom: 0;
}

/* ===== 书架（最近在读）===== */
.book-intro {
  max-width: 700px;
  width: 100%;
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 2;
  letter-spacing: 0.5px;
  margin: 0 0 36px;
  text-align: left;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 700px;
}

.book-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(74, 55, 40, 0.2);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--coffee-light), var(--coffee));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  position: relative;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info {
  padding: 14px 16px;
}

.book-name {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 4px;
}

.book-author {
  font-size: 0.8rem;
  color: var(--text-light);
}

.book-detail-cover {
  width: 180px;
  height: 270px;
}

/* 移动端：书架 2 列 */
@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .book-cover {
    font-size: 1.8rem;
  }
  .book-name {
    font-size: 0.8rem;
  }
  .book-detail-cover {
    width: 150px;
    height: 225px;
  }
}

/* ===== 关于我页面 ===== */
.about-page {
  min-height: 100vh;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--coffee);
  box-shadow: 0 6px 24px rgba(74, 55, 40, 0.18);
  margin-bottom: 20px;
}
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-title {
  font-size: 1.3rem;
  letter-spacing: 2px;
  font-weight: normal;
  color: var(--text);
  margin-bottom: 48px;
}

/* 图标时间线 */
.about-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 700px;
  width: 100%;
  flex-wrap: wrap;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.timeline-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--coffee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  box-shadow: 0 4px 16px rgba(74, 55, 40, 0.1);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.timeline-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.15);
  border-color: var(--coffee-dark);
  box-shadow: 0 8px 28px rgba(74, 55, 40, 0.22);
}

.timeline-label {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 1px;
  transition: color 0.3s;
}

.timeline-item:hover .timeline-label {
  color: var(--coffee-dark);
}

/* 悬浮提示 */
.timeline-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--coffee-dark);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
}
.timeline-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--coffee-dark);
}
.timeline-item:hover .timeline-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.timeline-item.tooltip-shown .timeline-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 连线 */
.timeline-line {
  width: 48px;
  height: 2px;
  background: var(--coffee);
  margin-top: 34px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* 详情卡片遮罩 */
.milestone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.milestone-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 详情卡片 */
.milestone-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--white);
  border-radius: 8px;
  padding: 48px 40px 40px;
  z-index: 301;
  width: 50vw;
  min-width: 360px;
  max-height: 88vh;
  overflow-y: auto;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}
.milestone-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.milestone-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 1.1rem;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.milestone-close-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.milestone-card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.milestone-card-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.milestone-card-body {
  text-align: left;
}

.milestone-text-block {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  line-height: 2;
  margin-bottom: 20px;
}

.milestone-media-block {
  margin-bottom: 20px;
  border-radius: 6px;
  overflow: hidden;
}
.milestone-media-block video,
.milestone-media-block img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

/* 图片四宫格 */
.milestone-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.milestone-image-grid .grid-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.milestone-image-grid .grid-img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.milestone-image-grid .grid-img:only-child {
  grid-column: 1 / -1;
  max-width: 50%;
  justify-self: center;
}

/* 灯箱 */
.milestone-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.milestone-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.milestone-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

/* 猫咪封面网格 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cat-cover {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
}
.cat-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(74, 55, 40, 0.2);
}
.cat-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.cat-cover-ph {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--coffee-light), var(--coffee));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}
.cat-cover-name {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text);
}
.cat-back-btn {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: none;
  background: var(--bg);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.3s;
}
.cat-back-btn:hover {
  background: var(--coffee-light);
}
.cat-summary-title {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--coffee-dark);
  margin: 28px 0 14px;
}
.song-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.song-cover {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.song-cover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.song-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.song-cover-name {
  padding: 12px 16px 2px;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text);
}
.song-cover-artist {
  padding: 0 16px 12px;
  font-size: 0.8rem;
  color: var(--text-light);
}
.song-note-cover {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 16px;
  display: block;
}

/* 移动端 */
@media (max-width: 768px) {
  .about-avatar {
    width: 110px;
    height: 110px;
  }
  .timeline-icon {
    width: 54px;
    height: 54px;
    font-size: 1.3rem;
  }
  .timeline-line {
    width: 28px;
    margin-top: 27px;
  }
  .timeline-tooltip {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
  .song-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ===== 过渡效果 ===== */
.page-transition-out {
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}
