/* 
 * DeerFlow 主样式文件
 * 网站：https://qj-xc.com
 * 描述：DeerFlow研究框架的响应式网站样式
 */

/* ===== 通用样式 ===== */
:root {
  /* 定义网站主要颜色方案 */
  --primary-color: #5271ff;
  --secondary-color: #4f46e5;
  --accent-color: #8b5cf6;
  --text-color: #333;
  --light-text-color: #555;
  --bg-color: #f9fafb;
  --light-bg: #ffffff;
  --dark-bg: #1e293b;
  --border-color: #e5e7eb;

  /* 字体家族设置 */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* 浏览器默认样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 4px;
}

h3 {
  font-size: 1.75rem;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 节间距 */
.section {
  padding: 5rem 0;
  position: relative;
}

/* ===== 导航样式 ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header.scrolled {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  width: 40px;
  margin-right: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover:after {
  width: 100%;
}

/* 语言选择器 */
.language-selector {
  position: relative;
  margin-left: 1.5rem;
}

.language-selector-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem;
}

.language-selector-toggle span {
  margin-right: 0.5rem;
}

.language-options {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
}

.language-options.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.language-option {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.language-option:hover {
  background-color: #f9fafb;
  color: var(--primary-color);
}

/* 移动导航按钮 */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
}

/* ===== 英雄区样式 ===== */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--light-text-color);
  margin-bottom: 2rem;
}

.search-form {
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
}

.search-input {
  width: 100%;
  padding: 1.25rem 1rem 1.25rem 1.5rem;
  font-size: 1.1rem;
  background-color: #fff;
  border: 2px solid var(--border-color);
  border-radius: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(82, 113, 255, 0.15);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  padding: 0.75rem 1.5rem;
  border-radius: 1.5rem;
}

/* ===== 案例研究样式 ===== */
#cases {
  background-color: var(--light-bg);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  color: var(--light-text-color);
  font-size: 1.2rem;
  margin-top: 1rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.case-card {
  background-color: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.case-img {
  width: 100%;
  height: 200px;
  background-color: #f4f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 2.5rem;
  overflow: hidden;
}

.case-img i {
  transition: all 0.3s ease;
}

.case-card:hover .case-img i {
  transform: scale(1.1);
}

.case-content {
  padding: 1.5rem;
}

.case-title {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.case-description {
  color: var(--light-text-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== 核心特性样式 ===== */
#features {
  background-color: var(--bg-color);
}

.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: rgba(82, 113, 255, 0.1);
  color: var(--primary-color);
  font-size: 1.75rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--light-text-color);
}

/* ===== 架构图样式 ===== */
#architecture {
  background: linear-gradient(135deg, var(--dark-bg), #2d3748);
  color: #fff;
}

#architecture h2:after {
  background: #fff;
}

.architecture-subtitle {
  color: #cbd5e0;
}

.architecture-flow {
  max-width: 900px;
  margin: 4rem auto 0;
  position: relative;
}

.flow-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.architecture-step {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.step-number {
  background-color: var(--primary-color);
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-content {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  flex-grow: 1;
}

.step-title {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step-description {
  color: #e2e8f0;
  font-size: 0.95rem;
}

.flow-line {
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 255, 255, 0.2);
}

/* ===== 使用指南部分样式 ===== */
#usage-guide {
  background-color: var(--bg-color);
}

/* 选项卡样式 */
.guide-container {
  margin-top: 3rem;
}

.guide-tabs {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: rgba(82, 113, 255, 0.05);
}

.tab-content {
  padding: 2rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.tab-pane h3 {
  margin-bottom: 2rem;
  text-align: center;
  color: var(--primary-color);
}

/* How to Use 模块样式 */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.guide-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.guide-icon {
  background-color: rgba(82, 113, 255, 0.1);
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 1.5rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.guide-text h4 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.guide-text p {
  color: var(--light-text-color);
  font-size: 0.95rem;
}

/* What Use 模块样式 */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.use-case {
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.use-case:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.use-case-icon {
  background-color: rgba(82, 113, 255, 0.1);
  color: var(--primary-color);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
}

.use-case-content h4 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.use-case-content p {
  color: var(--light-text-color);
  font-size: 0.95rem;
  text-align: center;
}

/* Why Use 模块样式 */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.benefit-item {
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
  border: 1px solid var(--border-color);
}

.benefit-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
}

.benefit-content h4 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.benefit-content p {
  color: var(--light-text-color);
  font-size: 0.95rem;
}

/* FAQ 模块样式 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.faq-question {
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: rgba(82, 113, 255, 0.05);
}

.faq-question h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.faq-question i {
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.faq-item.active .faq-question {
  background-color: rgba(82, 113, 255, 0.1);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 1.25rem 1.25rem;
  max-height: 1000px;
}

.faq-answer p {
  color: var(--light-text-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== 页脚样式 ===== */
footer {
  background-color: var(--dark-bg);
  color: #fff;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-description {
  max-width: 400px;
  color: #cbd5e0;
  margin-bottom: 2rem;
}

.footer-nav-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #cbd5e0;
  transition: all 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #cbd5e0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* ===== 响应式样式 ===== */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: #fff;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links.show {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cases-grid, .features-container {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .search-input {
    padding: 1rem;
  }

  .search-btn {
    position: static;
    width: 100%;
    margin-top: 0.75rem;
  }
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
} 