/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

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

/* 头部样式 */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.sticky-header {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #0a2463;
}

.logo-text span {
  color: #3e92cc;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #3e92cc;
}

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

.search-btn, .login-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-left: 20px;
  color: #333;
  transition: color 0.3s ease;
}

.search-btn:hover, .login-btn:hover {
  color: #3e92cc;
}

.signup-btn {
  background-color: #3e92cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 20px;
  transition: all 0.3s ease;
}

.signup-btn:hover {
  background-color: #0a2463;
  transform: translateY(-2px);
}

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

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

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

.mobile-menu ul {
  list-style: none;
}

.mobile-menu li {
  margin-bottom: 15px;
}

.mobile-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  display: block;
}

/* 英雄区样式 */
.hero-section {
  background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 100%);
  color: white;
  padding: 150px 0 100px;
  text-align: center;
  margin-top: 80px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-section p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-btn {
  background-color: #3e92cc;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-btn:hover {
  background-color: #fff;
  color: #0a2463;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 功能区样式 */
.features-section {
  padding: 100px 0;
  background-color: #fff;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 36px;
  color: #0a2463;
  margin-bottom: 15px;
}

.section-title p {
  font-size: 18px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.features-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.feature-tab {
  background-color: #f1f5f9;
  border: none;
  padding: 12px 24px;
  margin: 0 10px 10px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.feature-tab:hover {
  background-color: #e2e8f0;
}

.feature-tab.active-tab {
  background-color: #3e92cc;
  color: white;
}

.feature-content {
  background-color: #f8fafc;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-content.hidden {
  display: none;
}

.feature-content h3 {
  font-size: 24px;
  color: #0a2463;
  margin-bottom: 20px;
}

.feature-content p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.feature-list li i {
  color: #3e92cc;
  font-size: 20px;
  margin-right: 15px;
  margin-top: 3px;
}

/* 打字演示区样式 */
.typing-demo-section {
  padding: 100px 0;
  background-color: #f8fafc;
}

.demo-container {
  background-color: #0a2463;
  border-radius: 10px;
  padding: 40px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.demo-header h3 {
  font-size: 24px;
}

.demo-stats {
  display: flex;
}

.demo-stat {
  margin-left: 20px;
  text-align: center;
}

.demo-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #3e92cc;
}

.demo-stat-label {
  font-size: 14px;
  opacity: 0.8;
}

.typing-demo-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
  font-family: 'Courier New', Courier, monospace;
}

.demo-cursor {
  display: inline-block;
  width: 10px;
  height: 24px;
  background-color: #3e92cc;
  vertical-align: middle;
  margin-left: 2px;
}

.demo-keyboard {
  background-color: #1e293b;
  border-radius: 10px;
  padding: 20px;
  display: inline-block;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.key {
  background-color: #334155;
  color: white;
  border: none;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  margin: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.key.active {
  background-color: #3e92cc;
  transform: scale(0.95);
}

.key.space {
  width: 200px;
}

/* 打字测试区样式 */
.typing-test-section {
  padding: 100px 0;
  background-color: #fff;
}

.test-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #f8fafc;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.test-header h3 {
  font-size: 24px;
  color: #0a2463;
}

.test-stats {
  display: flex;
}

.test-stat {
  margin-left: 20px;
  text-align: center;
}

.test-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #3e92cc;
}

.test-stat-label {
  font-size: 14px;
  color: #666;
}

.test-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  font-family: 'Courier New', Courier, monospace;
}

.test-text span {
  display: inline-block;
  transition: all 0.2s ease;
}

.test-text span.correct {
  color: #10b981;
}

.test-text span.incorrect {
  color: #ef4444;
  text-decoration: underline;
}

.test-text span.current {
  border-left: 2px solid #3e92cc;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.user-input {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  border: 2px solid #e2e8f0;
  border-radius: 5px;
  margin-bottom: 20px;
  font-family: 'Courier New', Courier, monospace;
  resize: none;
  height: 100px;
}

.user-input:focus {
  outline: none;
  border-color: #3e92cc;
  box-shadow: 0 0 0 3px rgba(62, 146, 204, 0.2);
}

.test-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.test-status {
  font-size: 16px;
  color: #666;
}

.restart-test-btn {
  background-color: #3e92cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.restart-test-btn:hover {
  background-color: #0a2463;
}

/* 用户评价区样式 */
.testimonials-section {
  padding: 100px 0;
  background-color: #f8fafc;
}

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

.testimonial-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.testimonial-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.author-info h4 {
  font-size: 18px;
  color: #0a2463;
  margin-bottom: 5px;
}

.author-info p {
  font-size: 14px;
  color: #666;
}

/* CTA区样式 */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 100%);
  color: white;
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* 页脚样式 */
footer {
  background-color: #0a2463;
  color: white;
  padding: 50px 0 20px;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  text-decoration: none;
}

.footer-logo img {
  height: 40px;
  margin-right: 10px;
}

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

.footer-logo-text span {
  color: #3e92cc;
}

.footer-about p {
  color: #b0b0b0;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
}

.social-links a {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: #3e92cc;
  transform: translateY(-3px);
}

.footer-links h4 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: #3e92cc;
}

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

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

.footer-links a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #3e92cc;
}

.footer-contact p {
  color: #b0b0b0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 10px;
  color: #3e92cc;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b0b0;
}

/* 响应式样式 */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 36px;
  }

  .hero-section p {
    font-size: 18px;
  }

  .section-title h2 {
    font-size: 30px;
  }
}

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

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

  .hero-section {
    padding: 120px 0 80px;
  }

  .hero-section h1 {
    font-size: 30px;
  }

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

  .features-section, .typing-demo-section, .typing-test-section, .testimonials-section, .cta-section {
    padding: 80px 0;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .demo-keyboard {
    display: none;
  }

  .test-text {
    font-size: 16px;
  }

  .user-input {
    font-size: 16px;
  }

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

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 24px;
  }

  .cta-btn {
    padding: 12px 24px;
    font-size: 16px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .feature-tab {
    padding: 10px 20px;
    font-size: 14px;
  }

  .typing-demo-text {
    font-size: 16px;
  }

  .test-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-stats {
    margin-top: 15px;
    width: 100%;
    justify-content: space-between;
  }

  .test-stat {
    margin-left: 0;
  }

  .test-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .restart-test-btn {
    margin-top: 15px;
    width: 100%;
  }
}

/* 工具类 */
.hidden {
  display: none;
}

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

.mb-40 {
  margin-bottom: 40px;
}

.mb-20 {
  margin-bottom: 20px;
}