/* ============================================
   PORTFOLIO — CSS MASTER STYLESHEET
   Dark minimal, high-contrast, 3D gallery
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #111111;
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.15);
  --white: #ffffff;
  --white-dim: rgba(255,255,255,0.55);
  --white-faint: rgba(255,255,255,0.15);
  --accent: #ffffff;
  --accent-alt: #cc1111;
  --font-main: 'Space Grotesk', 'Inter', sans-serif;
  --nav-h: 64px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- CUSTOM CURSOR ---------- */
.cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, opacity 0.2s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.15s ease, width 0.3s, height 0.3s, opacity 0.3s;
}
.cursor.hover { width: 6px; height: 6px; }
.cursor-ring.hover { width: 60px; height: 60px; border-color: rgba(204,17,17,0.6); }

/* ---------- LOADER ---------- */
#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;   /* 不用 inset，兼容旧 iOS */
  background: #000;
  z-index: 9990;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  z-index: 5;                  /* 在视频(z:1)和遮罩(z:2)之上 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 360px;
  padding: 0 20px;
}

.loader-text {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-align: center;
  max-width: 300px;
  line-height: 1.8;
  color: var(--white-dim);
  display: block;
  margin: 0 auto 20px;     /* ← 加了 auto 左右，让文字块本身居中 */
  text-transform: uppercase;
}
.loader-bar {
  width: 160px;             /* ← 从 200px 缩小 */
  height: 1px;
  background: var(--border);
  overflow: hidden;
  margin: 0 auto;
}


.loader-fill {
  height: 100%;
  background: var(--white);
  width: 0%;
  animation: loadFill 1.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes loadFill {
  0%   { width: 0%; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

/* loader 分屏面板 — 已废弃，改为单视频全屏 */

#loader.split-open { opacity: 0; pointer-events: none; }


/* ---------- NAVIGATION — always transparent ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  background: transparent;
  transition: none;
}
/* scrolled class kept in JS but does nothing visually */
#nav.scrolled { background: transparent; border-bottom: none; }

.nav-logo {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--white-dim);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--white);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

/* hero name 3D */
.hero-name-3d {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  perspective: 600px;
  display: block;
  white-space: nowrap;
}
.hero-name-3d span {
  display: inline-block;
  transition: transform 0.15s ease-out;
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-name-3d br { display: block; }

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-menu-btn span {
  display: block;
  width: 18px; height: 1px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-menu-btn.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { text-align: center; }
.mobile-menu li { margin: 20px 0; }
.mobile-link {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--white);
  opacity: 0.6;
  transition: opacity 0.2s;
}
.mobile-link:hover { opacity: 1; }

/* ---------- HERO SECTION ---------- */
#hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--bg);
}

/* Left Info Panel */
.hero-info {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 320px;
}

.hero-name h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
}
.hero-title {
  margin-top: 12px;
  font-size: 0.7rem;
  color: var(--white-dim);
  letter-spacing: 0.1em;
  line-height: 1.5;
}

.hero-contact { display: flex; flex-direction: column; gap: 10px; }
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-label {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: rgba(22, 21, 21, 0.3);
  font-weight: 600;
}
.contact-value {
  font-size: 0.72rem;
  color: #000000;
  letter-spacing: 0.05em;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-scroll-hint span {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.25);
}
.scroll-line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
  max-width: 60px;
}

/* Canvas Container */
.canvas-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#threeCanvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Canvas hint */
.canvas-overlay-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.5s;
}
.hint-text {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--white);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Right Counter */
.hero-counter {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.counter-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--white);
  transition: opacity 0.3s;
}
.counter-sep {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}
.counter-total {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--white-dim);
}

/* ---------- WORKS LIST ---------- */
.works-list-wrap {
  display: block;
  position: relative;
  padding: 40px 80px 80px;
}

/* 左侧作品网格 — 外层改为 flex 列，每个分类独立一块 */
.works-grid {
  max-width: calc(100% - 300px);
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 分类标题行 */
.wg-category-header {
  display: flex;
  align-items: center;
  padding: 28px 0 10px;
  gap: 16px;
}
/* 第一组不加顶部横线；从第二组起在标题上方加淡线 */
.wg-category-divider {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 16px;
  padding-top: 24px;
}

/* 分类名称文字 */
.wg-category-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
}

/* 每个分类下的卡片子网格 */
.wg-category-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}


/* 单个作品卡片 */
.wg-item {
  position: relative;
  cursor: pointer;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
}

/* 图片 */
.wg-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.5) grayscale(0.3);
  transform: scale(1.05);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
              filter 0.6s ease,
              box-shadow 0.6s ease;
}

