/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0f172a;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 容器样式 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 头部样式 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header div {
  font-size: 18px;
  font-weight: bold;
  color: #22c55e;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  color: #fff;
  margin: 0 15px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #22c55e;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #22c55e;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* 英雄区域样式 */
.hero {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 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="%2322c55e" fill-opacity="0.1"%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;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  animation: fadeInUp 1s ease-out;
}

.hero p {
  color: #cbd5f5;
  max-width: 700px;
  margin: 0 auto 30px;
  font-size: 18px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 16px 32px;
  background: #22c55e;
  color: #000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

/* 章节样式 */
.section {
  padding: 80px 0;
  position: relative;
}

.section:nth-child(odd) {
  background: #0f172a;
}

.section:nth-child(even) {
  background: #131c31;
}

.section h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #22c55e;
  border-radius: 2px;
}

.section h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #22c55e;
}

/* 网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* 卡片样式 */
.card {
  background: #1e293b;
  padding: 30px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #22c55e, #10b981);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card img {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.1);
  padding: 12px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 20px;
}

.card p {
  color: #cbd5f5;
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

/* 常见问题样式 */
.faq-item {
  background: #1e293b;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.faq-question {
  font-weight: bold;
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  color: #cbd5f5;
  font-size: 14px;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

/* 联系我们样式 */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.contact-item {
  background: #1e293b;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
  margin-bottom: 15px;
  color: #22c55e;
}

.contact-item p {
  color: #cbd5f5;
  font-size: 14px;
}

/* 页脚样式 */
.footer {
  background: #020617;
  padding: 60px 0;
  text-align: center;
  color: #94a3b8;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.footer p {
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #22c55e;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  nav a {
    margin: 0 10px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section h2 {
    font-size: 28px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    padding: 25px;
  }

  .faq-item {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 0;
  }

  .hero h1 {
    font-size: 28px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 14px;
  }

  .section h2 {
    font-size: 24px;
  }

  .section h3 {
    font-size: 20px;
  }

  .card {
    padding: 20px;
  }

  .card img {
    width: 48px;
    height: 48px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #22c55e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #16a34a;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #22c55e;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 文本选择样式 */
::selection {
  background: #22c55e;
  color: #000;
}

/* 焦点样式 */
*:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}
