/* 重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #0f172a;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:
    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  /* 移动端滚动优化 */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
}

/* 移动端滚动控制 */
@media (max-width: 768px) {
  html {
    /* 减缓移动端滚动速度 */
    scroll-behavior: auto;
  }

  body {
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 进度条 */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 9999;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 0.3s ease;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.nav-logo i {
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 英雄区域 */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-image: url("https://images.feynmanxie.cc/main/gold-circle.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.5s forwards;
}

.title-line {
  display: block;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.7s forwards;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.9s forwards;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.hero-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 1.1s forwards;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero-btn i {
  animation: bounce 2s infinite;
}

/* 动画定义 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* 区域标题 */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.section-header.show {
  opacity: 1;
  transform: translateY(0);
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* 行程时间线 */
.itinerary {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--accent-color)
  );
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 50%;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50%;
  margin-right: 0;
  padding-left: 3rem;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow:
    0 0 0 4px white,
    var(--shadow-lg);
}

.timeline-marker i {
  color: white;
  font-size: 1.5rem;
}

.day-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.day-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.day-header {
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.day-number {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.day-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.day-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.day-preview img,
.day-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  border-radius: 0;
}

.day-preview img {
  display: block;
}

.day-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  border-radius: 0;
}

.day-card:hover .day-preview img,
.day-card:hover .day-image {
  transform: scale(1.05);
}

/* 图片加载失败时的平滑过渡 */
.day-preview img[style*="display: none"] + .day-image,
.day-preview img:not([src]) + .day-image,
.day-preview img[src=""] + .day-image {
  display: flex !important;
}

/* 确保备用图标在图片加载失败时显示 */
.day-preview {
  position: relative;
  background: #f1f5f9;
}

.day-description {
  padding: 1.5rem;
}

.day-description p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.day-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.highlight-tag {
  background: var(--bg-secondary);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.day-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.day-link:hover {
  gap: 1rem;
}

/* 亮点展示 */
.highlights {
  padding: 6rem 0;
  background: white;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.highlight-card {
  text-align: center;
  padding: 2rem;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.highlight-card.show {
  opacity: 1;
  transform: translateY(0);
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.highlight-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.highlight-icon i {
  color: white;
  font-size: 2rem;
}

.highlight-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.highlight-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 联系区域 */
.contact {
  padding: 6rem 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  text-align: center;
}

.contact-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

.contact-item i {
  font-size: 1.3rem;
  color: var(--accent-color);
}

/* 页脚 */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.footer-logo i {
  color: var(--accent-color);
}

.footer p {
  opacity: 0.7;
}

/* 移除全局段落捕捉，避免整页吸附 */

/* 移动端滚动提示 */
.mobile-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  animation: scrollHintPulse 2s ease-in-out infinite;
}

@keyframes scrollHintPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
  }
}

/* 移动端时间轴项目滚动捕捉 */
@media (max-width: 768px) {
  .timeline {
    scroll-snap-type: y mandatory;
  }
  .timeline-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: 100px; /* 为固定导航栏留出空间 */
  }

  .mobile-scroll-hint {
    display: block !important;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
    height: 60px; /* 减小移动端导航栏高度 */
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .nav-logo i {
    font-size: 1.4rem;
  }

  .nav-menu {
    display: none;
  }

  /* 英雄区域移动端优化 */
  .hero {
    min-height: 80vh; /* 减小移动端高度 */
    padding: 8rem 0 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-stats {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  /* 时间轴移动端优化 */
  .timeline::before {
    left: 2rem;
  }

  .timeline-item {
    margin-bottom: 3rem; /* 增加间距 */
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 4rem;
    margin-right: 0;
    padding-left: 2rem;
    padding-right: 0;
  }

  .timeline-marker {
    left: 2rem;
    width: 40px;
    height: 40px;
  }

  .day-card {
    padding: 1.5rem;
  }

  .day-preview img,
  .day-image {
    height: 200px; /* 减小移动端图片高度 */
  }

  .day-highlights {
    gap: 0.5rem;
  }

  .highlight-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .highlight-card {
    padding: 2rem 1.5rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  /* 内容区域间距调整 */
  .itinerary {
    padding: 4rem 0;
  }

  .highlights {
    padding: 4rem 0;
  }

  .contact {
    padding: 4rem 0;
  }
}

/* 滚动动画类 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