/* 悬浮信息覆盖层 */
.wg-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;  
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.1) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.wg-num {
  font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.3em; color: #cc1111;
  margin-bottom: 5px;
}
.wg-title {
  font-size: 0.78rem; font-weight: 700;
  color: #fff; line-height: 1.2;
  margin-bottom: 4px;
}
.wg-cat {
  font-size: 0.58rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
}

/* 桌面悬浮效果 */
@media (hover: hover) {
  .wg-item:hover {
    z-index: 10;
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.5s ease;
  }
  .wg-item:hover img {
    filter: brightness(0.85) grayscale(0);
    transform: scale(1);
  }
  .wg-item:hover .wg-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 手机：点击激活态 */
.wg-item.tapped img {
  filter: brightness(0.75) grayscale(0);
  transform: scale(1);
}
.wg-item.tapped .wg-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* 播放器右侧固定，不变 */


/* 移动端：网格变 2 列，播放器移到下方 */
@media (max-width: 768px) {
  .works-list-wrap {
    padding: 24px 20px 240px;
  }
  .works-grid {
    max-width: 100%;
  }
  .wg-category-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}



/* ---------- ALBUM BOX SECTION (compact 45°) ---------- */
#albums {
  padding: 60px 80px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  overflow: visible;
}

.album-compact-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}

/* ── 盒子舞台 ── */
.album-box-stage {
  position: relative;
  flex-shrink: 0;
}

.album-box-hint {
  font-size: 0.55rem; letter-spacing: 0.22em;
  color: rgba(255,255,255,0.18);
  text-align: center;
  margin-top: 14px;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ── 整体盒体容器（45度斜视） ── */
.album-box {
  position: relative;
  width: 220px;
  height: 200px;
  transform-style: preserve-3d;
  transform: perspective(700px) rotateX(20deg) rotateY(-38deg);
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  cursor: default;
}
.album-box:hover {
  transform: perspective(700px) rotateX(14deg) rotateY(-28deg);
}

/* ── 金属底座 ── */
.box-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(160deg,
    #3c3c3c 0%,
    #2a2a2a 30%,
    #1a1a1a 70%,
    #252525 100%
  );
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    4px 8px 24px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 10px 14px 12px;
}
.box-slot {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.1),
    rgba(255,255,255,0.03)
  );
}

/* ── 透明亚克力前板 ── */
.box-face.box-front {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.28);
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.02) 50%,
    rgba(255,255,255,0.05) 100%
  );
  backdrop-filter: blur(1px);
  z-index: 20;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 12px 40px rgba(0,0,0,0.5);
}

/* ── 卡片堆叠区域 ── */
.album-cards-stack {
  position: absolute;
  top: 8px;
  left: 14px; right: 14px;
  bottom: 42%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* 单张卡片 */
.album-card {
  position: absolute;
  bottom: 0;
  width: 84%;
  aspect-ratio: 3/4;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.7);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.4s,
              filter 0.4s;
  filter: brightness(0.7);
}

/* 扇形分布：每张卡片从后到前依次展开 */
.album-card[data-idx="3"] {
  transform: translateX(18px) translateY(4px) rotate(12deg) scale(0.88);
  z-index: 1;
  transform-origin: bottom center;
}
.album-card[data-idx="2"] {
  transform: translateX(9px) translateY(2px) rotate(6deg) scale(0.92);
  z-index: 2;
  transform-origin: bottom center;
}
.album-card[data-idx="1"] {
  transform: translateX(2px) translateY(0px) rotate(2deg) scale(0.96);
  z-index: 3;
  transform-origin: bottom center;
}
.album-card[data-idx="0"] {
  transform: translateX(-4px) translateY(-2px) rotate(-2deg) scale(1);
  z-index: 4;
  transform-origin: bottom center;
  filter: brightness(0.92);
}

/* hover 拉出效果 */
.album-card:hover {
  filter: brightness(1) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.85) !important;
  z-index: 25 !important;
}
.album-card[data-idx="3"]:hover { transform: translateX(18px) translateY(-30px) rotate(12deg) scale(0.92) !important; }
.album-card[data-idx="2"]:hover { transform: translateX(9px) translateY(-28px) rotate(6deg) scale(0.96) !important; }
.album-card[data-idx="1"]:hover { transform: translateX(2px) translateY(-26px) rotate(2deg) scale(0.99) !important; }
.album-card[data-idx="0"]:hover { transform: translateX(-4px) translateY(-28px) rotate(-2deg) scale(1.03) !important; }

