  /* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* 全局样式 */
body {
  color: #333;
  line-height: 1.6;
  background-color: #f7f9fc;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #2c6ecb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  text-align: center;
}

.btn:hover {
  background-color: #1a5bcb;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
  background-color: white;
  color: #2c6ecb;
  border: 1px solid #2c6ecb;
}

.btn-secondary:hover {
  background-color: #f0f5ff;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* 导航栏样式 */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #2c6ecb;
}

.logo span {
  background: linear-gradient(90deg, #2c6ecb, #17a2b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  font-weight: 500;
  color: #555;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: #2c6ecb;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2c6ecb;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.user-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

/* 英雄区域样式 */
.hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="rgba(44, 110, 203, 0.03)"/><path d="M0,50 L100,50 M50,0 L50,100" stroke="rgba(44, 110, 203, 0.05)" stroke-width="1"/></svg>');
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #2d3748;
  line-height: 1.2;
}

.hero h1 span {
  color: #2c6ecb;
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
  color: #4a5568;
  max-width: 500px;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #2c6ecb;
  margin-bottom: 5px;
}

.stat-label {
  color: #6b7280;
  font-size: 14px;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 特色区域样式 */
.features {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 15px;
  color: #2d3748;
}

.section-subtitle {
  text-align: center;
  font-size: 18px;
  color: #6b7280;
  max-width: 700px;
  margin: 0 auto 60px;
}

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

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

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

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: #edf2fc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #2c6ecb;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #2d3748;
}

.feature-card p {
  color: #6b7280;
  line-height: 1.7;
}

/* 课程区域样式 */
.courses {
  padding: 100px 0;
  background-color: white;
}

.courses-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background-color: #f1f5f9;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.filter-btn.active {
  background-color: #2c6ecb;
  color: white;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.course-card {
  background-color: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: all 0.3s;
  border: 1px solid #edf2f7;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.course-image {
  height: 160px;
  background-color: #e6f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  color: #2c6ecb;
  position: relative;
}

.course-difficulty {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.difficulty-beginner {
  background-color: #e6fffa;
  color: #28a745;
}

.difficulty-intermediate {
  background-color: #fff3cd;
  color: #ffc107;
}

.difficulty-advanced {
  background-color: #f8d7da;
  color: #dc3545;
}

.course-content {
  padding: 20px;
}

.course-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: #2d3748;
  font-weight: 600;
}

.course-description {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b7280;
  font-size: 14px;
  border-top: 1px solid #edf2f7;
  padding-top: 15px;
}

.course-length {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 打字演示区域 */
.typing-demo {
  padding: 100px 0;
  background-color: #f7f9fc;
}

.demo-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf2f7;
}

.demo-stats {
  display: flex;
  gap: 20px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #2c6ecb;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
}

.typing-area {
  margin-bottom: 20px;
}

.typing-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #4a5568;
  letter-spacing: 0.5px;
}

.typing-text span {
  transition: all 0.1s;
}

.typing-text span.correct {
  color: #28a745;
}

.typing-text span.incorrect {
  color: #dc3545;
  text-decoration: underline;
}

.typing-text span.current {
  border-bottom: 2px solid #2c6ecb;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
  margin-top: 30px;
}

.key {
  background-color: #f1f5f9;
  border-radius: 4px;
  padding: 10px 5px;
  text-align: center;
  font-size: 14px;
  color: #4a5568;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.key-space {
  grid-column: span 6;
}

.key-active {
  background-color: #e6f0ff;
  border: 1px solid #2c6ecb;
  color: #2c6ecb;
}

/* 页脚样式 */
footer {
  background-color: #2d3748;
  color: white;
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: white;
  font-weight: 600;
}

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

.footer-column a {
  color: #cbd5e0;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: white;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.footer-desc {
  color: #cbd5e0;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background-color 0.3s;
}

.social-link:hover {
  background-color: #2c6ecb;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: #cbd5e0;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 40px;
  }

  .keyboard {
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links, .user-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-title {
    font-size: 28px;
  }

  .features, .courses, .typing-demo {
    padding: 70px 0;
  }

  .demo-container {
    padding: 20px;
  }

  .keyboard {
    display: none; /* 小屏幕隐藏键盘演示 */
  }
}

@media (max-width: 480px) {
  .features-grid, .courses-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .demo-stats {
    flex-wrap: wrap;
  }
}
