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

body {
  display: flex;
  flex-direction: column;
  font-family: "Microsoft YaHei", "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  overflow-x: hidden;
}

.header {
  text-align: center;
  padding: 25px 20px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.header p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 25px 20px 15px;
  padding-top: 5%;
}

.modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.module {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.module:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.module-header {
  text-align: center;
  margin-bottom: 15px;
}

.module-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: block;
}

.chinese .module-icon {
  color: #e74c3c;
}

.english .module-icon {
  color: #3498db;
}

.module h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: #2c3e50;
}

.module-description {
  color: #7f8c8d;
  font-size: 0.95rem;
  line-height: 1.4;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.feature {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: #667eea;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: #667eea;
}

.feature h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #2c3e50;
}

.feature p {
  color: #6c757d;
  font-size: 0.75rem;
  line-height: 1.2;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.stat {
  text-align: center;
  color: white;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer {
  text-align: center;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 20px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .modules {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .header h1 {
    font-size: 2.5rem;
  }

  .header p {
    font-size: 1.1rem;
  }

  .module {
    padding: 30px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .feature {
    padding: 15px;
  }

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

  .feature h3 {
    font-size: 1rem;
  }

  .feature p {
    font-size: 0.8rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-start {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  text-decoration: none;
  display: inline-block;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* 添加一些装饰性元素 */
.decorative-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  opacity: 0.1;
}

.shape1 {
  top: 10%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape2 {
  top: 60%;
  right: 10%;
  width: 80px;
  height: 80px;
  background: white;
  transform: rotate(45deg);
  animation: float 8s ease-in-out infinite reverse;
}

.shape3 {
  bottom: 20%;
  left: 20%;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 20%;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* 额外的样式文件，用于未来扩展 */

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 按钮点击效果 */
.feature:active {
  transform: translateY(-3px) scale(0.98);
}

.btn-start:active {
  transform: translateY(0px) scale(0.95);
}

/* 加载动画 */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-left: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 提示框样式 */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* 响应式优化 */
@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }

  .module {
    padding: 20px;
  }

  .feature {
    padding: 20px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* 中文打字练习页面专用样式 */
.typing-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.practice-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-radius: 15px;
  color: white;
}

.practice-title {
  font-size: 2rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.practice-subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* 提示区域样式 */
.prompt-area {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid #6e31a6;
  position: relative;
  overflow: hidden;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.prompt-title {
  font-size: 1.2rem;
  color:rgb(21, 0, 103);
  margin-bottom: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-display {
  text-align: center;
  line-height: 2.5;
  font-size: 1.4rem;
}

.char-with-pinyin {
  display: inline-block;
  margin: 0 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.char-with-pinyin:hover {
  transform: scale(1.1);
}

.chinese-char {
  display: block;
  font-size: 2rem;
  color: #2c3e50;
  font-weight: bold;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}


.prompt-area .chinese-char{position: relative;}
.prompt-area .chinese-char .char-i{position: absolute;}
.prompt-area .char-with-pinyin.current .char-line{position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; width: 2px; height: 30px; background:rgb(255, 255, 255); animation: blink 1s infinite;}
.prompt-area .chinese-char .char-box{display: black; padding-bottom: 3px; opacity: 1; border-bottom: 2px solid  #ccc;}
.prompt-area .chinese-char .char-box .char-box-str{opacity: 0;}
.prompt-area .char-with-pinyin.current .chinese-char .char-box{opacity: 0;}


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

.char-with-pinyin.current .chinese-char {
  background: #71b1ce;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 5px 15px #71b1ce;
}

.char-with-pinyin.completed .chinese-char {
  background: #27ae60;
  color: white;
}

.char-with-pinyin.error .chinese-char {
  background: #e67e22;
  color: white;
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.pinyin {
  display: block;
  font-size: 1rem;
  color: #7f8c8d;
  margin-bottom: 5px;
  font-family: "Arial", sans-serif;
}

/* 输入区域样式 */
.input-area {
    display: none;
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.input-area:focus-within {
  border-color: #e74c3c;
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.2);
}

.input-title {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: bold;
  text-align: center;
}

.typing-input {
  width: 100%;
  height: 80px;
  font-size: 1.5rem;
  padding: 20px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  outline: none;
  text-align: center;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: none;
}

.typing-input:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

.typing-input.correct {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.typing-input.incorrect {
  border-color: #e67e22;
  background: rgba(230, 126, 34, 0.1);
}

/* 统计区域样式 */
.stats-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color:rgb(240, 240, 240);
}

/* 控制按钮样式 */
.controls {
  text-align: center;
  margin-bottom: 20px;
}

.control-btn {
  background: linear-gradient(135deg, #4556a8 0%, #2b89c0 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin: 0 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn.secondary {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .typing-container {
    margin: 10px;
    padding: 15px;
  }

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

  .text-display {
    font-size: 1.2rem;
  }

  .chinese-char {
    font-size: 1.5rem;
  }

  .typing-input {
    font-size: 1.2rem;
    height: 60px;
    padding: 15px;
  }

  .char-with-pinyin {
    margin: 0 4px;
  }

  .stats-area {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 进度条样式 */
.progress-bar {
  width: 100%;
  height: 15px;
  background: #e9ecef;
  border-radius: 4px;
  margin: 15px 0;
  overflow: visible;
  position: relative;
  display: flex;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}
.progress-fill-step{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10%;
  background-color: #3498db;
  border-radius: 15px;
}
/* 分页指示器样式 */
.page-indicators {
  flex: 1;
  display: flex;
}

.page-indicator {
  flex: 1;
  background: #ccc;
  border: 1px solid #ccc;
  border-radius: 15px;
  cursor: pointer;
}
.page-indicator.active{background: #b5b5b5;}

/* 提示信息样式 */
.hint-area {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid #3498db;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  color: #2c3e50;
}

.hint-icon {
  font-size: 1.2rem;
  margin-right: 8px;
}

.input-area{padding: 20px 30px;}
.input-area .text-display .chinese-char{ padding: 0 8px;}

.input-iii{position: fixed;left: 300px;top: 300px; margin-top: 20px; margin-left:-20px; text-align: center; z-index: 1; opacity: 0;} 