/* =========================================================================
 * practice.css — 练习类页面样式
 * 覆盖：practice 拼写练习 / cnpick 看义选词 / meaningpractice 看词选义
 *       meaninghub 词义中心 / advancedhub 进阶中心
 *       advancedpractice 听写+词义 / advancedreadwrite 看词义-拼单词
 * ========================================================================= */

/* ---------- 页面容器 ---------- */
[class^="page-"] .container {
  padding: 30rem;
  min-height: 100vh;
  padding-bottom: 180rem;
}

.page-hub .container {
  padding: 60rem 40rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-hub .header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 80rem;
  margin-top: 40rem;
}

.page-hub .icon {
  font-size: 100rem;
  margin-bottom: 20rem;
}

.page-hub .title {
  font-size: 52rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 12rem;
}

.page-hub .subtitle {
  font-size: 28rem;
  color: #8892b0;
}

.page-hub .btn-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30rem;
  margin-bottom: 60rem;
}

.page-hub .card-btn {
  border-radius: 25rem;
  padding: 45rem 35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6rem 25rem rgba(0, 0, 0, 0.1);
  transition: transform 0.15s;
  cursor: pointer;
}

.page-hub .card-btn:active {
  transform: scale(0.97);
}

.page-hub .card-engtocn {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  box-shadow: 0 6rem 25rem rgba(17, 153, 142, 0.3);
}

.page-hub .card-cntoeng {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 6rem 25rem rgba(79, 172, 254, 0.3);
}

.page-hub .card-dictation {
  background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
  box-shadow: 0 6rem 25rem rgba(242, 153, 74, 0.35);
}

.page-hub .card-readwrite {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 6rem 25rem rgba(245, 87, 108, 0.35);
}

.page-hub .card-icon {
  font-size: 64rem;
  margin-bottom: 18rem;
}

.page-hub .card-title {
  font-size: 38rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10rem;
}

.page-hub .card-desc {
  font-size: 26rem;
  color: rgba(255, 255, 255, 0.85);
}

.page-hub .btn-back {
  width: 60%;
  background: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 50rem;
  font-size: 30rem;
  padding: 0 60rem;
  height: 85rem;
  line-height: 85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 进度条 ---------- */
.progress-bar {
  margin-bottom: 30rem;
}

.progress-text {
  font-size: 26rem;
  color: #666;
  margin-bottom: 10rem;
  display: block;
}

.progress-inner {
  height: 8rem;
  background: #e8e8e8;
  border-radius: 4rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4rem;
  transition: width 0.3s;
}

/* ---------- 通用卡片 ---------- */
.section-card {
  background: #fff;
  border-radius: 20rem;
  padding: 30rem;
  margin-bottom: 20rem;
  box-shadow: 0 4rem 15rem rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 30rem;
  font-weight: bold;
  color: #333;
  display: block;
  margin-bottom: 25rem;
}

/* =========================================================================
 * 拼写练习（practice）
 * ========================================================================= */
.page-practice .word-section {
  margin-bottom: 30rem;
}

.page-practice .word-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 25rem;
  padding: 40rem 35rem;
  box-shadow: 0 6rem 25rem rgba(102, 126, 234, 0.3);
}

.page-practice .word-row {
  margin-bottom: 15rem;
}

.page-practice .word-row:last-child {
  margin-bottom: 0;
}

.page-practice .word-en {
  font-size: 60rem;
  font-weight: bold;
  color: #fff;
  display: block;
  letter-spacing: 3rem;
}

.page-practice .word-masked {
  font-size: 60rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  letter-spacing: 10rem;
}

.page-practice .word-cn {
  font-size: 32rem;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-top: 10rem;
}

.page-practice .btn-row {
  display: flex;
  gap: 25rem;
  margin-top: 30rem;
}

.page-practice .action-btn {
  flex: 1;
  padding: 22rem;
  border-radius: 25rem;
  font-size: 30rem;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: none;
  line-height: 1.5;
}

.page-practice .select-section {
  margin-bottom: 30rem;
}

.page-practice .syllable-options {
  display: flex;
  gap: 20rem;
  justify-content: center;
}

.page-practice .syllable-option {
  width: 80rem;
  height: 80rem;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
}

.page-practice .syllable-option.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.page-practice .syllable-input-list {
  display: flex;
  gap: 20rem;
}

.page-practice .syllable-group-box {
  border: 3rem dashed #d5daf5;
  border-radius: 20rem;
  padding: 20rem;
  margin-top: 20rem;
  background: #fafbfe;
}

.page-practice .syllable-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16rem;
}

.page-practice .syllable-group-label {
  display: block;
  font-size: 26rem;
  font-weight: bold;
  color: #667eea;
}

.page-practice .syllable-group-btns {
  display: flex;
  align-items: center;
  gap: 12rem;
}