/* 播放中高亮 */
.album-card.playing {
  filter: brightness(1) !important;
  box-shadow: 0 0 0 2px rgba(204,17,17,0.6), 0 12px 32px rgba(0,0,0,0.8) !important;
  z-index: 22 !important;
}
.album-card[data-idx="0"].playing { transform: translateX(-4px) translateY(-24px) rotate(-2deg) scale(1.04) !important; }
.album-card[data-idx="1"].playing { transform: translateX(2px) translateY(-22px) rotate(2deg) scale(1.02) !important; }
.album-card[data-idx="2"].playing { transform: translateX(9px) translateY(-22px) rotate(6deg) scale(0.98) !important; }
.album-card[data-idx="3"].playing { transform: translateX(18px) translateY(-22px) rotate(12deg) scale(0.94) !important; }

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

/* 播放覆盖层 */
.album-card-play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.album-card:hover .album-card-play-overlay { background: rgba(0,0,0,0.25); }
.album-card.playing .album-card-play-overlay { background: rgba(0,0,0,0.1); }
.play-overlay-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: #000;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
}
.album-card:hover .play-overlay-icon { opacity: 1; transform: scale(1); }
.album-card.playing .play-overlay-icon { opacity: 1; transform: scale(1); background: rgba(204,17,17,0.9); }

/* 标签 */
.album-card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 20px 8px 7px;
  display: flex; align-items: baseline; gap: 5px;
}
.ac-num { font-size: 0.48rem; font-weight: 700; letter-spacing: 0.18em; color: var(--accent-alt); }
.ac-title { font-size: 0.6rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 右侧迷你播放器 ── */
.album-mini-player {
  flex: 1;
  min-width: 0;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
.album-mini-player.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.amp-num { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.28em; color: var(--accent-alt); margin-bottom: 6px; }
.amp-title { font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 3px; line-height: 1.2; }
.amp-sub { font-size: 0.68rem; color: var(--white-dim); margin-bottom: 18px; letter-spacing: 0.06em; }
.amp-status {
  font-size: 0.58rem; letter-spacing: 0.2em;
  color: var(--accent-alt);
  margin-bottom: 12px;
  min-height: 1.2em;
}
.amp-progress-wrap { margin-bottom: 8px; }
.amp-progress-bar {
  width: 100%; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.amp-progress-fill {
  height: 100%;
  background: var(--white);
  border-radius: 2px;
  width: 0%;
  transition: width 0.25s linear;
  pointer-events: none;
}
.amp-time {
  display: flex; justify-content: space-between;
  font-size: 0.58rem; color: rgba(255,255,255,0.3);
  margin-top: 5px; letter-spacing: 0.04em;
}

/* ---------- SOUND WIDGET · 黑胶唱片 ---------- */

/* 整体容器：works 右侧竖向居中 */
.sound-widget {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: all;
}

/* ── 唱片整体包裹（点击展开/关闭曲目列表） ── */
.vinyl-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  cursor: pointer;
  flex-shrink: 0;
}

/* SOUND ARCHIVE 文字标签 */
.vinyl-title-tag {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.3s;
}
.vinyl-wrap:hover .vinyl-title-tag { color: rgba(255,255,255,0.55); }

/* ── 黑胶唱片圆盘 ── */
.vinyl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    /* 最外圈亮边 */
    radial-gradient(circle, transparent 46%, rgba(255,255,255,0.06) 46.5%, transparent 47%),
    /* 纹路环（多层同心圆模拟） */
    repeating-radial-gradient(
      circle,
      #111 0px,
      #111 1.5px,
      #1a1a1a 1.5px,
      #1a1a1a 3px
    );
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 8px 40px rgba(0,0,0,0.9),
    inset 0 0 30px rgba(0,0,0,0.5);
  transition: box-shadow 0.4s;
  will-change: transform;
}
.vinyl-wrap:hover .vinyl-disc {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.16),
    0 12px 50px rgba(0,0,0,0.95),
    inset 0 0 30px rgba(0,0,0,0.5);
}

/* 高光弧 */
.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    transparent 0deg,
    rgba(255,255,255,0.04) 20deg,
    transparent 40deg,
    rgba(255,255,255,0.02) 80deg,
    transparent 120deg
  );
  pointer-events: none;
}

/* ── 中心标签（封面图） ── */
.vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.vinyl-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: opacity 0.35s;
}

/* 中心小孔 */
.vinyl-center-hole {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #000;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
  pointer-events: none;
}

