/* ============================================
   场景切换系统 - 3D旋转转场
   ============================================ */

/* 场景容器 - 3D透视 */
.scene-container {
  position: fixed;
  inset: 0;
  z-index: -1; /* 放在最底层作为背景 */
  perspective: 1500px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  transition: z-index 0s 0.3s; /* 延迟切换避免闪烁 */
}

/* Works场景激活时，场景容器需要在主内容之上以接收点击 */
.scene-container.interactive {
  z-index: 10;
  transition: z-index 0s 0s;
}

/* 单个场景 */
.scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Home场景 - 默认显示 */
.scene-home {
  transform: rotateY(0deg);
  opacity: 1;
}

.scene-home.hidden {
  transform: rotateY(-90deg);
  opacity: 0;
  pointer-events: none;
}

/* About场景 - 默认隐藏在右侧 */
.scene-about {
  transform: rotateY(90deg);
  opacity: 0;
  pointer-events: none;
}

.scene-about.active {
  transform: rotateY(0deg);
  opacity: 1;
  pointer-events: auto;
}

/* Works场景 - 默认隐藏在右侧（从About的下一个位置进入） */
.scene-works {
  transform: rotateY(90deg) translateZ(50px);
  opacity: 0;
  pointer-events: none;
}

.scene-works.active {
  transform: rotateY(0deg) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}

/* 当About不活跃但Works活跃时，About向左退出 */
.scene-about:not(.active) {
  transform: rotateY(-90deg);
}

/* 景深背景保持原有样式 */
.scene-home .depth-background {
  position: absolute;
  inset: 0;
}

/* About场景墙壁背景 */
.about-wall-background {
  position: absolute;
  inset: 0;
}

.about-wall-background .bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   照片墙样式
   ============================================ */
.photo-wall {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 照片相框 */
.photo-frame {
  position: absolute;
  top: var(--frame-top, 20%);
  left: var(--frame-left, 20%);
  width: 220px;
  height: 165px;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
  transform-origin: center center;
}

.photo-frame:hover {
  transform: scale(1.08) translateY(-8px) rotateZ(-1deg);
  z-index: 10;
}

.photo-frame:hover .photo-shadow {
  opacity: 0.4;
  transform: translateY(15px) scale(0.9);
}

/* 照片内容 */
.photo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    rgba(255, 250, 245, 0.98) 0%,
    rgba(245, 240, 235, 0.95) 100%
  );
  border-radius: 4px;
  overflow: hidden;
  border: 3px solid rgba(200, 180, 160, 0.6);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    0 8px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.photo-frame:hover .photo-inner {
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.2),
    0 16px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 照片阴影 */
.photo-shadow {
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 20px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.3) 0%,
    transparent 70%
  );
  opacity: 0.3;
  transition: all 0.4s ease;
  pointer-events: none;
}

/* 照片占位符（等待真实照片） */
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(
    135deg,
    rgba(120, 100, 80, 0.3) 0%,
    rgba(140, 120, 100, 0.25) 50%,
    rgba(120, 100, 80, 0.3) 100%
  );
  padding: 20px;
}

/* 真实照片图片 */
.photo-real-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-frame:hover .photo-real-img {
  transform: scale(1.05);
}

/* 照片上的叠加标签 */
.photo-overlay-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-frame:hover .photo-overlay-label {
  opacity: 1;
  transform: translateY(0);
}

