/* 基础样式 */
:root {
  --primary: #2c3e50;
  --accent: #e74c3c;
  --muted: #7f8c8d;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--primary);
  background: var(--light);
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

body {
  scroll-behavior: smooth;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 章节样式 */
.section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 2rem 0;
  position: relative;
}



.section--center {
  justify-content: center;
  text-align: center;
}

/* 标题样式 */
.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  color: var(--primary);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin: 2.5rem 0 1.5rem 0;
  color: var(--primary);
  font-weight: 600;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

/* 段落样式 */
p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* 时间轴导航 */
.timeline-nav {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.timeline-nav a:hover, .timeline-nav a.active {
  color: var(--accent);
}

.timeline-nav .dot {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--muted);
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.timeline-nav a.active .dot {
  background: var(--accent);
  transform: scale(1.2);
}

.timeline-nav label {
  font-size: 0.9rem;
  white-space: nowrap;
}

/* 时间轴列表 */
.timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.timeline li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-left: 2px solid var(--accent);
  margin-left: 1rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 1.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--accent);
  border-radius: 50%;
}

.timeline li strong {
  color: var(--accent);
  font-weight: 600;
}

/* 图片和嵌入样式 */
.image-wide {
  margin: 2rem 0;
  text-align: center;
}

.image-wide img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.embed {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 左右构图布局 */
.split-layout {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5rem;
  align-items: center;
  min-height: 60vh;
  width: 100%;
}

/* 确保左右布局在桌面端正常工作 */
@media (min-width: 769px) {
  .split-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    flex-direction: unset !important;
  }
  
  .split-text {
    grid-column: 1;
  }
  
  .split-image {
    grid-column: 2;
  }
}

.split-text {
  padding-right: 3rem;
  width: 100%;
}

.split-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--primary);
}

.split-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.split-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 简介页面的图片特殊样式 */
#intro .split-image img {
  width: 120%;
  max-width: 120%;
  margin-left: -10%;
}

.split-image .embed {
  width: 100%;
  margin: 0;
}

/* 可拖动图片样式 */
.scrollable-image {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: grab;
  user-select: none;
}

.scrollable-image:active {
  cursor: grabbing;
}

.scrollable-image img {
  width: auto;
  height: 60vh;
  max-width: none;
  display: inline-block;
  border-radius: 8px;
}

/* 时间轴1的两张图片并排显示 */
#timeline1 .image-wide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2%;
}

#timeline1 .image-wide img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 自定义时间轴样式 */
.custom-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.custom-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #ffd700, #ffed4e);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.timeline-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: #ffd700;
  border: 4px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.timeline-content {
  width: 40%;
  position: relative;
  margin-left: auto;
  padding-left: 3rem;
}

.timeline-text {
  background: #f0f8f0;
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
}

.timeline-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -16px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-right-color: #ffd700;
  transform: translateY(-50%);
}

.timeline-text strong {
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-text p {
  margin: 0;
  color: #34495e;
  line-height: 1.6;
}

.timeline-image-left {
  position: absolute;
  left: 0px;
  top: 50%;
  width: 350px;
  transform: translateY(-50%);
}

.timeline-image-left::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-left-color: #ffd700;
  transform: translateY(-50%);
  z-index: 5;
}

.timeline-image-left img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 页脚 */
.site-footer {
  background: var(--dark);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

/* 剪贴画堆砌效果 */
.collage-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 1000;
  transition: opacity 1s ease;
  opacity: 0;
  pointer-events: none;
  display: none;
}

.collage-container.show {
  opacity: 1;
  pointer-events: none;
  display: block;
}

.collage-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.collage-item {
  position: absolute;
  width: 300px;
  height: 360px;
  transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  z-index: 10;
}

