﻿:root {
  --gold: #D4AF37;
  --gold-dim: rgba(212, 175, 55, 0.4);
  --bg-color: #050505;
  --text-main: #E0E0E0;
  --text-muted: #6a6a6a;
}

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

body,
html {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  scroll-behavior: smooth;
  scroll-padding-top: 10vh;
  /* Hide scrollbar for Firefox */
  scrollbar-width: none !important;
  /* Hide scrollbar for IE and Edge */
  -ms-overflow-style: none !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Custom Cursor */
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: width 0.2s, height 0.2s, background 0.2s;
}

#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99998;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

body.cursor-hover #cursor-dot {
  width: 0px;
  height: 0px;
  background: transparent;
}

body.cursor-hover #cursor-ring {
  width: 80px;
  height: 80px;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
  backdrop-filter: blur(2px);
}

/* Noise Background */
.noise-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.vw-section {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15vh 10vw;
}

/* Hero Section */
.hero-section {
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 0;
  margin-bottom: 20vh;
}

.hero-wrapper {
  perspective: 1000px;
  display: inline-block;
  position: relative;
}

.line-mask {
  overflow: hidden;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: 13vw;
  line-height: 0.85;
  font-weight: 700;
  letter-spacing: -0.02em;
  transform: translateY(110%);
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
  color: var(--text-main);
  margin-top: 1vw;
}

.hero-title.gold {
  color: var(--gold);
  padding-left: 15vw;
}

.hero-section.is-visible .hero-title {
  transform: translateY(0);
}

.hero-subtitle {
  margin-top: 6vh;
  font-size: 1rem;
  letter-spacing: 0.4em;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.5s ease 0.6s;
  text-transform: uppercase;
  font-weight: 300;
}

.hero-section.is-visible .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}

.scroll-prompt {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 1s 1.5s;
}

.hero-section.is-visible .scroll-prompt {
  opacity: 1;
}

.scroll-line {
  width: 1px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: var(--gold);
  animation: scrollDown 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(300%);
  }
}

/* Section Header */
.section-header {
  margin-bottom: 15vh;
}

.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 3vw;
  color: var(--gold);
  letter-spacing: 0.1em;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  font-weight: 400;
}

.vw-section.is-visible .section-header h2 {
  transform: translateY(0);
}

/* Instruments List */
.inst-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10vw 5vw;
}