.photo-overlay-label .photo-label {
  color: rgba(255, 250, 245, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-size: 14px;
}

.photo-overlay-label .photo-sublabel {
  color: rgba(255, 250, 245, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  font-size: 10px;
}

.photo-label {
  font-size: 18px;
  font-weight: 600;
  color: rgba(50, 40, 30, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.photo-sublabel {
  font-size: 12px;
  font-weight: 500;
  color: rgba(60, 50, 40, 0.7);
  letter-spacing: 0.1em;
}

/* 预留位特殊样式 */
.photo-frame.reserved .photo-inner {
  background: linear-gradient(
    145deg,
    rgba(240, 235, 230, 0.6) 0%,
    rgba(230, 225, 220, 0.5) 100%
  );
  border: 2px dashed rgba(180, 160, 140, 0.3);
}

.photo-frame.reserved .photo-placeholder {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(180, 160, 140, 0.05) 10px,
    rgba(180, 160, 140, 0.05) 20px
  );
}

.photo-frame.reserved .photo-label {
  color: rgba(80, 70, 60, 0.4);
}

/* ============================================
   About页面提示
   ============================================ */
.about-page {
  background: transparent !important;
}

.about-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 50;
  pointer-events: none;
}

.hint-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% {
    opacity: 0.6;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

/* ============================================
   照片详情全屏遮罩
   ============================================ */
.photo-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 252, 248, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.photo-detail-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(255, 252, 248, 0.95);
  backdrop-filter: blur(20px);
}

/* 关闭按钮 */
.photo-detail-close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(80, 70, 60, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(80, 70, 60, 0.6);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
}

.photo-detail-overlay.active .photo-detail-close {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.3s;
}

.photo-detail-close:hover {
  background: rgba(80, 70, 60, 0.15);
  color: rgba(80, 70, 60, 0.9);
  transform: scale(1.1);
}

/* 详情内容 */
.photo-detail-content {
  max-width: 900px;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-detail-overlay.active .photo-detail-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* 详情卡片样式 */
.detail-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 60px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.5);
}

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

.detail-title {
  font-size: 42px;
  font-weight: 300;
  color: rgba(60, 50, 45, 0.9);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.detail-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-body {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.detail-image {
  flex: 0 0 350px;
  aspect-ratio: 4/3;
  background: linear-gradient(
    135deg,
    rgba(200, 180, 160, 0.3) 0%,
    rgba(180, 160, 140, 0.2) 100%
  );
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.detail-image-placeholder {
  font-size: 14px;
  color: rgba(80, 70, 60, 0.4);
  letter-spacing: 0.1em;
}

.detail-info {
  flex: 1;
}

.detail-description {
  font-size: 16px;
  line-height: 1.9;
  color: rgba(60, 50, 45, 0.75);
  margin-bottom: 30px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tag {
  padding: 8px 16px;
  background: rgba(180, 160, 140, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: rgba(80, 70, 60, 0.7);
  letter-spacing: 0.05em;
}

/* Bio特殊布局 */
.detail-card.bio-detail .detail-body {
  flex-direction: column;
  text-align: center;
}

.detail-card.bio-detail .detail-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(180, 160, 140, 0.2);
}

.detail-stat {
  text-align: center;
}

.detail-stat-number {
  font-size: 36px;
  font-weight: 300;
  color: rgba(200, 140, 100, 0.9);
  display: block;
  margin-bottom: 8px;
}

.detail-stat-label {
  font-size: 12px;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   Works场景 - 桌面作品集文件夹
   ============================================ */

/* 桌面背景 */
.works-desk-background {
  position: absolute;
  inset: 0;
}

.works-desk-background .bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 作品集文件夹容器 */
.portfolio-folder {
  position: absolute;
  top: 50%;
  left: 55%; /* 靠右偏移 */
  transform: translate(-50%, -50%);
  perspective: 2000px;
  z-index: 10;
}

/* 文件夹展开状态 */
.folder-spread {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px; /* 中缝间隙 */
  transform-style: preserve-3d;
}

/* 文件夹页面 - 通用，3:4 固定尺寸 */
.folder-page {
  width: 340px;
  height: 453px; /* 340 * 4/3 ≈ 453 */
  position: relative;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              z-index 0s 0.25s;
  transform-origin: center center;
  cursor: pointer;
}

/* 左侧页面 - 目录 */
.folder-left {
  transform-origin: right center;
  z-index: 1;
}

.folder-left:hover {
  transform: scale(1.05) rotateY(3deg) translateX(-10px);
  z-index: 10;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              z-index 0s 0s;
}

/* 右侧页面 - 内容预览 */
.folder-right {
  transform-origin: left center;
  z-index: 1;
}

.folder-right:hover {
  transform: scale(1.05) rotateY(-3deg) translateX(10px);
  z-index: 10;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              z-index 0s 0s;
}

/* 纸张效果 */
.page-paper {
  position: absolute;
  inset: 0;
  background: url('../page-texture.png') center/cover; /* 填满3:4容器 */
  background-color: #faf6f0;
  border-radius: 6px;
  overflow: hidden;
  /* 柔和的纸张阴影 */
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 8px 40px rgba(0, 0, 0, 0.1),
    /* 纸张边缘柔和暗角 */
    inset 0 0 80px rgba(160, 140, 120, 0.15);
}

/* 纸张边缘做旧效果 */
.page-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  /* 四角自然的做旧暗角 */
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(120, 100, 80, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 0%, rgba(120, 100, 80, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 0% 100%, rgba(120, 100, 80, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(120, 100, 80, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.folder-left .page-paper {
  border-radius: 4px 0 0 4px;
  margin-right: 2px;
}

.folder-right .page-paper {
  border-radius: 0 4px 4px 0;
  margin-left: 2px;
}

/* 悬浮时纸张阴影增强 */
.folder-page:hover .page-paper {
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.2),
    0 25px 60px rgba(0, 0, 0, 0.15),
    inset 0 0 80px rgba(160, 140, 120, 0.2);
}

/* 中缝装订线 */
.folder-spine {
  width: 0; /* 用 gap 代替 */
  display: none;
}

/* 页面内容区域 */
.page-content {
  position: absolute;
  inset: 30px;
  display: flex;
  flex-direction: column;
}

/* ============================================
   目录页样式 (左侧)
   ============================================ */
.toc-title {
  font-size: 24px;
  font-weight: 500;
  color: rgba(60, 45, 30, 0.9);
  letter-spacing: 0.15em;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(180, 150, 120, 0.3);
  font-family: 'Noto Sans SC', sans-serif;
}

.toc-categories {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* 类别 */
.toc-category {
  padding: 15px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(180, 150, 120, 0.15);
  transition: all 0.3s ease;
}

.toc-category:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(180, 150, 120, 0.25);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(180, 150, 120, 0.2);
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(80, 60, 40, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 类别下的项目列表 */
.category-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.toc-item:hover {
  background: rgba(200, 160, 120, 0.15);
}

.toc-item.active {
  background: rgba(200, 160, 120, 0.25);
}

.item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(180, 140, 100, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toc-item:hover .item-dot,
.toc-item.active .item-dot {
  background: rgba(200, 140, 80, 0.9);
  box-shadow: 0 0 8px rgba(200, 140, 80, 0.5);
}

.item-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(70, 55, 40, 0.85);
  letter-spacing: 0.03em;
}

.toc-item.active .item-name {
  color: rgba(60, 45, 30, 1);
  font-weight: 600;
}

/* ============================================
   预览页样式 (右侧)
   ============================================ */
.preview-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-header {
  text-align: center;
}

.preview-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 140, 80, 0.9);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  background: rgba(200, 160, 120, 0.15);
  border-radius: 20px;
  margin-bottom: 8px;
}

.preview-title {
  font-size: 28px;
  font-weight: 500;
  color: rgba(60, 45, 30, 0.95);
  letter-spacing: 0.1em;
  margin: 0;
}

.preview-image {
  flex: 1;
  min-height: 150px;
  background: linear-gradient(
    135deg,
    rgba(220, 200, 180, 0.3) 0%,
    rgba(200, 180, 160, 0.2) 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(180, 150, 120, 0.2);
}

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

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.7;
}

.placeholder-text {
  font-size: 14px;
  color: rgba(100, 80, 60, 0.6);
  letter-spacing: 0.1em;
}

.preview-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(80, 65, 50, 0.8);
  text-align: center;
  margin: 0;
}

.preview-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(200, 160, 120, 0.1);
  border-radius: 8px;
  animation: hintGlow 2s ease-in-out infinite;
}

@keyframes hintGlow {
  0%, 100% {
    background: rgba(200, 160, 120, 0.1);
  }
  50% {
    background: rgba(200, 160, 120, 0.2);
  }
}

.hint-icon {
  font-size: 16px;
}

.hint-text {
  font-size: 13px;
  color: rgba(160, 120, 80, 0.9);
  letter-spacing: 0.08em;
}

/* ============================================
   Works页面提示
   ============================================ */
.works-page {
  background: transparent !important;
  pointer-events: none; /* 允许点击穿透到背景的文件夹 */
}

.works-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 50;
  pointer-events: none;
}

.works-hint .hint-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: hintPulse 3s ease-in-out infinite;
}

/* ============================================
   作品详情全屏遮罩
   ============================================ */
.work-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 252, 248, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.work-detail-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(255, 252, 248, 0.97);
  backdrop-filter: blur(25px);
}

/* 关闭按钮 */
.work-detail-close {
  position: fixed;
  top: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(80, 70, 60, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(80, 70, 60, 0.6);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
  z-index: 1001;
}

.work-detail-overlay.active .work-detail-close {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.3s;
}

.work-detail-close:hover {
  background: rgba(80, 70, 60, 0.15);
  color: rgba(80, 70, 60, 0.9);
  transform: scale(1.1);
}

/* 可滚动区域 */
.work-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 80px 60px;
  display: flex;
  justify-content: center;
}

/* 详情内容 */
.work-detail-content {
  max-width: 900px;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-detail-overlay.active .work-detail-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* 作品详情卡片 */
.work-detail-card {
  background: url('../page-texture.png') center/cover;
  background-color: #faf6f0;
  border-radius: 20px;
  padding: 60px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(180, 150, 120, 0.2);
}

.work-detail-header {
  text-align: center;
  margin-bottom: 40px;
}

.work-detail-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 140, 80, 0.9);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 16px;
  background: rgba(200, 160, 120, 0.15);
  border-radius: 20px;
  margin-bottom: 15px;
}

.work-detail-title {
  font-size: 42px;
  font-weight: 400;
  color: rgba(60, 45, 30, 0.95);
  letter-spacing: 0.1em;
  margin: 0 0 12px;
}

.work-detail-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(100, 80, 60, 0.6);
  letter-spacing: 0.1em;
}

.work-detail-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(
    135deg,
    rgba(220, 200, 180, 0.3) 0%,
    rgba(200, 180, 160, 0.2) 100%
  );
  border-radius: 16px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(180, 150, 120, 0.2);
}

.work-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-detail-hero-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.work-detail-hero-placeholder .placeholder-icon {
  font-size: 72px;
  opacity: 0.5;
}

.work-detail-hero-placeholder .placeholder-text {
  font-size: 16px;
  color: rgba(100, 80, 60, 0.5);
}

.work-detail-body {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.work-detail-section {
  padding: 25px 0;
  border-bottom: 1px solid rgba(180, 150, 120, 0.15);
}

.work-detail-section:last-child {
  border-bottom: none;
}

.work-detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(160, 130, 100, 0.9);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.work-detail-description {
  font-size: 16px;
  line-height: 2;
  color: rgba(60, 50, 40, 0.8);
}

.work-detail-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.work-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(180, 150, 120, 0.1);
}

.work-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200, 160, 100, 0.8);
  flex-shrink: 0;
}

