/* ============================================
   暑期预习助手 - 儿童友好样式表
   ============================================ */

:root {
  --primary: #FF6B6B;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --purple: #A06CD5;
  --blue: #45B7D1;
  --orange: #F4A261;
  --green: #2ECC71;
  --pink: #FF78C4;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-radius: 20px;
  --btn-radius: 15px;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #E8F5FD 0%, #F0E6FF 50%, #FFF5E6 100%);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  color: #333;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 导航栏 */
.navbar {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(255,107,107,0.3);
}

.navbar .logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.navbar .nav-btns {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: rgba(255,255,255,0.25);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(255,255,255,0.5);
  transform: scale(1.05);
}

/* 页面容器 */
.page {
  display: none;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: block;
}

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

/* 首页仪表盘 */
.dashboard-header {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 25px;
  color: white;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '✨';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 30px;
  animation: sparkle 2s infinite;
}

.dashboard-header::after {
  content: '🌟';
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-size: 30px;
  animation: sparkle 2s infinite 1s;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.day-counter {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 5px;
}

.day-subtitle {
  font-size: 18px;
  opacity: 0.9;
}

/* 进度条 */
.progress-section {
  background: white;
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.progress-bar-container {
  background: #E8E8E8;
  border-radius: 15px;
  height: 30px;
  overflow: hidden;
  margin: 10px 0;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 15px;
  background: linear-gradient(90deg, var(--green), var(--secondary));
  transition: width 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  min-width: 40px;
}

.points-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.points-total {
  font-size: 28px;
  font-weight: bold;
  color: var(--orange);
}

/* 奖励进度 */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.reward-card {
  background: linear-gradient(135deg, #FFF5E6, #FFE8CC);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  border: 2px solid #FFD699;
  transition: transform 0.3s;
}

.reward-card:hover {
  transform: translateY(-3px);
}

.reward-card .reward-icon {
  font-size: 36px;
  margin-bottom: 5px;
}

.reward-card .reward-name {
  font-size: 16px;
  font-weight: bold;
  color: #8B6914;
}

.reward-card .reward-pts {
  font-size: 14px;
  color: #B8860B;
}

.reward-progress {
  background: #E8E8E8;
  border-radius: 10px;
  height: 12px;
  margin-top: 8px;
  overflow: hidden;
}

.reward-progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  transition: width 0.8s ease;
}

/* 今日任务卡片 */
.task-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.task-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  border-left: 6px solid;
}

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

.task-card.chinese { border-left-color: var(--primary); }
.task-card.math { border-left-color: var(--blue); }
.task-card.fun { border-left-color: var(--purple); }

.task-card .task-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.task-card .task-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.task-card .task-desc {
  font-size: 15px;
  color: #666;
}

.task-card .task-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--green);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.task-card.completed {
  opacity: 0.7;
  border-left-color: var(--green) !important;
}

.task-card.completed::after {
  content: '✅';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  opacity: 0.3;
}

/* 快速操作按钮 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.quick-btn {
  background: white;
  border: 3px solid #E8E8E8;
  border-radius: var(--btn-radius);
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: 500;
}

.quick-btn:hover {
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.quick-btn .qb-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

/* 生字卡片 */
.char-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.char-card {
  perspective: 600px;
  height: 160px;
  cursor: pointer;
}

.char-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.char-card.flipped .char-card-inner {
  transform: rotateY(180deg);
}

.char-card-front, .char-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.char-card-front {
  background: linear-gradient(135deg, #FFE6E6, #FFF0F0);
  border: 2px solid #FFB3B3;
}

.char-card-front .char-main {
  font-size: 56px;
  font-weight: bold;
  color: #C0392B;
  line-height: 1;
}

.char-card-front .char-hint {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.char-card-back {
  background: linear-gradient(135deg, #E6F3FF, #F0F8FF);
  border: 2px solid #B3D9FF;
  transform: rotateY(180deg);
  padding: 10px;
  text-align: center;
}

.char-card-back .char-pinyin {
  font-size: 22px;
  color: #2980B9;
  font-weight: bold;
}

.char-card-back .char-word {
  font-size: 16px;
  color: #27AE60;
  margin-top: 5px;
  font-weight: 500;
}

.char-card-back .char-strokes {
  font-size: 13px;
  color: #888;
  margin-top: 5px;
}

/* 练习区 */
.quiz-section {
  margin: 25px 0;
}

.quiz-question {
  background: white;
  border-radius: var(--card-radius);
  padding: 25px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.quiz-question .q-text {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #2C3E50;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-option {
  background: #F8F9FA;
  border: 3px solid #E8E8E8;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.quiz-option:hover {
  border-color: var(--blue);
  background: #EBF5FF;
  transform: scale(1.02);
}

.quiz-option.correct {
  background: #D5F5E3;
  border-color: var(--green);
  color: #27AE60;
  animation: bounceIn 0.4s;
}

.quiz-option.wrong {
  background: #FADBD8;
  border-color: var(--primary);
  color: #C0392B;
  animation: shake 0.4s;
}

@keyframes bounceIn {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

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

/* 知识点讲解 */
.knowledge-box {
  background: linear-gradient(135deg, #E8F8F5, #D5F5E3);
  border-radius: var(--card-radius);
  padding: 25px;
  margin: 20px 0;
  border-left: 6px solid var(--green);
}

.knowledge-box h3 {
  color: #27AE60;
  margin-bottom: 12px;
  font-size: 20px;
}

.knowledge-box p, .knowledge-box pre {
  font-size: 17px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.example-box {
  background: linear-gradient(135deg, #EBF5FF, #D6EAF8);
  border-radius: var(--card-radius);
  padding: 25px;
  margin: 20px 0;
  border-left: 6px solid var(--blue);
}

.example-box h3 {
  color: #2980B9;
  margin-bottom: 12px;
}

.example-box pre {
  font-size: 17px;
  line-height: 1.8;
  white-space: pre-wrap;
  font-family: inherit;
}

/* 趣味话题 */
.fun-topic-card {
  background: linear-gradient(135deg, #F5E6FF, #EDE0FF);
  border-radius: var(--card-radius);
  padding: 30px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--purple);
}

.fun-topic-card .topic-emoji {
  font-size: 64px;
  text-align: center;
  margin-bottom: 15px;
}

.fun-topic-card .topic-title {
  font-size: 28px;
  font-weight: bold;
  color: #8E44AD;
  text-align: center;
  margin-bottom: 10px;
}

.fun-topic-card .topic-desc {
  font-size: 18px;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

.fun-topic-card .topic-detail {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255,255,255,0.6);
  border-radius: 12px;
}

.fun-topic-card .topic-try {
  background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
  border-radius: 12px;
  padding: 20px;
  font-size: 17px;
}

.fun-topic-card .topic-try strong {
  color: #D68910;
}

/* 番茄钟 */
.pomodoro-container {
  text-align: center;
  padding: 40px 20px;
}

.timer-circle {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  margin: 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  transition: all 1s ease;
}

.timer-circle.study {
  background: linear-gradient(135deg, #A8E6CF, #88D8B0);
  box-shadow: 0 0 40px rgba(46,204,113,0.3);
}

.timer-circle.break {
  background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
  box-shadow: 0 0 40px rgba(241,196,15,0.3);
}

.timer-circle.warning {
  background: linear-gradient(135deg, #FFB3BA, #FF6B6B);
  box-shadow: 0 0 40px rgba(255,107,107,0.3);
}

.timer-time {
  font-size: 64px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.timer-label {
  font-size: 20px;
  color: white;
  opacity: 0.9;
  margin-top: 5px;
}

.timer-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.timer-btn {
  padding: 15px 40px;
  border: none;
  border-radius: 30px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
}

.timer-btn.start { background: var(--green); }
.timer-btn.pause { background: var(--orange); }
.timer-btn.reset { background: #95A5A6; }

.timer-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.pomodoro-info {
  margin-top: 30px;
  font-size: 18px;
  color: #666;
}

.pomodoro-rounds {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.round-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E8E8E8;
  transition: background 0.3s;
}

.round-dot.done {
  background: var(--green);
}

.round-dot.current {
  background: var(--orange);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* 每日总结 */
.summary-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 20px;
}

.summary-question {
  background: white;
  border-radius: var(--card-radius);
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.summary-question h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #2C3E50;
}

.summary-textarea {
  width: 100%;
  min-height: 120px;
  border: 3px solid #E8E8E8;
  border-radius: 12px;
  padding: 15px;
  font-size: 18px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.3s;
}

.summary-textarea:focus {
  outline: none;
  border-color: var(--secondary);
}

.mood-selector {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}

.mood-btn {
  font-size: 48px;
  background: white;
  border: 3px solid #E8E8E8;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

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

.mood-btn.selected {
  border-color: var(--green);
  background: #D5F5E3;
  transform: scale(1.15);
}

/* 积分面板 */
.points-panel {
  padding: 20px;
}

.points-hero {
  background: linear-gradient(135deg, #F39C12, #E67E22);
  border-radius: var(--card-radius);
  padding: 40px;
  text-align: center;
  color: white;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.points-hero .big-points {
  font-size: 64px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.points-hero .points-label {
  font-size: 20px;
  opacity: 0.9;
}

.history-list {
  background: white;
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item .hi-desc {
  font-size: 16px;
  color: #555;
}

.history-item .hi-pts {
  font-size: 18px;
  font-weight: bold;
  color: var(--green);
}

.history-item .hi-date {
  font-size: 13px;
  color: #999;
}

/* 通用按钮 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary { background: linear-gradient(135deg, var(--primary), #FF8E53); }
.btn-success { background: linear-gradient(135deg, var(--green), #27AE60); }
.btn-info { background: linear-gradient(135deg, var(--blue), #3498DB); }
.btn-purple { background: linear-gradient(135deg, var(--purple), #8E44AD); }

/* 返回按钮 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid #E8E8E8;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.back-btn:hover {
  border-color: var(--secondary);
  background: #F0FFFE;
}

/* 课文显示 */
.text-display {
  background: white;
  border-radius: var(--card-radius);
  padding: 25px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  line-height: 2.2;
  font-size: 20px;
}

.text-display .paragraph {
  margin-bottom: 15px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.text-display .paragraph.hidden {
  opacity: 0.15;
}

.text-display .paragraph.hidden:hover {
  opacity: 0.5;
}

/* 完成动效 */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.confetti {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  animation: confettiFall 3s ease forwards;
}

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

/* 积分获得动效 */
.points-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 20px;
  padding: 30px 50px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 10000;
  animation: popIn 0.5s ease;
}

@keyframes popIn {
  0% { transform: translate(-50%, -50%) scale(0); }
  80% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.points-popup .pp-icon {
  font-size: 60px;
}

.points-popup .pp-text {
  font-size: 24px;
  font-weight: bold;
  color: var(--green);
  margin-top: 10px;
}

.points-popup .pp-pts {
  font-size: 36px;
  font-weight: bold;
  color: var(--orange);
}

/* 完成反馈 */
.feedback-msg {
  text-align: center;
  padding: 20px;
  font-size: 20px;
  font-weight: bold;
  color: var(--green);
  animation: fadeIn 0.5s;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0 15px;
  padding-bottom: 10px;
  border-bottom: 3px solid #F0F0F0;
}

.section-header h2 {
  font-size: 24px;
  color: #2C3E50;
}

.section-header .sh-icon {
  font-size: 28px;
}

/* 统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.stat-card .stat-num {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 14px;
  color: #888;
  margin-top: 5px;
}

/* 响应式 */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .navbar .logo { font-size: 20px; }
  .nav-btn { padding: 6px 12px; font-size: 14px; }
  .day-counter { font-size: 32px; }
  .task-cards { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .char-cards-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .timer-circle { width: 220px; height: 220px; }
  .timer-time { font-size: 48px; }
  .points-hero .big-points { font-size: 48px; }
  .mood-btn { width: 65px; height: 65px; font-size: 36px; }
}

/* 打印优化 */
@media print {
  .navbar, .nav-btns, .quick-actions { display: none; }
  .page { display: block !important; }
}

/* 辅助完成标记 */
.complete-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #D5F5E3;
  border: 2px solid var(--green);
  border-radius: 25px;
  color: #27AE60;
  font-weight: bold;
  font-size: 16px;
  margin-top: 15px;
}

.mark-complete-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 20px auto;
  padding: 15px;
  border: none;
  border-radius: 30px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green), #27AE60);
  color: white;
  transition: all 0.3s;
}

.mark-complete-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(46,204,113,0.4);
}

.mark-complete-btn:disabled {
  background: #BDC3C7;
  cursor: not-allowed;
  transform: none;
}

/* 背诵辅助 */
.recite-section {
  margin: 20px 0;
}

.recite-para {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 20px;
  line-height: 2;
}

.recite-para.memorized {
  background: #F8F8F8;
  color: #CCC;
  text-decoration: line-through;
}

.recite-para:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Tab 切换 */
.tab-container {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  background: #F0F0F0;
  border-radius: 15px;
  padding: 5px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s;
}

.tab-btn.active {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: var(--primary);
}

/* 鼓励弹窗 */
.encouragement-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

.encouragement-content {
  background: white;
  border-radius: 25px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.encouragement-content .ec-emoji {
  font-size: 80px;
  margin-bottom: 15px;
}

.encouragement-content .ec-title {
  font-size: 28px;
  font-weight: bold;
  color: #2C3E50;
  margin-bottom: 10px;
}

.encouragement-content .ec-msg {
  font-size: 18px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* ============================================
   多设备响应式适配
   ============================================ */

/* ===== 通用容器：PC端最大宽度居中 ===== */
@media (min-width: 1025px) {
  .page {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 40px;
  }
}

/* ===== 小手机 (max-width: 480px) ===== */
@media (max-width: 480px) {
  body { font-size: 15px; }
  
  .navbar {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .navbar .logo { font-size: 18px; flex-shrink: 0; }
  .navbar .nav-btns { gap: 4px; width: 100%; justify-content: center; margin-top: 6px; }
  .nav-btn { padding: 5px 10px; font-size: 13px; }
  
  .page { padding: 10px 8px; }
  
  .dashboard-header { padding: 20px 12px; border-radius: 18px; }
  .dashboard-header::before,
  .dashboard-header::after { font-size: 22px; }
  .day-counter { font-size: 28px; }
  .day-subtitle { font-size: 14px; }
  
  .progress-section { padding: 14px; border-radius: 16px; }
  .points-total { font-size: 22px; }
  .progress-bar-container { height: 24px; }
  .progress-bar-fill { font-size: 12px; }
  
  .section-header h2 { font-size: 18px; }
  .sh-icon { font-size: 22px; }
  
  .task-cards { grid-template-columns: 1fr; gap: 12px; }
  .task-card { padding: 18px; }
  .task-card .task-icon { font-size: 36px; }
  .task-card .task-title { font-size: 17px; }
  .task-card .task-desc { font-size: 13px; }
  
  .quick-actions { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .quick-btn { padding: 14px 8px; font-size: 13px; }
  .qb-icon { font-size: 28px; }
  
  .rewards-grid { grid-template-columns: 1fr; }
  
  .stats-grid { grid-template-columns: 1fr 1fr; }
  
  .char-cards-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
  .char-card { min-height: 90px; }
  .char-card .char-main { font-size: 32px; }
  .char-card .char-py { font-size: 12px; }
  
  .quiz-options { grid-template-columns: 1fr; gap: 8px; }
  .quiz-option { padding: 12px 16px; font-size: 16px; }
  
  .timer-circle { width: 180px; height: 180px; }
  .timer-time { font-size: 40px; }
  .timer-label { font-size: 14px; }
  
  .mood-btn { width: 55px; height: 55px; font-size: 30px; }
  
  .back-btn { padding: 8px 16px; font-size: 14px; }
  
  .knowledge-box, .example-box { padding: 14px; font-size: 15px; }
  .fun-topic-detail { font-size: 15px; padding: 16px; }
  
  .points-hero .big-points { font-size: 42px; }
  .mark-complete-btn { font-size: 17px; padding: 12px; }
  
  .encouragement-content { padding: 25px; max-width: 92%; }
  .encouragement-content .ec-emoji { font-size: 60px; }
  .encouragement-content .ec-title { font-size: 22px; }
  .encouragement-content .ec-msg { font-size: 15px; }
  
  .recite-para { font-size: 17px; padding: 14px; }
}

/* ===== 大手机/小平板 (481px - 768px) ===== */
@media (min-width: 481px) and (max-width: 768px) {
  body { font-size: 16px; }
  
  .navbar .logo { font-size: 22px; }
  .nav-btn { padding: 7px 14px; font-size: 15px; }
  
  .day-counter { font-size: 36px; }
  
  .task-cards { grid-template-columns: 1fr 1fr; gap: 15px; }
  .task-cards .task-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
  
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  
  .rewards-grid { grid-template-columns: repeat(3, 1fr); }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  .char-cards-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  
  .timer-circle { width: 240px; height: 240px; }
  .timer-time { font-size: 52px; }
  
  .points-hero .big-points { font-size: 52px; }
}

/* ===== 平板 (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  body { font-size: 17px; }
  
  .page { padding: 25px 30px; }
  
  .dashboard-header { padding: 35px 30px; }
  .day-counter { font-size: 44px; }
  
  .task-cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  
  .quick-actions { grid-template-columns: repeat(6, 1fr); gap: 15px; }
  
  .rewards-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  
  .char-cards-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
  .char-card .char-main { font-size: 42px; }
  
  .quiz-options { grid-template-columns: 1fr 1fr; }
  
  .timer-circle { width: 280px; height: 280px; }
  .timer-time { font-size: 58px; }
  
  .points-hero .big-points { font-size: 56px; }
  
  .nav-btn:hover { transform: scale(1.08); }
  .task-card:hover { transform: translateY(-5px) scale(1.02); }
  .quick-btn:hover { transform: scale(1.05); }
  .quiz-option:hover:not(.selected):not(.correct):not(.wrong) {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
}

/* ===== PC桌面端 (1025px - 1440px) ===== */
@media (min-width: 1025px) and (max-width: 1440px) {
  body { font-size: 18px; }
  
  .navbar {
    padding: 14px 40px;
  }
  .navbar .logo { font-size: 26px; }
  .nav-btn { padding: 10px 20px; font-size: 16px; }
  
  .page { 
    padding: 30px 40px;
    max-width: 1100px;
  }
  
  .dashboard-header { 
    padding: 40px; 
    border-radius: 30px;
  }
  .day-counter { font-size: 48px; }
  .day-subtitle { font-size: 20px; }
  
  .task-cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .task-card { padding: 30px; }
  .task-card .task-icon { font-size: 52px; }
  .task-card .task-title { font-size: 22px; }
  .task-card .task-desc { font-size: 16px; }
  
  .quick-actions { 
    grid-template-columns: repeat(6, 1fr); 
    gap: 16px;
  }
  .quick-btn { 
    padding: 20px 12px; 
    font-size: 15px;
    border-radius: 18px;
  }
  .qb-icon { font-size: 36px; }
  
  .rewards-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .reward-card { padding: 24px; }
  .reward-card .reward-icon { font-size: 42px; }
  
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  
  .char-cards-grid { 
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
    gap: 14px;
  }
  .char-card { min-height: 130px; }
  .char-card .char-main { font-size: 46px; }
  .char-card .char-py { font-size: 15px; }
  
  .quiz-options { grid-template-columns: 1fr 1fr; gap: 14px; }
  .quiz-option { padding: 16px 24px; font-size: 18px; }
  
  .timer-circle { width: 320px; height: 320px; }
  .timer-time { font-size: 64px; }
  .timer-label { font-size: 18px; }
  
  .mood-btn { width: 80px; height: 80px; font-size: 42px; }
  
  .points-hero .big-points { font-size: 60px; }
  
  .knowledge-box, .example-box { font-size: 18px; padding: 24px; }
  .fun-topic-detail { font-size: 17px; padding: 24px; }
  
  /* PC端hover效果 */
  .nav-btn:hover { transform: scale(1.1); background: rgba(255,255,255,0.6); }
  .task-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.15); }
  .quick-btn:hover { transform: scale(1.08); background: rgba(78,205,196,0.15); }
  .quiz-option:hover:not(.selected):not(.correct):not(.wrong) { 
    transform: scale(1.03); 
    box-shadow: 0 6px 20px rgba(0,0,0,0.12); 
  }
  .char-card:hover { transform: scale(1.05); }
  .reward-card:hover { transform: translateY(-4px); }
  .recite-para:hover { transform: translateX(4px); }
  .mark-complete-btn:hover { transform: scale(1.08); }
  
  .encouragement-content { max-width: 480px; padding: 50px; }
}

/* ===== 大屏 (1441px+) ===== */
@media (min-width: 1441px) {
  body { font-size: 19px; }
  
  .navbar { padding: 16px 60px; }
  .navbar .logo { font-size: 28px; }
  .nav-btn { padding: 12px 24px; font-size: 17px; }
  
  .page { 
    max-width: 1200px;
    padding: 40px 50px;
  }
  
  .dashboard-header { padding: 50px; border-radius: 35px; }
  .day-counter { font-size: 52px; }
  .day-subtitle { font-size: 22px; }
  
  .task-cards { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .task-card { padding: 35px; }
  .task-card .task-icon { font-size: 56px; }
  .task-card .task-title { font-size: 24px; }
  
  .quick-actions { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .quick-btn { padding: 24px 16px; font-size: 16px; }
  
  .rewards-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  
  .char-cards-grid { 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 16px;
  }
  .char-card { min-height: 140px; }
  .char-card .char-main { font-size: 50px; }
  
  .quiz-options { grid-template-columns: 1fr 1fr; gap: 16px; }
  .quiz-option { padding: 18px 28px; font-size: 19px; }
  
  .timer-circle { width: 360px; height: 360px; }
  .timer-time { font-size: 72px; }
  
  .points-hero .big-points { font-size: 66px; }
  
  /* 大屏hover效果同PC */
  .nav-btn:hover { transform: scale(1.1); }
  .task-card:hover { transform: translateY(-6px); }
  .quick-btn:hover { transform: scale(1.08); }
  .quiz-option:hover:not(.selected):not(.correct):not(.wrong) { transform: scale(1.03); }
  .char-card:hover { transform: scale(1.05); }
  .reward-card:hover { transform: translateY(-4px); }
}

/* ===== 超宽屏 (2560px+) ===== */
@media (min-width: 2560px) {
  .page { max-width: 1400px; }
  body { font-size: 20px; }
  .day-counter { font-size: 56px; }
}

/* ===== 横屏手机 (landscape, 高度小) ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar { padding: 6px 16px; }
  .navbar .logo { font-size: 18px; }
  .nav-btn { padding: 4px 10px; font-size: 13px; }
  
  .dashboard-header { padding: 15px 20px; }
  .day-counter { font-size: 28px; }
  
  .timer-circle { width: 160px; height: 160px; }
  .timer-time { font-size: 36px; }
  
  .task-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 安全区域适配 (iPhone X+) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .navbar {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ===== 触控优化：确保最小触控区域 ===== */
@media (pointer: coarse) {
  .nav-btn, .quick-btn, .quiz-option, .tab-btn, .mood-btn, .back-btn, .mark-complete-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .char-cards-grid { gap: 10px; }
  .quiz-options { gap: 10px; }
}

/* ===== 鼠标精确指针优化 ===== */
@media (pointer: fine) {
  .nav-btn, .quick-btn, .quiz-option, .tab-btn {
    transition: all 0.25s ease;
  }
  
  .task-card { cursor: pointer; }
  .char-card { cursor: pointer; }
  .recite-para { cursor: pointer; }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 暗色模式（可选，跟随系统） ===== */
@media (prefers-color-scheme: dark) {
  /* 暂不启用，保持明亮风格适合儿童 */
}

/* ===== 滚动优化 ===== */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 自定义滚动条（PC端） */
@media (min-width: 1025px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e55555, #8a55b8);
  }
}

/* ===== 优化9: 模糊隐藏效果 ===== */
.blur-text {
  position: relative;
  cursor: pointer;
  filter: blur(8px);
  user-select: none;
  transition: filter 0.4s ease;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0,0,0,0.02);
  margin-bottom: 8px;
}
.blur-text.revealed {
  filter: blur(0);
  user-select: auto;
  background: rgba(102,126,234,0.05);
}
.blur-text::after {
  content: '👆 点击显示';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #999;
  background: rgba(255,255,255,0.9);
  padding: 4px 12px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.3s;
}
.blur-text.revealed::after {
  opacity: 0;
}

/* ===== 优化3: 生字卡片背面信息 ===== */
.char-info-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 13px;
}
.char-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ci-label {
  color: #888;
  font-size: 12px;
}
.ci-value {
  color: #333;
  font-weight: 500;
}

/* ===== 优化6/7: 语音按钮 ===== */
.voice-input-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}
.voice-input-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.voice-input-btn.recording {
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  animation: pulse-record 1s infinite;
}
@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(231,76,60,0); }
}

/* ===== 优化8: 浮动番茄钟 ===== */
.floating-timer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  padding: 10px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(102,126,234,0.5);
  transition: all 0.3s;
  animation: float-bounce 2s ease-in-out infinite;
}
.floating-timer:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(102,126,234,0.6);
}
.floating-timer-icon {
  font-size: 20px;
}
.floating-timer-time {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ===== 优化8: 番茄钟提醒弹窗 ===== */
.timer-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}
.timer-alert-content {
  background: white;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn 0.4s ease;
}
.timer-alert-emoji {
  font-size: 80px;
  margin-bottom: 15px;
  animation: bounce-emoji 0.6s ease;
}
.timer-alert-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.5;
}
@keyframes bounce-emoji {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== 优化5: 错题集样式 ===== */
.wrong-section {
  margin-bottom: 25px;
}
.wrong-item {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-left: 4px solid #E74C3C;
}
.wrong-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}
.wrong-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.wrong-answer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  margin-bottom: 10px;
}
.wrong-your {
  color: #666;
}
.wrong-correct {
  color: #666;
}
.btn-mini {
  background: linear-gradient(135deg, var(--green), #27AE60);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-mini:hover {
  transform: scale(1.05);
}

/* ===== 优化6: 话题丰富内容样式 ===== */
.topic-detail-section {
  background: rgba(102,126,234,0.03);
  border-radius: 16px;
  padding: 20px;
  margin: 15px 0;
}
.topic-role {
  background: rgba(155,89,182,0.05);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 15px;
  border-left: 4px solid var(--purple);
}
.topic-video {
  background: rgba(52,152,219,0.05);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 15px;
  text-align: center;
}
.video-link-btn {
  display: inline-block;
  margin-top: 10px;
  background: linear-gradient(135deg, #3498DB, #2980B9);
  color: white;
  padding: 10px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}
.video-link-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(52,152,219,0.4);
}

/* ===== 优化2: 背诵课文区域 ===== */
.recite-section {
  padding: 10px 0;
}
.recite-text {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
  padding: 20px;
  background: rgba(142,68,173,0.03);
  border-radius: 16px;
  border: 2px dashed rgba(142,68,173,0.2);
}

/* ===== 优化4: 数学口算题标记 ===== */
.math-q-type {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 5px;
}
.math-q-type.oral-calc {
  background: rgba(52,152,219,0.1);
  color: #2980B9;
}
.math-q-type.application {
  background: rgba(46,204,113,0.1);
  color: #27AE60;
}

/* ===== 通用按钮样式补充 ===== */
.btn-secondary {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}
.btn {
  display: inline-block;
}

/* ===== 导航按钮disabled状态 ===== */
.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== 响应式补充 ===== */
@media (max-width: 480px) {
  .floating-timer {
    bottom: 12px;
    right: 12px;
    padding: 8px 12px;
  }
  .floating-timer-time {
    font-size: 14px;
  }
  .timer-alert-content {
    padding: 25px;
  }
  .timer-alert-emoji {
    font-size: 60px;
  }
  .timer-alert-text {
    font-size: 18px;
  }
  .wrong-answer-info {
    flex-direction: column;
    gap: 5px;
  }
}
