/* 由 flashcards.html 内联样式抽出（内容不变，便于缓存） */

/* ====== Flashcards - 百词斩/墨墨 style ====== */

/* --- Settings Panel --- */
.settings-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.settings-panel select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  min-height: 44px; /* 触控目标 ≥44px */
}
.set-label { font-size: 12px; color: var(--text-muted); }
.settings-panel .chip {
  padding: 6px 16px;
  font-size: 12px;
}

/* --- Timer Bar --- */
.timer-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 8px 0;
  overflow: hidden;
}
.timer-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s linear;
  background: var(--primary);
}

/* --- Card (3D flip) --- */
.card-scene {
  perspective: 1200px;
  margin: 10px 0;
  min-height: 240px;
}
.card-flipper {
  position: relative;
  width: 100%;
  height: 240px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}
.card-flipper.flipped {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  background: #fff;
  overflow: hidden;
}
.card-front {
  z-index: 2;
}
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.card-back .card-word {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 16px;
}
.card-back .card-trans {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.card-word {
  font-size: 36px;
  font-weight: 700;
  transition: all 0.2s;
  text-align: center;
  line-height: 1.3;
}
.card-phonetic {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 400;
}
.card-speak-btn {
  margin: 10px auto 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.card-speak-btn:active { transform: scale(0.92); background: #f5f5f5; }
.card-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  opacity: 0.6;
}

/* --- Completion state --- */
.card-complete {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 32px;
  text-align: center;
}
.card-complete .cc-icon {
  font-size: 56px;
  margin-bottom: 12px;
}
.card-complete .cc-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-complete .cc-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Buttons row --- */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.action-row .btn {
  flex: 1;
  padding: 14px 12px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  min-height: 52px;
  transition: transform 0.15s var(--spring);
}
.action-row .btn:active { transform: scale(0.94); }

.btn-skip {
  background: #f5f5f5;
  color: var(--text-secondary);
}
.btn-skip:active { background: #e8e8e8; }

.btn-known {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}
.btn-unknown {
  background: linear-gradient(135deg, #ef5350, #e53935);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,83,80,0.3);
}

/* --- Stats --- */
.fe-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 14px;
  margin: 10px 0 0;
}
.fe-stat {
  text-align: center;
}
.fe-stat .fe-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.fe-stat .fe-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* --- Wrong Words List --- */
.wrong-section {
  margin-top: 12px;
}
.wrong-section .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wrong-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  gap: 10px;
  animation: fadeInUp 0.25s var(--ease-out);
}
.wrong-item:last-child { border-bottom: none; }
.wi-word {
  font-weight: 600;
  font-size: 15px;
  min-width: 80px;
}
.wi-trans {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}
.wi-del {
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 12px 16px; /* 加大触控区 ≥44px */
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wi-del:active { color: var(--danger); }

/* empty state */
.wrong-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* transition */
@keyframes cardPop {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
.card-pop {
  animation: cardPop 0.25s var(--spring);
}

/* --- 选择题模式 --- */
.quiz-options {
  margin-top: 16px;
  text-align: center;
}
.quiz-prompt {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.quiz-phonetic {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 14px;
}
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.quiz-opt {
  padding: 16px 12px;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  word-break: break-word;
  transition: all 0.15s;
}
.quiz-opt:active { transform: scale(0.96); }
.quiz-opt.correct { background: #e8f8ee; border-color: var(--primary); color: var(--primary); font-weight: 600; }
.quiz-opt.wrong { background: #fdecec; border-color: var(--danger); color: var(--danger); }
.quiz-opt.disabled { pointer-events: none; opacity: 0.75; }
.quiz-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 纠错弹层 */
.task-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.45);z-index:999;display:flex;align-items:center;justify-content:center;}
.task-modal{width:78%;max-width:340px;background:#fff;border-radius:var(--radius);padding:20px 16px;box-shadow:var(--shadow);}
.task-modal-title{font-size:16px;font-weight:600;text-align:center;margin-bottom:12px;}
.task-modal-btns{display:flex;gap:12px;margin-top:16px;}
.task-modal-btns .btn{flex:1;min-height:44px;}