.work-feature-text {
  font-size: 14px;
  color: rgba(70, 55, 40, 0.85);
}

.work-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.work-detail-tag {
  padding: 8px 16px;
  background: rgba(180, 160, 140, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: rgba(80, 70, 60, 0.7);
  letter-spacing: 0.05em;
}

.work-detail-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.work-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(80, 60, 40, 0.9);
  color: rgba(255, 250, 245, 0.95);
  border-radius: 30px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.work-detail-link:hover {
  background: rgba(60, 45, 30, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(80, 60, 40, 0.3);
}

.work-detail-link.secondary {
  background: transparent;
  color: rgba(80, 60, 40, 0.8);
  border: 1px solid rgba(180, 150, 120, 0.3);
}

.work-detail-link.secondary:hover {
  background: rgba(200, 160, 120, 0.1);
  border-color: rgba(180, 150, 120, 0.5);
  box-shadow: none;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 1200px) {
  .photo-frame {
    width: 180px;
    height: 135px;
  }
  
  .photo-label {
    font-size: 15px;
  }
  
  .photo-sublabel {
    font-size: 11px;
  }
  
  .portfolio-folder {
    width: 85vw;
    height: 55vh;
  }
  
  .page-content {
    inset: 25px;
  }
  
  .toc-title {
    font-size: 20px;
  }
  
  .preview-title {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .photo-frame {
    width: 140px;
    height: 105px;
  }
  
  .photo-label {
    font-size: 13px;
  }
  
  .photo-sublabel {
    font-size: 10px;
  }
  
  .photo-detail-overlay {
    padding: 20px;
  }
  
  .detail-card {
    padding: 30px;
  }
  
  .detail-body {
    flex-direction: column;
  }
  
  .detail-image {
    flex: none;
    width: 100%;
  }
  
  .photo-detail-close {
    top: 20px;
    right: 20px;
  }
  
  /* Works 页面移动端适配 */
  .portfolio-folder {
    width: 95vw;
    height: auto;
    max-height: none;
  }
  
  .folder-spread {
    flex-direction: column;
    gap: 15px;
  }
  
  .folder-spine {
    width: 100%;
    height: 6px;
  }
  
  .folder-page {
    min-height: 300px;
  }
  
  .folder-left,
  .folder-right {
    transform-origin: center center;
  }
  
  .folder-left:hover,
  .folder-right:hover {
    transform: scale(1.02) translateY(-5px);
  }
  
  .folder-left .page-paper,
  .folder-right .page-paper {
    border-radius: 12px;
    margin: 0;
  }
  
  .page-content {
    inset: 20px;
  }
  
  .toc-title {
    font-size: 18px;
  }
  
  .toc-category {
    padding: 12px;
  }
  
  .category-name {
    font-size: 14px;
  }
  
  .toc-item {
    padding: 8px 10px;
  }
  
  .item-name {
    font-size: 13px;
  }
  
  .preview-title {
    font-size: 22px;
  }
  
  .preview-desc {
    font-size: 13px;
  }
  
  /* 作品详情移动端 */
  .work-detail-scroll {
    padding: 60px 20px;
  }
  
  .work-detail-card {
    padding: 30px;
  }
  
  .work-detail-title {
    font-size: 28px;
  }
  
  .work-detail-close {
    top: 20px;
    right: 20px;
  }
  
  .work-detail-features {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   INTERESTS 场景 - 书架展示墙
   ============================================ */

/* Interests场景 - 默认隐藏 */
.scene-interests {
  transform: rotateY(90deg) translateZ(50px);
  opacity: 0;
  pointer-events: none;
}

.scene-interests.active {
  transform: rotateY(0deg) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}

/* 书架背景 */
.interests-shelf-background {
  position: absolute;
  inset: 0;
}

.interests-shelf-background .bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center; /* 背景图靠右 */
}

/* 书架容器 - 支持缩放动画 */
.shelf-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s ease;
  transform-origin: center center;
}

.shelf-container.zoomed {
  opacity: 0;
  pointer-events: none;
}

/* 书架格子网格 - 层叠卡片组布局 */
.shelf-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 60px 80px;
  padding: 40px;
  max-width: 900px;
}

/* ============================================
   层叠卡片组样式
   ============================================ */
.card-stack {
  position: relative;
  width: 160px;
  height: 200px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-stack:hover {
  transform: translateY(-10px) scale(1.02);
}

/* 层叠卡片消失动画 */
.card-stack.hiding {
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  pointer-events: none;
}

/* 层叠卡片中的单张卡片 */
.stack-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  backface-visibility: hidden;
}

/* 层叠效果 - 错位排列 */
.stack-card:nth-child(1) {
  z-index: 5;
  transform: rotate(-2deg);
}
.stack-card:nth-child(2) {
  z-index: 4;
  transform: rotate(3deg) translate(8px, -6px);
}
.stack-card:nth-child(3) {
  z-index: 3;
  transform: rotate(-4deg) translate(-6px, -12px);
}
.stack-card:nth-child(4) {
  z-index: 2;
  transform: rotate(5deg) translate(10px, -18px);
}
.stack-card:nth-child(5) {
  z-index: 1;
  transform: rotate(-3deg) translate(-4px, -24px);
}

/* 悬浮时层叠展开预览 */
.card-stack:hover .stack-card:nth-child(1) {
  transform: rotate(-8deg) translate(-15px, 5px);
}
.card-stack:hover .stack-card:nth-child(2) {
  transform: rotate(8deg) translate(15px, -10px);
}
.card-stack:hover .stack-card:nth-child(3) {
  transform: rotate(-5deg) translate(-10px, -25px);
}
.card-stack:hover .stack-card:nth-child(4) {
  transform: rotate(6deg) translate(12px, -40px);
}
.card-stack:hover .stack-card:nth-child(5) {
  transform: rotate(-4deg) translate(-8px, -55px);
}

/* 卡片图片 */
.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 卡片占位符 */
.stack-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(100, 80, 60, 0.7) 0%,
    rgba(80, 60, 40, 0.8) 100%
  );
  font-size: 12px;
  color: rgba(255, 250, 245, 0.9);
  text-align: center;
  padding: 10px;
}

