/* 单词填空专属样式（公共组件、变量见 ../../style.css）
   复用护眼童趣主题：暖色底、降饱和柔和配色、大圆角 */

#app {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 760px;
}

#sidebar {
  background: var(--panel);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.actions { display: flex; flex-direction: column; gap: 8px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row .btn { padding: 10px 8px; }

/* 进度圆点 */
.progress-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: background .15s; }
.dot.current { background: var(--primary); opacity: 0.45; }
.dot.done { background: var(--primary); }

/* 已辅助时最佳栏灰显 */
.stat-value.muted { color: var(--primary); opacity: 0.4; }

/* 主区 */
#play-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 26px;
  padding: 36px 24px;
  min-height: 360px;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* 出题区固定高度 + 内部居中：解析面板显隐不改变单词位置 */
.question-zone {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

/* 提示：释义 + 词性 */
.clue { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.clue-text { font-size: 26px; font-weight: 700; color: var(--text); }
.clue-pos { font-size: 13px; color: #9a8d76; }

/* 单词槽位 */
.word-display { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.slot {
  width: 48px; height: 60px; font-size: 28px; font-weight: 700;
  display: grid; place-items: center; border-radius: 12px;
  border: 2px solid var(--border); background: var(--panel); color: var(--primary);
}
.slot.fixed { border-color: transparent; color: var(--text); background: transparent; }
.slot.fillable {
  cursor: pointer; border-style: dashed; color: var(--primary);
  transition: background .12s, border-color .12s, transform .08s;
}
.slot.fillable:active { transform: translateY(1px); }
@media (hover: hover) {
  .slot.fillable:hover:not(:disabled) { background: #f0e9d6; }
}
.slot.filled { border-style: solid; background: #f0e9d6; }
.slot.wrong { border-color: #e57373; color: #e57373; background: #fdeaea; }
.slot:disabled { cursor: default; }

/* 字母块池 */
.tile-pool { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 380px; }
.tile {
  width: 50px; height: 50px; font-size: 22px; font-weight: 700;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  background: var(--panel); color: var(--primary);
  box-shadow: 0 4px 12px -4px rgba(140, 100, 40, 0.18);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
@media (hover: hover) {
  .tile:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 10px 20px -6px rgba(140, 100, 40, 0.28); }
}
.tile:active:not(:disabled) { transform: translateY(-1px); }
.tile.used { opacity: 0.25; box-shadow: none; }
.tile:disabled { cursor: default; }

/* 胜利弹窗记录行 */
.modal-content .win-record { color: var(--primary); font-size: 15px; min-height: 1.2em; }

/* 响应式 */
@media (max-width: 640px) {
  #app { grid-template-columns: 1fr; }
  .slot { width: 40px; height: 50px; font-size: 22px; }
  .tile { width: 42px; height: 42px; font-size: 18px; }
  #play-area { padding: 24px 16px; min-height: 300px; gap: 20px; }
  .question-zone { min-height: 210px; gap: 20px; }
  .clue-text { font-size: 22px; }
}
