/* Tailwind CSS 配置 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  color: #1f2937;
  background-color: #f9fafb;
  overflow-x: hidden;
}

/* 自定义颜色变量 */
:root {
  --primary-purple: #8b5cf6;
  --primary-indigo: #6366f1;
  --accent-orange: #f97316;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --border-gray: #e5e7eb;
}

/* 导航栏固定样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gray);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 渐变背景 */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-purple {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-indigo) 100%);
}

.gradient-orange {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

/* 卡片样式 */
.card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-indigo) 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-purple);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-purple);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--primary-purple);
  color: white;
}

/* 粒子画布 */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  margin: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

/* 六边形图标容器 */
.hexagon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.hexagon-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hexagon-item:hover {
  transform: translateY(-10px);
}

.hexagon-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-indigo) 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.hexagon-item:hover .hexagon-icon {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

/* 标签样式 */
.tag {
  display: inline-block;
  background: #f3f4f6;
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  margin: 0.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover,
.tag.active {
  background: var(--primary-purple);
  color: white;
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* 滚动动画 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 数字滚动效果 */
.counter {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .card {
    padding: 1.5rem;
  }

  .counter {
    font-size: 2rem;
  }

  .hexagon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* 页脚样式 */
footer {
  background: var(--text-dark);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* 过渡动画 */
.transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图片加载优化 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 内容容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 段落间距 */
section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
}