/* ── 唱针臂 ── */
.vinyl-arm-wrap {
  position: absolute;
  top: -8px;
  right: -14px;
  width: 70px;
  height: 70px;
  transform-origin: 14px 14px;   /* 轴心在左上角圆点 */
  transform: rotate(-28deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10;
}
.vinyl-arm-wrap.dropped {
  transform: rotate(-6deg);   /* 落针时转向唱片 */
}

.vinyl-arm {
  position: absolute;
  top: 14px; left: 14px;
  width: 10px;
  height: 60px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.7) 0%,
    rgba(180,180,180,0.5) 60%,
    rgba(120,120,120,0.4) 100%
  );
  border-radius: 5px 5px 2px 2px;
  transform-origin: top center;
  transform: rotate(10deg);
  box-shadow: 1px 2px 6px rgba(0,0,0,0.6);
}
/* 转盘轴心圆点 */
.vinyl-arm-wrap::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #ccc 30%, #888 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
/* 针尖 */
.vinyl-arm-needle {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: rgba(204,17,17,0.9);
  border-radius: 0 0 2px 2px;
}

/* ── 曲目列表（点击唱片弹出，在唱片正下方） ── */
.vinyl-tracklist {
  width: 200px;
  background: rgba(8,8,8,0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 30px;   /* 留出 vinyl-title-tag 的空间 */
  transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1),
              opacity 0.3s ease;
  pointer-events: none;
}
.vinyl-tracklist.open {
  max-height: 280px;
  opacity: 1;
  pointer-events: all;
}

/* 曲目条目 */
.vtl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.vtl-item:last-of-type { border-bottom: none; }
.vtl-item:hover { background: rgba(255,255,255,0.05); }
.vtl-item.vtl-active { background: rgba(255,255,255,0.04); }

.vtl-num {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: color 0.2s;
}
.vtl-item:hover .vtl-num,
.vtl-item.vtl-active .vtl-num { color: var(--accent-alt); }

.vtl-name {
  flex: 1;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.vtl-item:hover .vtl-name,
.vtl-item.vtl-active .vtl-name { color: var(--white); }

.vtl-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  font-size: 0;
  transition: background 0.2s;
}
.vtl-dot.vtl-playable {
  background: none;
  font-size: 0.5rem;
  color: rgba(204,17,17,0.6);
  width: auto; height: auto;
}
.vtl-item.vtl-active .vtl-dot { background: var(--accent-alt); }

/* 进度条区域（列表底部） */
.vtl-progress {
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.vtl-prog-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin-bottom: 5px;
}
.vtl-prog-fill {
  height: 100%;
  background: var(--white);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s linear;
  pointer-events: none;
}
.vtl-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.48rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}
#swStatus {
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--accent-alt);
}

/* ---------- SECTIONS SHARED ---------- */
section:not(#hero) {
  padding: 120px 80px;
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 64px;
}
.section-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.2);
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

/* ---- PDF 作品集入口按钮 ---- */
.portfolio-pdf-btn {
  margin-left: auto;              /* 推到右侧 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: var(--font-main);
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  cursor: pointer;
  text-decoration: none;
}
.portfolio-pdf-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
}
.pdf-btn-arrow {
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.3s;
}
.portfolio-pdf-btn:hover .pdf-btn-arrow {
  transform: translate(2px, -2px);
}

/* ---------- WORKS SECTION ---------- */
#works { background: var(--bg); padding: 80px 0 0; }
#works .section-header { padding: 0 80px; margin-bottom: 40px; }

/* ---------- ABOUT SECTION ---------- */
#about { background: var(--bg); }

.about-layout {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1140px;
}

/* ── About 3D 左列包裹容器 ── */
.about-3d-col {
  display: flex;
  flex-direction: column;
}

/* ── About 3D canvas ── */
.about-3d-wrap {
  width: 100%;
  height: 460px;
  position: relative;
  cursor: grab;
}
.about-3d-wrap:active { cursor: grabbing; }
.about-3d-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 4px;
}

/* 3D 模型下方提示文字 */
.about-3d-hint {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  text-align: center;
  margin-top: 12px;
  font-family: var(--font-main);
  user-select: none;
}

.about-lead {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 28px;
  color: var(--white);
}
.about-body {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--white-dim);
  margin-bottom: 40px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.about-skills span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border-light);
  color: var(--white-dim);
  transition: color 0.2s, border-color 0.2s;
}
.about-skills span:hover {
  color: var(--white);
  border-color: var(--white);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.stat-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.stat-item:first-child { border-top: 1px solid var(--border); }
.stat-num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--white);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--white-dim);
  letter-spacing: 0.12em;
  margin-top: 6px;
}

/* ---------- CONTACT SECTION ---------- */
#contact { background: var(--bg); }