.collage-item:nth-child(1) { width: 340px; height: 400px; }
.collage-item:nth-child(2) { width: 280px; height: 340px; }
.collage-item:nth-child(3) { width: 320px; height: 380px; }
.collage-item:nth-child(4) { width: 300px; height: 350px; }
.collage-item:nth-child(5) { width: 330px; height: 390px; }
.collage-item:nth-child(6) { width: 290px; height: 345px; }
.collage-item:nth-child(7) { width: 310px; height: 375px; }
.collage-item:nth-child(8) { width: 325px; height: 385px; }
.collage-item:nth-child(9) { width: 270px; height: 335px; }
.collage-item:nth-child(10) { width: 335px; height: 395px; }
.collage-item:nth-child(11) { width: 300px; height: 370px; }
.collage-item:nth-child(12) { width: 320px; height: 380px; }
.collage-item:nth-child(13) { width: 280px; height: 340px; }

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border: 3px solid white;
}

.collage-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 20;
  color: var(--primary);
  transition: opacity 1s ease;
}

.collage-text h2 {
  font-size: 3.5rem;
  margin-bottom: 0;
  color: #000000;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
}

.collage-text p {
  font-size: 1.2rem;
  color: var(--primary);
}

/* 四散动画效果 */
.collage-item.scatter {
  animation: scatter 0.6s ease-out forwards;
}

@keyframes scatter {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: scale(0.9) rotate(var(--scatter-rotation)) translate(var(--scatter-x), var(--scatter-y));
    opacity: 0.8;
  }
  100% {
    transform: scale(0.7) rotate(var(--scatter-rotation)) translate(calc(var(--scatter-x) * 2), calc(var(--scatter-y) * 2));
    opacity: 0;
  }
}

/* 为每个剪贴画设置不同的四散方向 */
.collage-item:nth-child(1).scatter {
  --scatter-rotation: -45deg;
  --scatter-x: -120px;
  --scatter-y: -120px;
}

.collage-item:nth-child(2).scatter {
  --scatter-rotation: 45deg;
  --scatter-x: 120px;
  --scatter-y: -120px;
}

.collage-item:nth-child(3).scatter {
  --scatter-rotation: -30deg;
  --scatter-x: -180px;
  --scatter-y: 60px;
}

.collage-item:nth-child(4).scatter {
  --scatter-rotation: 60deg;
  --scatter-x: 180px;
  --scatter-y: 60px;
}

.collage-item:nth-child(5).scatter {
  --scatter-rotation: -15deg;
  --scatter-x: -100px;
  --scatter-y: 180px;
}

.collage-item:nth-child(6).scatter {
  --scatter-rotation: 30deg;
  --scatter-x: 100px;
  --scatter-y: 180px;
}

.collage-item:nth-child(7).scatter {
  --scatter-rotation: -60deg;
  --scatter-x: -140px;
  --scatter-y: -60px;
}

.collage-item:nth-child(8).scatter {
  --scatter-rotation: 15deg;
  --scatter-x: 140px;
  --scatter-y: -60px;
}

.collage-item:nth-child(9).scatter {
  --scatter-rotation: -25deg;
  --scatter-x: -160px;
  --scatter-y: -80px;
}

.collage-item:nth-child(10).scatter {
  --scatter-rotation: 35deg;
  --scatter-x: 160px;
  --scatter-y: -80px;
}

.collage-item:nth-child(11).scatter {
  --scatter-rotation: -20deg;
  --scatter-x: -90px;
  --scatter-y: 200px;
}

.collage-item:nth-child(12).scatter {
  --scatter-rotation: 25deg;
  --scatter-x: 90px;
  --scatter-y: 200px;
}

.collage-item:nth-child(13).scatter {
  --scatter-rotation: -40deg;
  --scatter-x: -110px;
  --scatter-y: 140px;
}

/* 时间轴2的横向时间轴样式 */
.horizontal-timeline-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: grab;
  user-select: none;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin-top: 2rem;
}

.horizontal-timeline-container:active {
  cursor: grabbing;
}

.horizontal-timeline {
  display: inline-flex;
  gap: 2rem;
  min-width: max-content;
  padding: 1rem 0;
}

.timeline-period {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 280px;
  max-width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
  position: relative;
}

