/* 首页-每日单词学习 页面样式（拟物与截图一致） */

:root {
  --mint-1: #d5f7ec;
  --mint-2: #f6fffe;
  --text-1: #1f2b33;
  --text-2: #6b747c;
  --primary: #12caa2;
  --primary-2: #24e0bb;
  --divider: #e9eef2;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-1);
  background: linear-gradient(180deg, var(--mint-1) 0%, var(--mint-2) 55%, #ffffff 100%);
}

.page { max-width: 430px; margin: 0 auto; padding: 8px 14px 120px; touch-action: pan-y; }

/* 顶部 */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; }
.icon-btn { width: 38px; height: 38px; border: none; border-radius: 19px; background: transparent; font-size: 18px; color: #2c3a41; position: relative; }
.icon-btn .dot { position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; }
.search-pill { flex: 1; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: rgba(255,255,255,.52); border-radius: 22px; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.search-pill i { color: #7a8a93; }
.search-pill input { border: none; outline: none; background: transparent; width: 100%; font-size: 14px; color: #40515a; }

/* 打卡天数 */
.streak { text-align: center; padding: 90px 0 46px; } 
.streak .label { color: #5f6d76; font-size: 16px; }
.streak .days { font-size: 112px; line-height: 1; font-weight: 900; letter-spacing: 2px; margin-top: 12px; color: #1c252b; }
.flame { font-style: normal; font-size: 18px; transition: all 0.3s ease; }
.flame.checked { 
  font-size: 24px; 
  animation: flameChecked 2s ease-in-out infinite; 
  filter: drop-shadow(0 0 8px rgba(255, 140, 84, 0.6));
}

@keyframes flameChecked {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 词书卡片 */
.book-card { background: #fff; border-radius: 16px; box-shadow: 0 12px 36px rgba(0,0,0,.08); padding: 18px 16px; border: 1px solid var(--divider); margin: 8px 2px; min-width: calc(100% - 4px); }
.book-card .row-1 { display: flex; align-items: center; justify-content: space-between; }
.book-card .title { font-size: 20px; font-weight: 700; color: #22313a; letter-spacing: .5px; }
.book-card .enter { color: #6d7a81; font-size: 14px; }
.book-card .row-2 { margin-top: 14px; }
.progress .bar { height: 8px; border-radius: 6px; background: #edf2f4; overflow: hidden; position: relative; }
.progress .bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%); box-shadow: 0 4px 14px rgba(18,202,162,.35); }
.progress .meta { display: flex; justify-content: space-between; color: #8a959c; font-size: 14px; margin-top: 8px; }
.progress .learned { order: -1; }

/* 生词本卡片额外排版 */
.vocab-card .vocab-meta { margin-bottom: 8px; }
.vocab-card .vocab-meta .left { color: #506068; }
.vocab-card .vocab-meta .right { color: #9aa4aa; }
.vocab-card b { font-weight: 700; color: #1c252b; }

/* 主要内容滑动容器 */
.main-slider { overflow: hidden; }
.main-slides { display: flex; transition: transform .35s ease; will-change: transform; }
.main-slide { 
  min-width: 100%; 
  flex-shrink: 0; 
  padding: 0 2px; /* 小边距保持视觉一致 */
}

/* 统计 */
.stats { display: flex; align-items: center; justify-content: space-around; padding: 48px 0 18px; color: #6a747c; } /* 顶部+30px，底部+10px */
.stat { text-align: center; min-width: 120px; }
.stat .label { font-size: 16px; margin-bottom: 6px; }
.stat .value { font-size: 18px; }
.stat b { font-size: 20px; color: #1c252b; }

/* CTA */
.cta { padding: 10px 0 0; text-align: center; }
.start { width: calc(100% - 24px); max-width: 420px; height: 64px; border-radius: 32px; border: none; color: white; font-size: 22px; font-weight: 800; letter-spacing: 1px; cursor: pointer; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%); box-shadow: 0 24px 40px rgba(18,202,162,.28); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.start .circle { width: 36px; height: 36px; border-radius: 18px; background: rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; }
.start:active { transform: translateY(1px); }

/* 页面轮播点放在按钮下方 */
.dots { margin-top: 14px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #e3e8eb; }
.dots .active { background: #9fd9cc; }

/* 底部导航样式已移动到 tabbar.css */

/* 学习类型选择模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.study-type-modal {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.study-type-modal h3 {
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.study-type-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.study-type-btn {
  background: #fff;
  border: 2px solid var(--divider);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.study-type-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(18, 202, 162, 0.15);
}

.study-type-btn:active {
  transform: translateY(0);
}

.study-type-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.study-type-btn.completed {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.study-type-btn.completed .btn-header i {
  color: #10b981;
}

.btn-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.btn-header i {
  font-size: 20px;
  color: var(--primary);
}

.btn-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.btn-progress {
  font-size: 14px;
  color: var(--text-2);
}

.completion-message {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-radius: 12px;
  margin-bottom: 20px;
}

.completion-message i {
  font-size: 24px;
  color: #f39c12;
  margin-bottom: 8px;
  display: block;
}

.completion-message p {
  margin: 0;
  font-size: 15px;
  color: #856404;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: center;
}

.modal-actions .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .cancel {
  background: #f8f9fa;
  color: var(--text-2);
}

.modal-actions .cancel:hover {
  background: #e9ecef;
}

@media (max-width: 360px) {
  .streak .days { font-size: 96px; }
}