.page-practice .syllable-group-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44rem;
  height: 44rem;
  border-radius: 50%;
  background: #667eea;
  color: #fff;
  font-size: 32rem;
  font-weight: bold;
  line-height: 1;
  user-select: none;
}

.page-practice .syllable-group-btn:active {
  opacity: 0.7;
}

.page-practice .syllable-group-num {
  font-size: 30rem;
  font-weight: bold;
  color: #333;
  min-width: 40rem;
  text-align: center;
}

.page-practice .syllable-group-inputs {
  display: flex;
  gap: 20rem;
}

.page-practice .syllable-input-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20rem 10rem;
  border-radius: 20rem;
  border: 3rem dashed #d0d0d0;
  background: #fafafa;
  cursor: pointer;
}

.page-practice .syllable-input-item.active {
  border: 3rem solid #667eea;
  background: #f0f0ff;
  box-shadow: 0 0 15rem rgba(102, 126, 234, 0.2);
}

.page-practice .syllable-slot {
  min-height: 70rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-practice .slot-text {
  font-size: 42rem;
  font-weight: bold;
  color: #333;
  letter-spacing: 4rem;
}

.page-practice .slot-text.placeholder {
  color: #ccc;
  font-size: 32rem;
}

.page-practice .combined-display {
  background: #f8f9fa;
  border-radius: 15rem;
  padding: 30rem;
  text-align: center;
}

.page-practice .combined-word {
  font-size: 48rem;
  font-weight: bold;
  color: #667eea;
  letter-spacing: 4rem;
  min-height: 60rem;
  display: block;
}

.page-practice .check-btn-wrapper {
  display: flex;
  gap: 20rem;
  margin-bottom: 30rem;
}

.page-practice .btn-skip {
  flex: 1;
  padding: 28rem;
  border-radius: 30rem;
  font-size: 30rem;
  font-weight: bold;
  border: 2rem solid #e0e0e0;
  background: #fff;
  color: #666;
}

.page-practice .check-btn {
  flex: 2;
  padding: 28rem;
  border-radius: 30rem;
  font-size: 32rem;
  font-weight: bold;
  border: none;
  background: #e0e0e0;
  color: #999;
}

.page-practice .check-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* =========================================================================
 * 看义选词（cnpick）/ 看词选义（meaningpractice）
 * ========================================================================= */
.page-cnpick .word-section,
.page-meaningpractice .word-section {
  margin-bottom: 40rem;
}

.page-cnpick .word-card {
  background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
  border-radius: 25rem;
  padding: 60rem 35rem;
  box-shadow: 0 6rem 25rem rgba(242, 153, 74, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-cnpick .word-cn {
  font-size: 52rem;
  font-weight: bold;
  color: #fff;
}

.page-meaningpractice .word-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 25rem;
  padding: 60rem 35rem;
  box-shadow: 0 6rem 25rem rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-meaningpractice .word-en {
  font-size: 64rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 4rem;
}

.prompt-text {
  font-size: 30rem;
  color: #888;
  text-align: center;
  margin-bottom: 30rem;
  display: block;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 20rem;
  margin-bottom: 30rem;
}

.option-item {
  background: #fff;
  border-radius: 20rem;
  padding: 35rem 30rem;
  display: flex;
  align-items: center;
  box-shadow: 0 4rem 15rem rgba(0, 0, 0, 0.06);
  border: 3rem solid #e8e8e8;
  transition: all 0.2s;
  cursor: pointer;
}

.option-item:active {
  transform: scale(0.97);
}

.option-letter {
  width: 56rem;
  height: 56rem;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-size: 28rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20rem;
  flex-shrink: 0;
}

.option-word,
.option-meaning {
  font-size: 34rem;
  color: #333;
  font-weight: 500;
  flex: 1;
}

.option-icon {
  font-size: 36rem;
  font-weight: bold;
  margin-left: 15rem;
}

.option-correct {
  border-color: #38ef7d;
  background: #f0fff5;
}

.option-correct .option-letter {
  background: #38ef7d;
  color: #fff;
}

.option-correct .option-icon {
  color: #38ef7d;
}

.option-wrong {
  border-color: #f45c43;
  background: #fff5f5;
}

.option-wrong .option-letter {
  background: #f45c43;
  color: #fff;
}

.option-wrong .option-icon {
  color: #f45c43;
}

.option-disabled {
  opacity: 0.5;
}

.feedback {
  margin-bottom: 30rem;
}

.feedback-card {
  border-radius: 20rem;
  padding: 30rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
}

.feedback-correct {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.feedback-wrong {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.feedback-icon {
  font-size: 40rem;
}

.feedback-text {
  font-size: 32rem;
  font-weight: bold;
  color: #fff;
}

/* =========================================================================
 * 字母选择面板 / 输入展示（advancedpractice / advancedreadwrite / practice）
 * ========================================================================= */
.letter-bank-card {
  padding-bottom: 25rem !important;
}

.letter-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 16rem;
  justify-content: center;
}

.letter-btn {
  width: 100rem;
  height: 100rem;
  border-radius: 20rem;
  background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4rem 12rem rgba(0, 0, 0, 0.1);
  border: 2rem solid #e0e0e0;
  transition: all 0.15s;
  cursor: pointer;
}

.letter-btn:active {
  transform: scale(0.93);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.15);
  background: #667eea;
  border-color: #667eea;
}

.letter-btn:active .letter-text {
  color: #fff;
}

.letter-text {
  font-size: 44rem;
  font-weight: bold;
  color: #333;
}

.delete-btn {
  background: linear-gradient(180deg, #fff5f5 0%, #ffe0e0 100%);
  border-color: #ffcccc;
}

.delete-btn:active {
  background: #eb3349;
  border-color: #eb3349;
}

.input-display {
  background: #f8f9fa;
  border-radius: 15rem;
  padding: 30rem 25rem;
  text-align: center;
  min-height: 90rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2rem dashed #d0d0d0;
}

.input-word {
  font-size: 46rem;
  font-weight: bold;
  color: #667eea;
  letter-spacing: 6rem;
  min-height: 56rem;
  line-height: 56rem;
  word-break: break-all;
}

.letter-count {
  font-size: 24rem;
  color: #999;
  text-align: right;
  display: block;
  margin-top: 12rem;
}

/* ---------- 词组：按单词上下分开输入 ---------- */
.word-count-badge {
  display: inline-block;
  margin-left: 12rem;
  padding: 4rem 16rem;
  font-size: 24rem;
  font-weight: normal;
  color: #667eea;
  background: #eef1ff;
  border-radius: 999rem;
  vertical-align: middle;
}

.phrase-input-list {
  display: flex;
  flex-direction: column;
  gap: 18rem;
  margin-top: 20rem;
}

.phrase-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20rem;
  border: 3rem dashed #d5daf5;
  border-radius: 20rem;
  padding: 20rem 26rem;
  background: #fafbfe;
  cursor: pointer;
  transition: all 0.15s;
}

.phrase-input-row.active {
  border: 3rem solid #667eea;
  background: #f0f0ff;
  box-shadow: 0 0 15rem rgba(102, 126, 234, 0.2);
}

.phrase-word-label {
  font-size: 26rem;
  font-weight: bold;
  color: #667eea;
  white-space: nowrap;
}

.phrase-word-input {
  font-size: 44rem;
  font-weight: bold;
  color: #333;
  letter-spacing: 2rem;
  min-height: 50rem;
  line-height: 50rem;
  word-break: break-all;
  text-align: right;
}

.phrase-word-input .placeholder-text {
  font-size: 28rem;
  font-weight: normal;
  color: #bbb;
}

/* =========================================================================
 * 听写+词义（advancedpractice）
 * ========================================================================= */
.page-advancedpractice .audio-section {
  margin-bottom: 30rem;
}

.page-advancedpractice .audio-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 25rem;
  padding: 50rem 35rem;
  box-shadow: 0 6rem 25rem rgba(102, 126, 234, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
  cursor: pointer;
}

.page-advancedpractice .audio-card:active {
  transform: scale(0.97);
}

.page-advancedpractice .audio-icon {
  font-size: 80rem;
  margin-bottom: 15rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.page-advancedpractice .audio-hint {
  font-size: 32rem;
  color: #fff;
  font-weight: bold;
  margin-bottom: 8rem;
}

.page-advancedpractice .audio-sub-hint {
  font-size: 24rem;
  color: rgba(255, 255, 255, 0.7);
}

.page-advancedpractice .meaning-card {
  margin-bottom: 20rem;
}

.page-advancedpractice .meaning-options {
  display: flex;
  flex-direction: column;
  gap: 18rem;
}

.page-advancedpractice .meaning-option {
  display: flex;
  align-items: center;
  gap: 20rem;
  background: #f8f9fa;
  border-radius: 16rem;
  padding: 24rem 22rem;
  border: 3rem solid #e8e8e8;
  transition: all 0.2s;
  cursor: pointer;
}

.page-advancedpractice .meaning-option:active {
  background: #eef0ff;
  border-color: #667eea;
}

.page-advancedpractice .meaning-option.selected {
  background: #eef0ff;
  border-color: #667eea;
  box-shadow: 0 2rem 12rem rgba(102, 126, 234, 0.2);
}

.page-advancedpractice .meaning-option .option-letter {
  background: #e0e0e0;
}

.page-advancedpractice .meaning-option.selected .option-letter {
  background: #667eea;
  color: #fff;
}

.page-advancedpractice .option-text {
  font-size: 28rem;
  color: #333;
  font-weight: 500;
}

.page-advancedpractice .check-btn-wrapper {
  margin-bottom: 20rem;
}

.page-advancedpractice .check-btn {
  width: 100%;
  padding: 28rem;
  border-radius: 30rem;
  font-size: 34rem;
  font-weight: bold;
  border: none;
  background: #e0e0e0;
  color: #999;
}

.page-advancedpractice .check-btn.active {
  background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
  color: #fff;
  box-shadow: 0 4rem 20rem rgba(242, 153, 74, 0.3);
}

/* =========================================================================
 * 看词义-拼单词（advancedreadwrite）
 * ========================================================================= */
.page-advancedreadwrite .cn-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 25rem;
  padding: 45rem 35rem;
  box-shadow: 0 6rem 25rem rgba(245, 87, 108, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30rem;
}

.page-advancedreadwrite .cn-label {
  font-size: 26rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16rem;
}

.page-advancedreadwrite .cn-meaning {
  font-size: 52rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 4rem;
}

.page-advancedreadwrite .check-btn-wrapper {
  margin-bottom: 20rem;
}

.page-advancedreadwrite .check-btn {
  width: 100%;
  padding: 28rem;
  border-radius: 30rem;
  font-size: 34rem;
  font-weight: bold;
  border: none;
  background: #e0e0e0;
  color: #999;
}

.page-advancedreadwrite .check-btn.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  box-shadow: 0 4rem 20rem rgba(245, 87, 108, 0.3);
}

/* =========================================================================
 * 结果区 / 统计栏 / 完成页（公共）
 * ========================================================================= */
.result-section {
  margin-bottom: 30rem;
}

.result-card {
  border-radius: 20rem;
  padding: 30rem;
  display: flex;
  align-items: center;
  gap: 20rem;
  margin-bottom: 18rem;
}

.result-correct {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.result-wrong {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.result-icon {
  font-size: 46rem;
  color: #fff;
}

.result-text {
  font-size: 28rem;
  color: #fff;
  flex: 1;
}

.result-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  margin: 16rem 0 24rem;
}

.legend-line {
  font-size: 22rem;
  color: #eee;
}

.answer-card {
  background: #fff;
  border-radius: 20rem;
  padding: 35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4rem 15rem rgba(0, 0, 0, 0.05);
  margin-bottom: 20rem;
}

.answer-label {
  font-size: 26rem;
  color: #888;
  margin-bottom: 15rem;
}

.answer-word {
  font-size: 50rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 10rem;
}

.answer-meaning {
  font-size: 32rem;
  color: #667eea;
  margin-bottom: 10rem;
}

.answer-syllables {
  font-size: 26rem;
  color: #999;
}

.result-btns {
  display: flex;
  gap: 20rem;
}

.result-btns .btn {
  flex: 1;
  padding: 26rem;
  border-radius: 25rem;
  font-size: 30rem;
  font-weight: bold;
  border: none;
  line-height: 1;
}

.btn-back {
  background: #f0f0f0;
  color: #666;
}

.btn-next {
  background: #e0e0e0;
  color: #999;
}

.btn-next.active {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #fff;
}

.stats-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 20rem 30rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -4rem 20rem rgba(0, 0, 0, 0.08);
  padding-bottom: calc(20rem + env(safe-area-inset-bottom));
  max-width: 750rem;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 36rem;
  font-weight: bold;
  color: #333;
}

.stat-num.correct {
  color: #11998e;
}

.stat-num.wrong {
  color: #eb3349;
}

.stat-label {
  font-size: 22rem;
  color: #888;
  margin-top: 4rem;
}

.stat-divider {
  width: 2rem;
  height: 50rem;
  background: #e0e0e0;
  margin: 0 40rem;
}

.completion-section {
  padding: 40rem 0;
}

.completion-card {
  background: #fff;
  border-radius: 30rem;
  padding: 50rem 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8rem 30rem rgba(0, 0, 0, 0.08);
}

.completion-icon {
  font-size: 100rem;
  margin-bottom: 20rem;
}

.completion-title {
  font-size: 40rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 40rem;
}

.completion-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30rem;
  margin-bottom: 50rem;
  width: 100%;
}

.stat-box {
  background: #f8f9fa;
  border-radius: 20rem;
  padding: 25rem 35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140rem;
}

.stat-box .stat-num {
  font-size: 40rem;
}

.stat-num.total {
  color: #667eea;
}

.stat-num.accuracy {
  color: #764ba2;
}

.btn-restart {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  margin-bottom: 20rem;
}

.btn-home {
  width: 100%;
  background: #f0f0f0;
  color: #666;
}