/* 分类标签 */
.stack-label {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  z-index: 10;
}

.stack-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 250, 245, 0.95);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stack-count {
  font-size: 11px;
  color: rgba(255, 250, 245, 0.7);
  margin-top: 2px;
}

/* 排名徽章 */
   ============================================ */
.category-detail-view {
  position: absolute;
  inset: 0;
  padding: 60px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.category-detail-view.active {
  opacity: 1;
  visibility: visible;
}

/* 聚焦背景效果 */
.category-detail-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 252, 248, 0.75) 0%,
    rgba(255, 252, 248, 0.92) 50%,
    rgba(255, 252, 248, 0.98) 100%
  );
  backdrop-filter: blur(8px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.category-detail-view.active::before {
  opacity: 1;
}

.category-detail-view .detail-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(180, 150, 120, 0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease 0.2s;
}

.category-detail-view.active .detail-header {
  opacity: 1;
  transform: translateY(0);
}

.category-detail-view .detail-title {
  font-size: 32px;
  font-weight: 400;
  color: rgba(60, 50, 40, 0.9);
  letter-spacing: 0.15em;
  margin: 0;
}

/* 展开的卡片网格 */
.detail-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 100px;
}

/* 返回提示 */
.scroll-back-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  background: rgba(80, 60, 40, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  font-size: 14px;
  color: rgba(255, 250, 245, 0.95);
  letter-spacing: 0.1em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.4s ease;
}

