/* ==================== 基础变量 ==================== */
:root {
  --color-red: #FF6B6B;
  --color-yellow: #FFD93D;
  --color-green: #6BCB77;
  --color-blue: #4D96FF;
  --color-orange: #FF9F45;
  --color-purple: #9B5DE5;
  --color-pink: #FF8FB1;
  --color-teal: #4ECDC4;
  --color-bg: #FFFDF7;
  --color-text: #33334D;
  --color-light: #ffffff;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 48px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', 'Microsoft YaHei', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 16px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-blue);
}

.brand-icon {
  font-size: 2rem;
  animation: bounce 2s infinite;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--color-yellow);
  color: var(--color-text);
  transform: translateY(-2px);
}

/* ==================== 首页主视觉 ==================== */
.hero {
  min-height: 92vh;
  padding: 60px 5%;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, #FFF9E6 0%, #E8F4FF 50%, #FFF0F5 100%);
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 24px;
}

.hero-text h1 .highlight {
  background: linear-gradient(120deg, var(--color-red), var(--color-orange), var(--color-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: 1.3rem;
  color: #666;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-blue);
  color: white;
  box-shadow: 0 8px 20px rgba(77, 150, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(77, 150, 255, 0.45);
}

.btn-secondary {
  background: var(--color-yellow);
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(255, 217, 61, 0.35);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(255, 217, 61, 0.45);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transform: rotate(2deg);
  transition: transform 0.5s ease;
}

.hero-image:hover img {
  transform: rotate(0deg) scale(1.02);
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  bottom: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--color-yellow), var(--color-green), var(--color-blue));
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.4;
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.shape {
  position: absolute;
  font-size: 2rem;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.shape:nth-child(2) { top: 60%; left: 5%; animation-delay: 1s; }
.shape:nth-child(3) { top: 25%; right: 8%; animation-delay: 2s; }
.shape:nth-child(4) { top: 70%; right: 12%; animation-delay: 3s; }
.shape:nth-child(5) { top: 45%; left: 50%; animation-delay: 4s; }

/* ==================== 通用区块标题 ==================== */
.section-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--color-text);
}

/* ==================== 五大能力模块 ==================== */
.features {
  padding: 80px 5%;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border: 4px solid transparent;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
}

.feature-card.listen { border-color: var(--color-red); }
.feature-card.speak { border-color: var(--color-orange); }
.feature-card.read { border-color: var(--color-blue); }
.feature-card.write { border-color: var(--color-green); }
.feature-card.use { border-color: var(--color-purple); }

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: #666;
  font-size: 0.95rem;
}

/* ==================== 主题选择 ==================== */
.categories {
  padding: 80px 5%;
  background: linear-gradient(180deg, #FFF5F5 0%, #F0FFF4 100%);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border: 4px solid transparent;
}

.category-card:hover,
.category-card.active {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-card);
  border-color: var(--color-yellow);
}

.category-icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.category-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.category-name-en {
  font-size: 1rem;
  color: #888;
}

/* ==================== 学习区域 ==================== */
.learn-section {
  padding: 80px 5%;
  background: white;
}

.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.learn-header .section-title {
  margin: 0;
  text-align: left;
}

.current-topic {
  font-size: 1.1rem;
  font-weight: 700;
}

.topic-badge {
  display: inline-block;
  background: var(--color-yellow);
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  margin-left: 8px;
}

.mode-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.mode-tab {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  background: #F0F0F0;
  color: #666;
  transition: all 0.3s ease;
}

.mode-tab:hover {
  transform: translateY(-2px);
}

.mode-tab.active[data-mode="listen"] { background: var(--color-red); color: white; }
.mode-tab.active[data-mode="speak"] { background: var(--color-orange); color: white; }
.mode-tab.active[data-mode="read"] { background: var(--color-blue); color: white; }
.mode-tab.active[data-mode="write"] { background: var(--color-green); color: white; }
.mode-tab.active[data-mode="use"] { background: var(--color-purple); color: white; }

.learn-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  border: 6px solid #F0F0F0;
}

.card-header {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}

