/* 现代化科技运动风格CSS */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #4e5fc1 0%, #5a6fd8 100%);
  --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-bg: #0f172a;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 背景动画效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 20%);
  z-index: -1;
  animation: backgroundMove 20s ease-in-out infinite alternate;
}

@keyframes backgroundMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  padding: 2.5rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0.1;
  z-index: -1;
}

header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 导航样式 */
nav {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  display: block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

nav ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
  border-radius: 50px;
}

nav ul li a:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

nav ul li a:hover::before {
  opacity: 0.1;
}

nav ul li a.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--glow);
}

/* 主要内容区域 */
main {
  padding: 3rem 0;
}

/* 英雄区域 */
.hero {
  text-align: center;
  padding: 4rem 0;
  position: relative;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* 按钮样式 */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
  border-radius: 50px;
}

.btn.primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--glow);
}

.btn.primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* 内容区域标题 */
.content-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
}

.content-section h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* 网格布局 */
.features-grid, .training-chapters, .nutrition-chapters, .recovery-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

/* 卡片样式 */
.feature-card, .chapter-card, .category-card, .fundamental-chapter {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before, .chapter-card::before, .category-card::before, .fundamental-chapter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.feature-card:hover, .chapter-card:hover, .category-card:hover, .fundamental-chapter:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow), var(--glow);
  border-color: rgba(102, 126, 234, 0.3);
}

.feature-card:hover::before, .chapter-card:hover::before, .category-card:hover::before, .fundamental-chapter:hover::before {
  opacity: 0.05;
}

.feature-card h3, .chapter-card h3, .category-card h3, .fundamental-chapter h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #667eea;
  position: relative;
}

.feature-card p, .chapter-card p, .category-card p, .fundamental-chapter p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 知识结构项 */
.structure-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.structure-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow), var(--glow);
  border-color: rgba(102, 126, 234, 0.3);
}

.structure-item h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #667eea;
}

.structure-item p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* 知识地图 */
.knowledge-map {
  text-align: center;
  margin: 3rem 0;
}

.knowledge-map img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.knowledge-map img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow), var(--glow);
}

/* 页脚样式 */
footer {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
  color: var(--text-secondary);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card, .chapter-card, .category-card, .structure-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* 响应式设计 */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .content-section h2 {
    font-size: 2rem;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  nav ul li {
    margin: 0.25rem 0;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    width: 80%;
    text-align: center;
  }
  
  .features-grid, .training-chapters, .nutrition-chapters, .recovery-categories {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
}

/* 选择文本样式 */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: white;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 浮动动画 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}