/* ======================================
   🏝️ 桉歌的成长小岛 - 样式
   ====================================== */

/* 基础重置 & 字体 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #FF8C42;
  --primary-light: #FFB07A;
  --secondary: #4ECDC4;
  --accent: #FF6B6B;
  --bg: #FFF8F0;
  --card-bg: #FFFFFF;
  --text: #2D3436;
  --text-light: #636E72;
  --shadow: 0 4px 15px rgba(0,0,0,0.08);
  --radius: 20px;
  --radius-sm: 12px;
}

body {
  font-family: -apple-system, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ======================================
   启动画面
   ====================================== */
.splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #FF8C42 0%, #FF6B6B 50%, #FF3D3D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: splashFadeIn 0.6s ease;
}

.splash-content {
  text-align: center;
  padding: 40px 30px;
  animation: float 3s ease-in-out infinite;
}

.splash-emoji {
  font-size: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
  animation: bounce 2s ease-in-out infinite;
}

.splash-title {
  font-size: 2.2rem;
  color: white;
  font-weight: 800;
  text-shadow: 0 3px 10px rgba(0,0,0,0.2);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.splash-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 35px;
}

.btn-splash {
  background: white;
  color: var(--primary);
  border: none;
  padding: 16px 50px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.btn-splash:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-splash:active {
  transform: scale(0.97);
}

.splash-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  border-radius: 30px 30px 0 0;
}

/* ======================================
   主应用框架
   ====================================== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  animation: fadeIn 0.5s ease;
  position: relative;
  padding-bottom: 70px;
}

/* ======================================
   顶部状态栏
   ====================================== */