.timeline-period:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #ffd700;
  font-weight: bold;
  z-index: 10;
}

.timeline-period:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.timeline-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.timeline-period:hover .timeline-image img {
  transform: scale(1.05);
}

.timeline-text {
  padding: 1.5rem;
  text-align: center;
  white-space: normal;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
}

.timeline-text strong {
  display: block;
  color: #ffd700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.timeline-text p {
  color: #333;
  line-height: 1.5;
  margin: 0;
  font-size: 0.9rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 小网球样式 */
.tennis-ball {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.tennis-ball.fall {
  animation: tennisFall 1.5s ease-in-out;
}

.tennis-ball.reset {
  animation: none !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
}

.tennis-ball-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.tennis-ball-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.tennis-ball:hover .tennis-ball-inner img {
  transform: scale(1.1);
}

@keyframes tennisFall {
  0% {
    transform: translateY(-100vh);
    opacity: 0;
  }
  50% {
    transform: translateY(0);
    opacity: 1;
  }
  75% {
    transform: translateY(-30px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes tennisRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeline-nav {
    display: none;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .split-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .split-text {
    padding-right: 0;
  }
  
  .split-text p {
    font-size: 1.1rem;
  }

  .collage-item {
    width: 150px;
    height: 180px;
  }
  
  .collage-text h2 {
    font-size: 1.8rem;
  }
  
  .collage-text p {
    font-size: 1rem;
  }

  .custom-timeline::before {
    left: 2rem;
  }
  
  .timeline-node {
    left: 2rem;
  }
  
  .timeline-content {
    width: calc(100% - 4rem);
    margin-left: 4rem;
    padding-left: 2rem;
  }
  
  .timeline-image-left {
    position: relative;
    left: 0;
    top: 0;
    width: 200px;
    margin: 1rem auto;
    transform: none;
  }
  
  .timeline-image-left::after {
    display: none;
  }

  .horizontal-timeline-container {
    padding: 1rem;
  }
  
  .horizontal-timeline {
    gap: 1rem;
  }
  
  .timeline-period {
    min-width: 250px;
    max-width: 280px;
  }
  
  .timeline-period:not(:last-child)::after {
    right: -1rem;
    font-size: 1.5rem;
  }
  
  .timeline-image {
    height: 150px;
  }
  
  .timeline-text {
    padding: 1rem;
    min-height: 100px;
  }
  
  .timeline-text strong {
    font-size: 1.1rem;
  }
  
  .timeline-text p {
    font-size: 0.85rem;
  }

  .tennis-ball {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .tennis-ball-inner {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  p {
    font-size: 1rem;
  }
}

/* 赛场服饰四层剪贴画覆盖层 */
.apparel-collage-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 1000;
  transition: opacity 1s ease;
  opacity: 0;
  pointer-events: none;
  display: none;
  /* 临时调试：强制显示 */
  /* display: block !important; */
  /* opacity: 1 !important; */
}

.apparel-collage-container.show {
  opacity: 1;
  pointer-events: none;
  display: block;
}

.apparel-collage-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.apparel-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.apparel-layer.active {
  opacity: 1;
}

/* 临时调试：强制显示第一层 */
/* #nike-layer {
  opacity: 1 !important;
} */

.apparel-layer.scatter {
  opacity: 0;
}

.apparel-item {
  position: absolute;
  width: 180px;
  height: 180px;
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  z-index: 10;
}

.apparel-item.center-item {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  z-index: 15;
}

.apparel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 3px solid white;
}

.apparel-item.scatter {
  animation: apparel-scatter 0.8s ease-out forwards;
}

@keyframes apparel-scatter {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.6) translate(var(--scatter-x, 200px), var(--scatter-y, -200px));
    opacity: 0;
  }
}

.apparel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 20;
  color: var(--primary);
  transition: opacity 1s ease;
}

.apparel-text h2 {
  font-size: 3.5rem;
  margin-bottom: 0;
  color: #000000;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
}