.category-detail-view.active .scroll-back-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.4s;
}

.scroll-back-hint:hover {
  background: rgba(60, 45, 30, 1);
  transform: translateX(-50%) translateY(-3px);
}

/* ============================================
   展开后的单个内容卡片
   ============================================ */
.interest-item {
  position: relative;
  width: 160px;
  border-radius: 14px;
  overflow: visible;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(40px) scale(0.9);
}

.category-detail-view.active .interest-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 卡片交错进入动画 */
.category-detail-view.active .interest-item:nth-child(1) { transition-delay: 0.1s; }
.category-detail-view.active .interest-item:nth-child(2) { transition-delay: 0.15s; }
.category-detail-view.active .interest-item:nth-child(3) { transition-delay: 0.2s; }
.category-detail-view.active .interest-item:nth-child(4) { transition-delay: 0.25s; }
.category-detail-view.active .interest-item:nth-child(5) { transition-delay: 0.3s; }
.category-detail-view.active .interest-item:nth-child(6) { transition-delay: 0.35s; }

.interest-item:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(200, 160, 100, 0.3);
}

/* 封面图片 */
.interest-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3; /* 海报比例 */
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

.interest-poster.square {
  aspect-ratio: 1/1; /* 音乐专辑 1:1 */
}

.interest-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.interest-item:hover .interest-poster img {
  transform: scale(1.08);
}

.interest-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(180, 160, 140, 0.4) 0%,
    rgba(160, 140, 120, 0.3) 100%
  );
  font-size: 14px;
  color: rgba(80, 60, 40, 0.7);
  text-align: center;
  padding: 15px;
}

/* 信息条 */
.interest-info {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.9);
}

.interest-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(60, 50, 40, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.interest-subtitle {
  font-size: 12px;
  color: rgba(100, 80, 60, 0.6);
  margin-top: 4px;
}

/* ============================================
   悬浮便利贴评价 - 滑入效果
   ============================================ */
.interest-review {
  position: absolute;
  top: 10px;
  right: -130px;
  width: 140px;
  padding: 14px;
  background: linear-gradient(145deg, #fffde7 0%, #fff9c4 100%);
  border-radius: 3px;
  box-shadow: 
    3px 3px 10px rgba(0, 0, 0, 0.15),
    -1px -1px 0 rgba(255, 255, 255, 0.9);
  transform: rotate(2deg) translateX(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 20;
}

/* 便利贴顶部折角效果 */
.interest-review::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 50%, transparent 50%);
}

.interest-item:hover .interest-review {
  opacity: 1;
  transform: rotate(2deg) translateX(0);
}

.review-text {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(60, 45, 30, 0.9);
  font-family: 'Noto Sans SC', sans-serif;
  margin-bottom: 8px;
}

.review-rating {
  font-size: 11px;
  color: rgba(200, 150, 50, 1);
  letter-spacing: 1px;
}

/* ============================================
   排名徽章
   ============================================ */
.interest-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(60, 40, 20, 0.9);
  box-shadow: 0 2px 8px rgba(255, 180, 0, 0.4);
  z-index: 5;
}