.topbar {
  background: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-emoji {
  font-size: 1.4rem;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.star-count {
  background: linear-gradient(135deg, #FFD93D, #FF8C42);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(255,140,66,0.3);
}

/* ======================================
   页面容器
   ====================================== */
.page-container {
  padding: 16px;
}

.page {
  display: none;
  animation: slideUp 0.4s ease;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 4px;
}

.page-header h2 {
  font-size: 1.3rem;
  flex: 1;
}

.btn-back {
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-back:active {
  transform: scale(0.9);
}

.btn-action {
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,140,66,0.3);
  transition: all 0.2s;
}

.btn-action:active {
  transform: scale(0.9);
}

/* ======================================
   主页 - 小岛地图
   ====================================== */
.home-hero {
  background: linear-gradient(135deg, #FF8C42 0%, #FF6B6B 100%);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  margin-bottom: 20px;
  color: white;
  box-shadow: 0 6px 20px rgba(255,107,107,0.25);
}

.home-avatar {
  font-size: 3.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.home-greeting {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.home-date {
  font-size: 0.9rem;
  opacity: 0.85;
}

.island-map {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.island-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.island-card:active {
  transform: scale(0.98);
}

.island-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.island-icon {
  font-size: 2.4rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg), #FFE8D6);
  border-radius: 16px;
}

.island-info {
  flex: 1;
}

.island-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.island-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

.island-badge {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.creator-badge {
  background: var(--secondary);
}

/* ======================================
   知识岛
   ====================================== */
.section-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-light);
  margin: 20px 0 12px;
  padding-left: 4px;
}

.knowledge-daily {
  margin-bottom: 10px;
}

.daily-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding-left: 4px;
}

.daily-card {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFF8F0 100%);
  border: 2px solid #FFE0B2;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  animation: cardPop 0.5s ease;
}

.daily-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.daily-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.daily-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
}

.knowledge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.knowledge-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
}

.knowledge-item:active {
  transform: scale(0.98);
}

.knowledge-item .ki-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.knowledge-item .ki-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.knowledge-item .ki-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ======================================
   打卡岛
   ====================================== */
.checkin-progress {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  text-align: center;
}

.progress-label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.progress-bar {
  height: 12px;
  background: #F0F0F0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD93D, #FF8C42);
  border-radius: 10px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.star-slot {
  font-size: 1.8rem;
  color: #E0E0E0;
  transition: all 0.3s ease;
}

.star-slot.filled {
  color: #FFD93D;
  text-shadow: 0 2px 8px rgba(255,217,61,0.4);
  animation: starPop 0.4s ease;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.task-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.task-item.done {
  opacity: 0.6;
}

.task-item.done .task-label {
  text-decoration: line-through;
}

.task-check {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.task-check:active {
  transform: scale(0.85);
}

.task-item.done .task-check {
  background: #E8F5E9;
}

.task-label {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ======================================
   创作岛
   ====================================== */
.create-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.create-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary);
}

.create-card .cc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.create-card .cc-content {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  white-space: pre-wrap;
}

.create-card .cc-date {
  font-size: 0.75rem;
  color: #B0B0B0;
  margin-top: 8px;
}

/* ======================================
   探索岛（问答）
   ====================================== */
.explore-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  min-height: 300px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 4px;
}



/* 八爪小智思考动画 */
.chat-msg.bot .thinking {
  animation: thinkPulse 1.2s ease-in-out infinite;
  display: inline-block;
}

@keyframes thinkPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-icon {
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chat-msg.bot .chat-bubble {
  background: white;
  border-radius: 4px 16px 16px 16px;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: white;
  border-radius: 16px 4px 16px 16px;
}

.explore-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-radius: 30px;
  padding: 6px 8px 6px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  bottom: 0;
}

.explore-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  padding: 8px 0;
  font-family: inherit;
  background: transparent;
}

.btn-voice {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-voice:active {
  background: #F0F0F0;
}

.btn-voice.listening {
  animation: pulse 1s ease-in-out infinite;
  background: var(--accent);
  border-radius: 50%;
  padding: 8px;
}

.btn-send {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-send:active {
  transform: scale(0.95);
}

/* ======================================
   弹窗
   ====================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  width: calc(100% - 40px);
  max-width: 400px;
  position: relative;
  animation: modalSlide 0.3s ease;
}

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

.modal-header h3 {
  font-size: 1.1rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 8px;
}

.modal-input {
  width: 100%;
  border: 2px solid #F0F0F0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  margin-bottom: 12px;
}

.modal-input:focus {
  border-color: var(--primary);
}

.modal-textarea {
  width: 100%;
  border: 2px solid #F0F0F0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  resize: vertical;
}

.modal-textarea:focus {
  border-color: var(--primary);
}

.modal-actions {
  margin-top: 16px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
  font-family: inherit;
}

.btn-primary:active {
  transform: scale(0.95);
}

/* ======================================
   奖励弹窗
   ====================================== */
.reward-modal {
  text-align: center;
  padding: 40px 24px;
}

.reward-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounce 1s ease-in-out infinite;
}

.reward-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.reward-text {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ======================================
   底部导航
   ====================================== */
.bottombar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 15px rgba(0,0,0,0.05);
  z-index: 100;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.5;
}

.nav-item.active {
  opacity: 1;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  font-size: 1.5rem;
  transition: transform 0.2s;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text);
}

/* ======================================
   🧠 不白吃小测试
   ====================================== */

.quiz-score {
  font-size: 0.8rem;
  background: #FFF3E0;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.quiz-start {
  text-align: center;
  padding: 30px 20px;
}

.quiz-start-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.quiz-start-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #FF8C42, #FF6B6B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz-start-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.quiz-best {
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

/* 分类选择器 */
.quiz-category-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
}

.quiz-cat-btn {
  background: var(--card-bg);
  border: 2.5px solid #F0F0F0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 110px;
  font-family: inherit;
}

.quiz-cat-btn:active {
  transform: scale(0.96);
}

.quiz-cat-btn.active {
  border-color: var(--primary);
  background: #FFF8F0;
  box-shadow: 0 4px 15px rgba(255,140,66,0.15);
}

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

.qcb-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.qcb-count {
  font-size: 0.75rem;
  color: var(--text-light);
  background: #F5F5F5;
  padding: 2px 10px;
  border-radius: 10px;
}

.quiz-progress {
  margin-bottom: 16px;
}

.quiz-progress-bar {
  height: 8px;
  background: #F0F0F0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD93D, #FF8C42);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.quiz-progress-text {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
}

.quiz-question-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow);
}

