/* 全局样式 */
:root {
  --primary-color: #2c974b;
  --primary-dark: #23783c;
  --primary-light: #4ade80;
  --secondary-color: #3b82f6;
  --text-color: #333;
  --bg-color: #f8fafc;
  --light-gray: #f1f5f9;
  --dark-gray: #64748b;
  --white: #ffffff;
  --black: #000000;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

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

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

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

/* 英雄区域样式 */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--white);
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 151, 75, 0.3);
}

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

.btn-secondary:hover {
  background-color: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 特点区域样式 */
.features {
  padding: 6rem 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-top: 4px solid var(--primary-color);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.feature-card p {
  color: var(--dark-gray);
  line-height: 1.7;
}

/* 安装步骤预览样式 */
.install-preview {
  padding: 6rem 0;
  background-color: var(--light-gray);
}

.steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--code-border);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 25%;
}

.step-number {
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background-color: var(--primary-color);
  color: var(--white);
}

.step-title {
  font-weight: 600;
  text-align: center;
  color: var(--text-color);
}

.step-description {
  text-align: center;
  color: var(--dark-gray);
  margin-top: 10px;
  font-size: 0.9rem;
}

/* 常见问题预览样式 */
.faq-preview {
  padding: 6rem 0;
  background-color: var(--white);
}

.faq-items {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
  padding: 15px 20px;
  background-color: var(--light-gray);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: var(--code-border);
}

.faq-question h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.faq-icon.active {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: var(--white);
}

.faq-answer.active {
  padding: 20px;
  max-height: 500px;
}

.faq-answer p {
  color: var(--dark-gray);
  line-height: 1.7;
}

/* 页脚样式 */
.footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 3rem;
}

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dark-gray);
  font-size: 0.9rem;
}

/* 安装教程页面样式 */
.install-page {
  padding: 4rem 0;
}

.install-container {
  max-width: 1000px;
  margin: 0 auto;
}

.install-section {
  margin-bottom: 4rem;
  background-color: var(--white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.install-section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 10px;
}

.install-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.install-section p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.install-section img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.install-section ol,
.install-section ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.install-section ol li,
.install-section ul li {
  margin-bottom: 10px;
}

.code-block {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  position: relative;
  overflow-x: auto;
}

.code-block pre {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-color);
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background-color: var(--primary-dark);
}

.copy-btn.copied {
  background-color: var(--success);
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.step-nav-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.step-nav-btn:hover {
  background-color: var(--primary-dark);
}

.step-nav-btn:disabled {
  background-color: var(--dark-gray);
  cursor: not-allowed;
}

/* 常见问题页面样式 */
.faq-page {
  padding: 4rem 0;
}

.faq-search {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.faq-search input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid var(--code-border);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.faq-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 151, 75, 0.1);
}

.faq-search button {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
}

.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 3rem;
}

.category-btn {
  padding: 8px 16px;
  background-color: var(--light-gray);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

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

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

/* 相关资源页面样式 */
.resources-page {
  padding: 4rem 0;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.resource-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.resource-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.resource-content {
  padding: 20px;
}

.resource-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.resource-content p {
  color: var(--dark-gray);
  margin-bottom: 15px;
  line-height: 1.6;
}

.resource-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.resource-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 返回顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    padding: 80px 20px;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

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

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .steps {
    flex-direction: column;
    gap: 30px;
  }

  .step {
    width: 100%;
  }

  .steps::before {
    display: none;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .install-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    font-size: 2rem;
  }

  .feature-card h3 {
    font-size: 1.3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 20px;
    right: 20px;
  }
}
