/* ==================== 英文单词、短语练习独立页面样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  background: #f0f2f8;
  min-height: 100vh;
  color: #333;
}

/* ==================== 顶部标题 ==================== */
.header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 20px 20px 18px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 20px rgba(245, 87, 108, 0.25);
  position: relative;
}

.header h1 {
  font-size: 22px;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.date-display {
  font-size: 14px;
  opacity: 0.9;
}

.btn-back-home {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 12px;
  transition: background 0.2s;
}

.btn-back-home:hover {
  background: rgba(255,255,255,0.35);
}

/* 测验中途退出按钮 */
.quiz-exit-btn {
  display: block;
  margin-left: auto;
  margin-bottom: 10px;
  background: #f2f3f7;
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-exit-btn:hover {
  background: #fdeaea;
  color: #e74c3c;
}

/* ==================== 页面主体：左右并列 ==================== */
.page-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 30px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.col-word, .col-phrase {
  flex: 1;
  min-width: 0;
}

/* ==================== 英文单词 ==================== */
.daily-words {
  margin-bottom: 16px;
}

.daily-words__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.daily-words__header h2 {
  font-size: 18px;
  color: #333;
}

.btn-word-quiz {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(245, 87, 108, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-word-quiz:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(245, 87, 108, 0.35);
}

.btn-word-quiz:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* 单词卡片网格 */
.daily-words__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dw-card {
  background: white;
  border: 2px solid #eef0f6;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.dw-card:hover {
  border-color: #f5576c;
  box-shadow: 0 4px 16px rgba(245, 87, 108, 0.12);
  transform: translateY(-2px);
}

.dw-card__en {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  margin-bottom: 2px;
  line-height: 1.3;
}

.dw-card__speak {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto;
  transition: all 0.2s;
}

.dw-card__speak:hover {
  background: rgba(245, 87, 108, 0.1);
  border-color: #f5576c;
}

/* 单词卡片按钮行（朗读 + 拼读） */
.dw-card__btns { display: flex; gap: 6px; margin: 2px auto; }
.dw-card__speak.dw-card__spell { border-color: #b8a6ff; color: #7c5cf0; }
.dw-card__speak.dw-card__spell:hover {
  background: rgba(124, 92, 240, 0.12);
  border-color: #8a6cff;
}

/* 打印按钮（旧版头部样式，保留兼容） */
.btn-print {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.65);
  border-radius: 18px;
  padding: 7px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-print:hover { background: rgba(255,255,255,0.42); }

/* 卡片位置的打印按钮（今日单词/今日短语卡片头部） */
.header-btns { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.btn-card-print {
  border: 1.5px solid #b8a6ff;
  border-radius: 10px;
  background: #f6f4ff;
  color: #7c5cf0;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-card-print:hover {
  background: #ede9fe;
  border-color: #8a6cff;
}

.dw-card__zh {
  font-size: 13px;
  color: #666;
  font-weight: 600;
  line-height: 1.3;
}

/* ==================== 英文短语 ==================== */
.daily-phrases {
  margin-bottom: 16px;
}

.daily-phrases__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.daily-phrases__header h2 {
  font-size: 18px;
  color: #333;
}

.btn-phrase-quiz {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-phrase-quiz:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(102, 126, 234, 0.35);
}

.btn-phrase-quiz:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* 短语卡片列表 */
.daily-phrases__grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-card {
  background: white;
  border: 2px solid #eef0f6;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
  transform: translateY(-2px);
}

.dp-card__en {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  flex: 1;
  line-height: 1.3;
}

.dp-card__speak {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.dp-card__speak:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* 短语卡片按钮行（朗读 + 拼读） */
.dp-card__btns { display: flex; gap: 6px; flex-shrink: 0; }
.dp-card__speak.dp-card__spell { border-color: #b8a6ff; color: #7c5cf0; }
.dp-card__speak.dp-card__spell:hover {
  background: rgba(124, 92, 240, 0.12);
  border-color: #8a6cff;
}

.dp-card__zh {
  font-size: 13px;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}

/* ==================== 测验区域（单词 & 短语共用） ==================== */
.quiz-box {
  background: white;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.quiz-box--phrase {
  /* 短语测验样式复用 */
}

.quiz-word {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  text-align: center;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-word--phrase {
  font-size: 20px;
}

.quiz-speak {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.quiz-speak:hover {
  background: rgba(245, 87, 108, 0.1);
  border-color: #f5576c;
}

.quiz-progress {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.quiz-opt {
  background: #fafbff;
  border: 2px solid #eef0f6;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
  font-weight: 600;
}

.quiz-opt:hover {
  border-color: #f5576c;
  background: rgba(245, 87, 108, 0.04);
}

.quiz-box--phrase .quiz-opt:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.04);
}

.quiz-opt.correct {
  border-color: #4caf50;
  background: #e8f5e9;
  color: #388e3c;
}

.quiz-opt.wrong {
  border-color: #f44336;
  background: #ffebee;
  color: #d32f2f;
}

.quiz-feedback {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 8px;
  border-radius: 10px;
}

.quiz-feedback.correct {
  color: #4caf50;
  background: #e8f5e9;
}

.quiz-feedback.wrong {
  color: #f44336;
  background: #ffebee;
}

/* ==================== 测验完成页 ==================== */
.quiz-done-card {
  background: white;
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.quiz-done-icon {
  font-size: 56px;
  margin-bottom: 8px;
}

.quiz-done-score {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
}

.quiz-done-score--phrase {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.quiz-done-detail {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}

.quiz-done-perfect {
  font-size: 18px;
  color: #4caf50;
  font-weight: 700;
  margin-bottom: 16px;
}

.btn-primary {
  border: none;
  padding: 14px 28px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.2s;
  color: white;
}

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

.btn-primary--word {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 16px rgba(245, 87, 108, 0.3);
}

.btn-primary--phrase {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* ==================== 响应式：小屏 ==================== */
@media (max-width: 768px) {
  .page-body {
    flex-direction: column;
    padding: 14px 12px 20px;
  }

  .daily-words__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dw-card__en {
    font-size: 18px;
  }

  .dw-card__zh {
    font-size: 14px;
  }

  .dp-card__en {
    font-size: 16px;
  }

  .btn-back-home {
    position: static;
    transform: none;
    display: inline-block;
    margin-bottom: 8px;
  }

  .header-inner {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .daily-words__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dp-card {
    flex-wrap: wrap;
    gap: 4px;
  }

  .dp-card__en {
    font-size: 15px;
  }

  .dp-card__zh {
    width: 100%;
    text-align: left;
    padding-left: 0;
  }
}

/* ==================== 听写功能（单词/短语） ==================== */
.btn-dict {
  border: 1.5px solid #f0b35c;
  border-radius: 10px;
  background: #fff7e8;
  color: #b45309;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-dict:hover {
  background: #fdf0d5;
  border-color: #e67e22;
}
.dict-panel {
  max-width: 1200px;
  margin: 0 auto 12px;
  padding: 0 16px;
}
.dict-card {
  background: #fffdf5;
  border: 1.5px dashed #f0c26b;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 3px 12px rgba(230, 126, 34, 0.12);
}
.dict-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 10px;
  text-align: center;
}
.dict-card__settings {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  justify-content: center;
}
.dict-card__label { font-size: 13px; color: #888; }
.dict-opt {
  border: none;
  background: #f5f0e0;
  border-radius: 12px;
  padding: 5px 13px;
  font-size: 13px;
  color: #7d6608;
  cursor: pointer;
  font-weight: 600;
}
.dict-opt:hover { background: #f0e6c8; }
.dict-opt.active { background: #f59e0b; color: #fff; }
.dict-start {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 11px;
  background: linear-gradient(135deg, #f59e0b 0%, #e67e22 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}
.dict-card__progress {
  font-size: 15px;
  color: #444;
  text-align: center;
  margin-bottom: 8px;
}
.dict-card__progress b { color: #e67e22; font-size: 18px; }
.dict-card__hint {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}
.dict-card__controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.dict-card__answers {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  line-height: 1.9;
}
.dict-hiding-note {
  background: #fdf2e9;
  border: 1.5px dashed #e67e22;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  margin: 10px 0;
  text-align: center;
}