.quiz-q-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-opt {
  width: 100%;
  background: var(--bg);
  border: 2px solid #F0F0F0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.quiz-opt:active {
  transform: scale(0.98);
}

.quiz-opt:hover {
  border-color: var(--primary-light);
}

.quiz-opt.correct {
  background: #E8F5E9;
  border-color: #4CAF50;
  color: #2E7D32;
  font-weight: 700;
}

.quiz-opt.wrong {
  background: #FFEBEE;
  border-color: #F44336;
  color: #C62828;
  font-weight: 700;
}

.quiz-tip {
  margin-top: 14px;
  padding: 14px 16px;
  background: #FFF8E1;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  border-left: 4px solid #FFD54F;
  animation: slideUp 0.3s ease;
}

.quiz-result {
  text-align: center;
  padding: 20px 0;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 10px;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.result-score {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFD93D, #FF8C42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.result-msg {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.result-detail {
  text-align: left;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.82rem;
}

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

.result-item-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.result-item-q {
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  width: 40px;
}

.result-item-tip {
  color: var(--text-light);
  line-height: 1.4;
}

/* ======================================
   📊 积分统计
   ====================================== */

.stats-modal {
  max-height: 80vh;
  overflow-y: auto;
}

.quiz-daily-score {
  font-size: 0.75rem;
  background: #E8F5E9;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  color: #2E7D32;
  white-space: nowrap;
}

.quiz-start-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--primary);
  border: 2.5px solid var(--primary-light);
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: var(--shadow);
}

.btn-secondary:active {
  transform: scale(0.95);
}

.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.stat-box {
  background: linear-gradient(135deg, #FFF8F0, #FFE8D6);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FF8C42, #FF6B6B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
}

.stats-cats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.stats-cat {
  flex: 1;
  background: var(--card-bg);
  border: 2px solid #F0F0F0;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.stats-cat span:last-child {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 400;
}

.stats-history {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.stats-day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.82rem;
}

.stats-day:last-child {
  border-bottom: none;
}

.stats-day-date {
  font-weight: 600;
  color: var(--text);
  min-width: 85px;
}

.stats-day-score {
  font-weight: 700;
  color: var(--primary);
  min-width: 50px;
}

.stats-day-detail {
  color: var(--text-light);
  flex: 1;
  text-align: right;
  font-size: 0.78rem;
}

/* ======================================
   📕 错题岛
   ====================================== */

.btn-clear {
  font-family: inherit;
  color: white !important;
}

.wrong-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wrong-filter {
  background: var(--card-bg);
  border: 2px solid #F0F0F0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text-light);
}

.wrong-filter.active {
  border-color: #F44336;
  background: #FFEBEE;
  color: #C62828;
}

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.wrong-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid #F44336;
}

.wrong-card .wc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.wrong-card .wc-cat {
  font-size: 0.75rem;
  background: #FFEBEE;
  color: #C62828;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.wrong-card .wc-date {
  font-size: 0.72rem;
  color: #B0B0B0;
  margin-left: auto;
}

.wrong-card .wc-question {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.wrong-card .wc-wrong {
  font-size: 0.82rem;
  color: #C62828;
  margin-bottom: 4px;
}

.wrong-card .wc-correct {
  font-size: 0.82rem;
  color: #2E7D32;
  margin-bottom: 6px;
}

.wrong-card .wc-tip {
  font-size: 0.78rem;
  color: var(--text-light);
  background: #FFF8E1;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.5;
  margin-top: 6px;
}

.wrong-card .wc-delete {
  background: none;
  border: none;
  color: #B0B0B0;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 8px;
  padding: 4px 0;
  font-family: inherit;
}

/* ======================================
   动画
   ====================================== */
@keyframes splashFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

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

@keyframes cardPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* ======================================
   响应式
   ====================================== */
@media (max-width: 400px) {
  .splash-title {
    font-size: 1.8rem;
  }
  .home-greeting {
    font-size: 1.3rem;
  }
  .island-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
  }
  .daily-emoji {
    font-size: 2.8rem;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  background: #D0D0D0;
  border-radius: 4px;
}