.nav-arrow {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-blue);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  transform: scale(1.1);
  background: var(--color-teal);
}

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

.word-emoji {
  font-size: 6rem;
  margin-bottom: 8px;
  animation: bounce 2s infinite;
}

.word-text {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: 2px;
}

.word-phonetic {
  font-size: 1.2rem;
  color: #888;
  margin: 4px 0;
}

.word-meaning {
  font-size: 1.5rem;
  color: var(--color-blue);
  font-weight: 700;
}

.card-body {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: #FAFAFA;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.mode-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.mode-desc {
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

.action-btn {
  padding: 16px 36px;
  border-radius: var(--radius-xl);
  border: none;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-btn:hover {
  transform: translateY(-3px);
}

.listen-btn { background: var(--color-red); color: white; }
.speak-btn { background: var(--color-orange); color: white; }
.read-btn { background: var(--color-blue); color: white; }
.check-btn { background: var(--color-green); color: white; }
.next-btn { background: var(--color-purple); color: white; }

.letter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
}

.letter-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 3px solid #DDD;
  background: white;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.letter-btn:hover {
  border-color: var(--color-green);
  transform: scale(1.1);
}

.letter-btn.used {
  opacity: 0.4;
  pointer-events: none;
  background: #EEE;
}

.answer-slots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
  min-height: 56px;
}

.answer-slot {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 3px dashed #CCC;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
}

.answer-slot.filled {
  border-style: solid;
  border-color: var(--color-green);
  background: #F0FFF4;
}

.feedback {
  font-size: 1.3rem;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  margin-top: 10px;
}

.feedback.correct {
  background: #D4EDDA;
  color: #155724;
}

.feedback.wrong {
  background: #F8D7DA;
  color: #721C24;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.option-btn {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 4px solid #EEE;
  background: white;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-btn:hover {
  border-color: var(--color-blue);
  transform: scale(1.02);
}

.option-btn.correct {
  border-color: var(--color-green);
  background: #F0FFF4;
}

.option-btn.wrong {
  border-color: var(--color-red);
  background: #FFF5F5;
}

.sentence-blank {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  line-height: 2;
}

.sentence-blank .blank {
  display: inline-block;
  min-width: 80px;
  padding: 4px 12px;
  border-bottom: 4px solid var(--color-yellow);
  color: var(--color-blue);
  font-weight: 900;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.progress-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #E0E0E0;
}

.dot.active {
  background: var(--color-yellow);
  transform: scale(1.2);
}

.dot.completed {
  background: var(--color-green);
}

.score-board {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.3rem;
  font-weight: 900;
  background: #FFF9E6;
  padding: 8px 20px;
  border-radius: var(--radius-xl);
}

/* ==================== 学习进度 ==================== */
.progress-section {
  padding: 80px 5%;
  background: linear-gradient(180deg, #F0F9FF 0%, #FFF5F5 100%);
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.progress-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.progress-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.progress-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-blue);
}

.progress-label {
  font-size: 1.1rem;
  color: #666;
  font-weight: 700;
}

.progress-chart {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.progress-chart h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  text-align: center;
}

.progress-bar-item {
  margin-bottom: 20px;
}

.progress-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
}

.progress-bar-track {
  height: 20px;
  background: #F0F0F0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s ease;
}

/* ==================== 页脚 ==================== */
.footer {
  background: var(--color-text);
  color: white;
  text-align: center;
  padding: 40px 5%;
}

.footer p {
  margin-bottom: 8px;
}

.footer .copyright {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ==================== 庆祝动画 ==================== */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  display: none;
}

.confetti.active {
  display: block;
}

.confetti-piece {
  position: absolute;
  width: 12px;
  height: 12px;
  animation: confetti-fall 3s ease-out forwards;
}

/* ==================== 动画 ==================== */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes confetti-fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2.4rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .learn-header {
    flex-direction: column;
    text-align: center;
  }
  
  .learn-header .section-title {
    text-align: center;
  }
  
  .card-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .nav-arrow {
    display: none;
  }
  
  .word-text {
    font-size: 2.2rem;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
}