/* ============================================
   INTERESTS 详情弹窗
   ============================================ */
.interest-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 252, 248, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.interest-detail-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(255, 252, 248, 0.95);
  backdrop-filter: blur(20px);
}

.interest-detail-close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(80, 70, 60, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(80, 70, 60, 0.6);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
}

.interest-detail-overlay.active .interest-detail-close {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.15s;
}

.interest-detail-close:hover {
  background: rgba(80, 70, 60, 0.15);
  transform: scale(1.1);
}

.interest-detail-content {
  max-width: 700px;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.interest-detail-overlay.active .interest-detail-content {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.15s;
}

/* 详情卡片内容 */
.interest-detail-card {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.interest-detail-card .interest-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.interest-detail-card .interest-detail-title {
  font-size: 32px;
  font-weight: 500;
  color: rgba(60, 50, 40, 0.95);
  margin: 0;
}

.interest-detail-card .interest-detail-subtitle {
  font-size: 14px;
  color: rgba(100, 80, 60, 0.6);
  margin-top: 4px;
}

.interest-detail-card .interest-detail-poster {
  width: 100%;
  max-height: 350px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(200, 180, 160, 0.2) 0%,
    rgba(180, 160, 140, 0.1) 100%
  );
}

.interest-detail-card .interest-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.interest-detail-card .poster-placeholder {
  padding: 60px;
  font-size: 18px;
  color: rgba(100, 80, 60, 0.5);
}

.interest-detail-card .interest-detail-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.interest-detail-card .interest-detail-rating {
  font-size: 20px;
}

.interest-detail-card .interest-detail-review {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(70, 60, 50, 0.85);
  font-style: italic;
  padding: 20px;
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
  border-radius: 10px;
  border-left: 4px solid rgba(200, 160, 100, 0.5);
}

/* ============================================
   Interests页面提示
   ============================================ */
.interests-page {
  background: transparent !important;
  pointer-events: none;
}

.interests-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 50;
  pointer-events: none;
}

.interests-hint .hint-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: hintPulse 3s ease-in-out infinite;
}

/* ============================================
   INTERESTS 响应式适配
   ============================================ */
@media (max-width: 1200px) {
  .shelf-grid {
    gap: 50px 60px;
  }
  
  .card-stack {
    width: 140px;
    height: 175px;
  }
  
  .stack-title {
    font-size: 14px;
  }
  
  .category-detail-view {
    padding: 40px;
  }
  
  .detail-grid {
    gap: 25px;
  }
  
  .interest-item {
    width: 140px;
  }
}

@media (max-width: 768px) {
  .shelf-grid {
    gap: 40px 30px;
    padding: 20px;
  }
  
  .card-stack {
    width: 120px;
    height: 150px;
  }
  
  .stack-title {
    font-size: 13px;
  }
  
  .stack-label {
    bottom: -30px;
  }
  
  .category-detail-view {
    padding: 20px;
  }
  
  .category-detail-view .detail-title {
    font-size: 24px;
  }
  
  .detail-grid {
    gap: 20px;
    padding: 10px;
  }
  
  .interest-item {
    width: 130px;
  }
  
  .scroll-back-hint {
    bottom: 20px;
    padding: 12px 20px;
    font-size: 12px;
  }
  
  .interest-review {
    right: -100px;
    width: 110px;
    padding: 10px;
    font-size: 10px;
  }
  
  .interest-detail-overlay {
    padding: 20px;
  }
  
  .interest-detail-content {
    padding: 30px;
  }
  
  .interest-detail-card .interest-detail-title {
    font-size: 24px;
  }
  
  .interest-detail-close {
    top: 20px;
    right: 20px;
  }
}

/* ============================================
   CONTACT Scene - Vintage Letter Box
   ============================================ */

/* Contact场景 - 默认隐藏 */
.scene-contact {
  transform: rotateY(90deg) translateZ(50px);
  opacity: 0;
  pointer-events: none;
}

.scene-contact.active {
  transform: rotateY(0deg) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}

/* 背景图 */
.contact-background {
  position: absolute;
  inset: 0;
}

.contact-background .bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   Ambient Light Layer - 台灯暖光 + 胶片暗角
   ============================================ */
.contact-ambient-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* 台灯暖光光晕 - 从左上角扩散 */
.lamp-glow {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 65%;
  height: 60%;
  background: radial-gradient(
    ellipse at 30% 25%,
    rgba(255, 220, 160, 0.12) 0%,
    rgba(255, 200, 130, 0.06) 35%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 1.2s ease 0.5s;
}

.scene-contact.active .lamp-glow {
  opacity: 1;
}

/* 胶片暗角 */
.film-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 55%,
    rgba(30, 20, 10, 0.25) 100%
  );
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.scene-contact.active .film-vignette {
  opacity: 1;
}