.contact-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-cta {
  margin-bottom: 80px;
}
.contact-lead {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 400;
  color: var(--white-dim);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.5;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  border: 1px solid var(--white);
  padding: 18px 32px;
  color: var(--white);
  transition: background 0.3s, color 0.3s;
  position: relative;
  overflow: hidden;
}
.contact-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.contact-btn:hover::before { transform: translateX(0); }
.contact-btn:hover { color: var(--bg); }
.contact-btn span, .btn-arrow { position: relative; z-index: 1; }

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}
.social-link {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--white-dim);
  transition: color 0.2s;
}
.social-link:hover { color: var(--white); }

/* ---------- FOOTER ---------- */
#footer {
  padding: 32px 80px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left, .footer-right {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.2);
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 48px;
  transform: translateY(24px);
  transition: transform 0.35s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: var(--white-dim);
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--white); }
.modal-content { color: var(--white); }
.modal-content h3 { font-size: 1.6rem; margin-bottom: 16px; font-weight: 700; }
.modal-content p { color: var(--white-dim); line-height: 1.8; font-size: 0.9rem; }


/* ---------- SCROLL REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  section:not(#hero) { padding: 90px 48px; }
  #albums { padding: 48px 48px 32px; }
  #works { padding: 64px 0 0; }
  #works .section-header { padding: 0 48px; }
  #footer { padding: 32px 48px; }
  #nav { padding: 0 32px; }
  .hero-info { left: 32px; }
  .hero-counter { right: 32px; }
  .about-layout { grid-template-columns: 1fr; gap: 48px; }
  .about-3d-wrap { height: 360px; }
  .album-compact-wrap { gap: 40px; }
  .dial-info-panel { left: 40px; }
}

@media (max-width: 768px) {
  #nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  section:not(#hero) { padding: 72px 24px; }
  #works { padding: 56px 0 0; }
  #works .section-header {
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  .portfolio-pdf-btn {
    font-size: 0.52rem;
    padding: 6px 14px;
    letter-spacing: 0.15em;
  }
  #footer { padding: 24px; }

  .hero-info {
    left: 20px;
    top: auto;
    bottom: 80px;
    transform: none;
    max-width: 280px;
    gap: 24px;
  }
  .hero-counter { right: 20px; top: auto; bottom: 80px; transform: none; }
  .hero-name-3d { font-size: 2.4rem; }

  .dial-stage { height: 60vh; min-height: 380px; }
  .dial-info-panel { left: 20px; max-width: 200px; }
  .dip-title { font-size: 1.6rem; }
  .sound-widget { right: 16px; }
  .vinyl-wrap { width: 160px; height: 160px; }
  .vinyl-label { width: 60px; height: 60px; }

  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-3d-wrap { height: 300px; }
  .contact-social { gap: 20px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-name-3d { font-size: 2rem; }
  .hero-scroll-hint { display: none; }
  .contact-btn { padding: 14px 22px; }
  .dial-stage { height: 50vh; min-height: 300px; }
  .dial-info-panel { left: 16px; }

  .album-box {
    width: 180px; height: 165px;
    transform: perspective(500px) rotateX(14deg) rotateY(-28deg);
  }
  .album-compact-wrap { gap: 20px; }
}

 .envelope-wrap { display:flex; justify-content:center; padding:80px 0; }
.envelope { position:relative; width:320px; height:240px; }
.envelope-flap {
  position:absolute; top:0; left:0; width:100%; height:50%;
  background:#e8e4dc; clip-path:polygon(0 0,50% 100%,100% 0);
  transform-origin:top center; transform:rotateX(0deg);
  transition:transform 0.6s ease; transform-style:preserve-3d;
  z-index:3;
}
.envelope-body {
  position:absolute; bottom:0; left:0;
  width:100%; height:85%; background:#e8e4dc; border-radius:0 0 8px 8px;
  z-index:1;
}
.envelope-card {
  position:absolute; left:10%; width:80%;
  background:#f5f3ef; border-radius:4px; padding:24px;
  text-align:center; z-index:2;
  bottom:20px; transition:transform 0.8s ease 0.3s;
}
.envelope-card-text {
  color: #333; /* 修改这里的颜色 */
  font-size: 1rem;
  margin-bottom: 16px;
}
.envelope-card-btn {
  color: #000000; /* 修改这里的颜色 */
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s;
}
.envelope-card-btn:hover {
  background: #cc1111;
  color: #fff;
}
.envelope.open .envelope-flap { transform:rotateX(180deg); }
.envelope.open .envelope-card { transform:translateY(-120px); }