.inst-category {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.vw-section.is-visible .inst-category {
  opacity: 1;
  transform: translateY(0);
}

.vw-section.is-visible .inst-category:nth-child(2) {
  transition-delay: 0.1s;
}

.vw-section.is-visible .inst-category:nth-child(3) {
  transition-delay: 0.2s;
}

.vw-section.is-visible .inst-category:nth-child(4) {
  transition-delay: 0.3s;
}

.cat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.inst-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.inst-item {
  position: relative;
  font-size: 2.5vw;
  font-family: 'Cinzel', serif;
  color: var(--text-main);
  font-weight: 300;
  padding: 10px 0;
  display: inline-block;
  width: fit-content;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.inst-item span {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hover-bg {
  position: absolute;
  top: 50%;
  left: -20px;
  width: 0;
  height: 1px;
  background: var(--gold);
  z-index: 1;
  transform: translateY(-50%);
  transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.inst-item:hover {
  color: var(--gold);
  transform: translateX(30px);
  letter-spacing: 2px;
}

.inst-item:hover .hover-bg {
  width: calc(100% + 40px);
  opacity: 0.3;
  height: 100%;
  border-radius: 2px;
}

.inst-item.playing {
  animation: pulseHit 0.3s ease-out;
  color: #fff;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

@keyframes pulseHit {
  0% {
    transform: translateX(30px) scale(1);
  }

  50% {
    transform: translateX(30px) scale(1.05);
  }

  100% {
    transform: translateX(30px) scale(1);
  }
}

/* Timeline */
.timeline-section {
  padding-top: 10vh;
  padding-bottom: 20vh;
  height: 300vh;
  justify-content: flex-start;
}

.timeline-container {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 5vh;
}

.line-base {
  position: absolute;
  left: 10vw;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
}

.line-fill {
  position: absolute;
  left: 10vw;
  top: 0;
  width: 1px;
  height: 0%;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold);
  transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.time-node {
  position: absolute;
  left: 10vw;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
  width: 100%;
}

.node-circle {
  width: 15px;
  height: 15px;
  background: var(--bg-color);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all 0.5s ease;
  z-index: 2;
}

.node-content {
  padding-left: 6vw;
  opacity: 0.2;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  margin-top: -15px;
}

.node-year {
  font-family: 'Cinzel', serif;
  font-size: 4vw;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 400;
  transition: transform 0.3s;
  display: inline-block;
}

.node-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.8;
  font-weight: 300;
}

.time-node.active .node-circle {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
  transform: translateX(-50%) scale(1.5);
}

.time-node.active .node-content {
  opacity: 1;
  transform: translateX(0);
}

.time-node.active .node-year:hover {
  color: var(--gold);
}

/* Canvas Section */
.canvas-section {
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
}

.overlap-header {
  position: absolute;
  top: 10vh;
  left: 10vw;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: difference;
}

#section-canvas {
  position: relative;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-color);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.5em;
  color: var(--text-muted);
  z-index: 100;
  transition: opacity 0.8s ease, letter-spacing 0.4s;
  cursor: none;
}

.loading:hover {
  letter-spacing: 0.8em;
  color: var(--gold);
}

@media (max-width: 768px) {
  .inst-showcase {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 15vw;
  }

  .inst-item {
    font-size: 1.5rem;
  }

  .node-year {
    font-size: 2rem;
  }
}

/* SVG 图标样式调整 */
.inst-icon {
  width: 32px;
  height: 32px;
  margin-right: 15px;
  filter: none;
  /* 原本纯白直接显示 */
  opacity: 0.7;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* 悬浮时图标的动效，与字体产生协同 */
.inst-item:hover .inst-icon {
  opacity: 1;
  transform: scale(1.1);
  filter: brightness(0) saturate(100%) invert(75%) sepia(47%) saturate(543%) hue-rotate(7deg) brightness(96%) contrast(89%);
  /* brightness(0)归黑后映射成金色 */
}

/* 修正内部画布留白较多导致偏小的特定SVG，使它们在视觉上与其他图标尺寸一致 */
img[src*="大号.svg"],
img[src*="萨克斯.svg"] {
  transform: scale(1.5);
}

.inst-item:hover img[src*="大号.svg"],
.inst-item:hover img[src*="萨克斯.svg"] {
  transform: scale(1.65);
  /* 基础放大 1.5 倍 × 悬浮放大 1.1 倍 */
}

/* 修正 flex 布局以更好地容纳图标和文字纵向居中 */
.inst-item {
  display: flex !important;
  align-items: center;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
  border: 1px solid var(--gold-dim);
  padding: 3.5rem 5rem;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(212, 175, 55, 0.2);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
}

.modal-close:hover {
  color: var(--gold);
  transform: rotate(90deg);
}

.modal-title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 2rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.modal-text {
  font-size: 1.25rem;
  color: var(--text-main);
  line-height: 1.8;
  max-width: 500px;
  font-weight: 300;
  letter-spacing: 1px;
}

/* Step by Step Subtitle */
.step-subtitle {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.25rem;
  letter-spacing: 6px;
  opacity: 0.8;
  margin-top: 10px;
  text-transform: uppercase;
}

/* Adjusted Timeline Section for more items */
.timeline-section {
  min-height: 250vh;
  /* Increased from 150vh to 250vh for 11 items */
}

/* Footer / Audio Credits */
.site-footer {
  padding: 5vh 10vw 8vh;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-content {
  max-width: 800px;
}

.footer-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links li a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 300;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  cursor: none;
  /* Keep custom cursor working */
}

.footer-links li a:hover {
  color: var(--gold);
  letter-spacing: 1px;
}

.canvas-section {
  height: 100vh;
  padding: 0;
  overflow: hidden;
  position: relative;
}