/* ============================================
   Dust Particles - 灯光下的浮尘
   ============================================ */
.dust-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.dust {
  position: absolute;
  left: var(--dust-x, 20%);
  top: var(--dust-y, 30%);
  width: 3px;
  height: 3px;
  background: rgba(255, 235, 200, 0.5);
  border-radius: 50%;
  opacity: 0;
  animation: dustFloat var(--dust-dur, 8s) ease-in-out infinite;
  animation-delay: var(--dust-delay, 0s);
}

.scene-contact.active .dust {
  opacity: 1;
}

@keyframes dustFloat {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0;
  }
  15% {
    opacity: 0.7;
  }
  50% {
    transform: translate(30px, -20px) scale(1);
    opacity: 0.4;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translate(-15px, -45px) scale(0.3);
    opacity: 0;
  }
}

/* ============================================
   Handwritten Title - 手写标题
   ============================================ */
.contact-title-layer {
  position: absolute;
  z-index: 5;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.contact-handwritten-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 2.8vw, 42px);
  font-weight: 500;
  color: rgba(80, 60, 35, 0.35);
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease 0.8s, transform 0.8s ease 0.8s;
  text-shadow: 0 1px 3px rgba(255, 245, 230, 0.3);
  /* 模拟墨水在纸上微微晕开的效果 */
  filter: blur(0.3px);
}

.scene-contact.active .contact-handwritten-title {
  opacity: 1;
  transform: translateY(0);
}

/* 有信封被选中时标题淡出 */
.envelopes-layer.has-active ~ .contact-title-layer .contact-handwritten-title {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ============================================
   Ink Spots - 装饰性墨点
   ============================================ */
.ink-spots-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ink-spot {
  position: absolute;
  left: var(--spot-x, 50%);
  top: var(--spot-y, 70%);
  width: var(--spot-size, 3px);
  height: var(--spot-size, 3px);
  background: rgba(40, 30, 20, var(--spot-opacity, 0.1));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s ease 1.2s;
}

.scene-contact.active .ink-spot {
  opacity: 1;
}

/* ============================================
   信封层 - 散落在桌面上（逼真物理感）
   ============================================ */
.envelopes-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.envelope {
  position: absolute;
  left: var(--env-left, 30%);
  top: var(--env-top, 40%);
  width: clamp(160px, 18vw, 280px);
  cursor: pointer;
  pointer-events: auto;
  transform-origin: center center;
  /* 入场动画：从下方滑入 + 旋转到位 */
  opacity: 0;
  transform: rotate(0deg) translateY(60px) scale(0.8);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.4s ease,
              opacity 0.4s ease,
              z-index 0s;
  z-index: 1;
}

/* 场景激活后信封依次入场 */
.scene-contact.active .envelope {
  opacity: 1;
  transform: rotate(var(--env-rotate, 0deg)) translateY(0) scale(1);
  transition-delay: var(--env-delay, 0s);
  /* 入场后启动微呼吸 */
  animation: envelopeBreathe 4s ease-in-out infinite;
  animation-delay: calc(var(--env-delay, 0s) + 1s);
}

/* 每个信封微呼吸的相位差 */
.envelope:nth-child(1) { animation-delay: 1.1s; }
.envelope:nth-child(2) { animation-delay: 1.6s; }
.envelope:nth-child(3) { animation-delay: 2.1s; }
.envelope:nth-child(4) { animation-delay: 2.6s; }

@keyframes envelopeBreathe {
  0%, 100% { transform: rotate(var(--env-rotate, 0deg)) translateY(0) scale(1); }
  50% { transform: rotate(var(--env-rotate, 0deg)) translateY(-3px) scale(1.01); }
}

.envelope-img {
  width: 100%;
  height: auto;
  display: block;
  /* 模拟台灯从左上方打光的阴影 */
  filter: drop-shadow(4px 8px 16px rgba(0, 0, 0, 0.4))
          drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.2));
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* 手写风格平台标签 */
.envelope-label {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
  color: rgba(55, 40, 25, 0.85);
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(255, 245, 230, 0.5);
}

.envelope:hover .envelope-label {
  opacity: 1;
  transform: translateY(0);
}

/* 信封悬浮效果 - 被拿起的感觉 */
.envelope:hover {
  transform: rotate(var(--env-rotate, 0deg)) translateY(-18px) scale(1.12);
  z-index: 20;
  animation: none; /* 悬浮时停止呼吸 */
}

.envelope:hover .envelope-img {
  filter: drop-shadow(6px 18px 35px rgba(0, 0, 0, 0.45))
          drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.25))
          drop-shadow(0 0 20px rgba(210, 170, 110, 0.15));
}

/* 信封被选中 - 优雅飞起 */
.envelope.active {
  transform: rotate(0deg) translateY(-100px) scale(1.25);
  z-index: 30;
  animation: envelopeFloatActive 3s ease-in-out infinite 0.6s;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.4s ease;
}

.envelope.active .envelope-img {
  filter: drop-shadow(8px 30px 50px rgba(0, 0, 0, 0.5))
          drop-shadow(2px 6px 12px rgba(0, 0, 0, 0.3));
}

.envelope.active .envelope-label {
  opacity: 1;
  transform: translateY(0);
  font-size: clamp(26px, 3vw, 40px);
  color: rgba(45, 32, 18, 1);
}

@keyframes envelopeFloatActive {
  0%, 100% { transform: rotate(0deg) translateY(-100px) scale(1.25); }
  50% { transform: rotate(0.5deg) translateY(-110px) scale(1.25); }
}

/* 其他信封在有信封被选中时淡出 */
.envelopes-layer.has-active .envelope:not(.active) {
  opacity: 0.3;
  transform: rotate(var(--env-rotate, 0deg)) scale(0.9);
  pointer-events: none;
  filter: blur(1px);
  animation: none;
  transition: all 0.5s ease;
}

.envelopes-layer.has-active .envelope:not(.active) .envelope-label {
  opacity: 0;
}

/* 信封轻微浮动动画（已选中） - 保留旧规则兼容 */
.envelope.active {
  animation: envelopeFloatActive 3s ease-in-out infinite 0.6s;
}

/* 移除旧的 envelopeFloat，统一用 envelopeFloatActive */

/* ============================================
   联系信息卡片
   ============================================ */
.contact-info-card {
  position: absolute;
  top: 12%;
  right: 8%;
  transform: translateY(0) translateX(50px);
  width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 40;
}

.contact-info-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateX(0);
}

.contact-card-inner {
  background: rgba(255, 252, 248, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(200, 180, 160, 0.2);
}

.contact-card-content {
  text-align: center;
}

/* 卡片头部 - 图标 */
.contact-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.contact-card-icon.github { background: linear-gradient(135deg, #24292e 0%, #1a1e22 100%); }
.contact-card-icon.xtwitter { background: linear-gradient(135deg, #1a1a1a 0%, #333 100%); }
.contact-card-icon.linkedin { background: linear-gradient(135deg, #0a66c2 0%, #004182 100%); }
.contact-card-icon.xiaohongshu,
.contact-card-icon.小红书 { background: linear-gradient(135deg, #fe2c55 0%, #ff6b81 100%); }
.contact-card-icon.email { background: linear-gradient(135deg, #b48c64 0%, #8b6914 100%); }
.contact-card-icon.wechat { background: linear-gradient(135deg, #07c160 0%, #06ad56 100%); }

.contact-card-icon svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* 卡片标题 */
.contact-card-title {
  font-size: 22px;
  font-weight: 600;
  color: rgba(60, 50, 40, 0.95);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* 卡片描述/链接 */
.contact-card-value {
  font-size: 14px;
  color: rgba(100, 80, 60, 0.7);
  margin-bottom: 20px;
  word-break: break-all;
}

/* 二维码图片 */
.contact-card-qr {
  width: 160px;
  height: 160px;
  margin: 0 auto 15px;
  background: rgba(240, 235, 230, 0.5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.contact-card-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-card-qr-placeholder {
  font-size: 12px;
  color: rgba(100, 80, 60, 0.5);
}

/* 跳转按钮 */
.contact-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(80, 60, 40, 0.9);
  color: rgba(255, 250, 245, 0.95);
  border-radius: 30px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.contact-card-link:hover {
  background: rgba(60, 45, 30, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(80, 60, 40, 0.3);
}

.contact-card-link .arrow {
  transition: transform 0.3s ease;
}

.contact-card-link:hover .arrow {
  transform: translateX(3px);
}

/* ============================================
   Contact 页面提示
   ============================================ */
.contact-page {
  background: transparent !important;
  pointer-events: none;
}

.contact-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 50;
  pointer-events: none;
}

.contact-hint .hint-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(80, 70, 60, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: hintPulse 3s ease-in-out infinite;
}

/* ============================================
   CONTACT 响应式适配
   ============================================ */
@media (max-width: 1200px) {
  .contact-info-card {
    right: 5%;
    width: 260px;
  }

  .envelope.active {
    transform: rotate(0deg) translateY(-80px) scale(1.2);
  }

  @keyframes envelopeFloatActive {
    0%, 100% {
      transform: rotate(0deg) translateY(-80px) scale(1.2);
    }
    50% {
      transform: rotate(0.5deg) translateY(-88px) scale(1.2);
    }
  }
}

@media (max-width: 768px) {
  .envelope.active {
    transform: rotate(0deg) translateY(-60px) scale(1.15);
  }

  .envelope-label {
    font-size: 12px;
  }

  @keyframes envelopeFloatActive {
    0%, 100% {
      transform: rotate(0deg) translateY(-60px) scale(1.15);
    }
    50% {
      transform: rotate(0.5deg) translateY(-66px) scale(1.15);
    }
  }
  
  .contact-info-card {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%) translateY(100px);
    width: calc(100% - 40px);
    max-width: 320px;
  }
  
  .contact-info-card.active {
    transform: translateX(50%) translateY(0);
  }
  
  .contact-card-inner {
    padding: 25px;
  }
  
  .contact-card-qr {
    width: 140px;
    height: 140px;
  }
}
