/* ================= 全局基础 ================= */
html { font-size: 16px; }
* { -webkit-tap-highlight-color: transparent !important; outline: none !important; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ================= 主题变量（唯一色源） ================= */
:root {
  --bg-page:     #a3e9fc;   /* 网页背景：稍微加深的蓝色 */
  --bg-card:     #f0f7ff;    /* 卡片：浅蓝白 */
  --text-color:  #12354a;   
  --text-muted:  #4b7f99; 
  --box-border:  #93c5fd;
  --item-bg:     #e5f8ff;
  --tag-bg:      #bcd7f5;
  --keyboard-bg: #9ac3f0;
  --key-bg:      #e6f2fe;
  --key-text:    #1e293b;
}
.theme-dark {
  --bg-page:     #0f172a;   /* slate-900 */
  --bg-card:     #1e293b;   /* slate-800 */
  --text-color:  #cbd5e1;   /* slate-300 */
  --text-muted:  #94a3b8;   /* slate-400 */
  --box-border:  #334155;   /* slate-700 */
  --item-bg:     #0f172a;   /* slate-900 */
  --tag-bg:      #334155;
  --keyboard-bg: #0f172a;
  --key-bg:      #1e293b;
  --key-text:    #e2e8f0;
}

/* ================= body（无条件使用变量） ================= */
body {
  background: var(--bg-page);
  color: var(--text-color);
  transition: background .3s, color .3s;
  min-height: 100vh;
}

/* ================= 主题工具类（引用变量，无 dark: 变体） ================= */
.bg-page   { background-color: var(--bg-page); }
.bg-card   { background-color: var(--bg-card); }
.bg-itemc  { background-color: var(--item-bg); }
.bg-tagc   { background-color: var(--tag-bg); }
.text-main { color: var(--text-color); }
.text-muted{ color: var(--text-muted); }
.border-borderc { border-color: var(--box-border); }

/* ================= range 滑块 ================= */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; height: 20px; width: 20px;
  border-radius: 50%; background: #64748b; cursor: pointer; margin-top: -8px;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%; height: 6px; cursor: pointer; background: #e2e8f0; border-radius: 4px;
}
.dark input[type=range]::-webkit-slider-runnable-track { background: #475569; }

/* ================= 弹窗遮罩 ================= */
.modal-overlay { background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }

/* ================= 单词选择标签 ================= */
.word-checkbox { display: none; }
.word-label {
  cursor: pointer; user-select: none; transition: all .2s;
  display: inline-block; box-sizing: border-box;
}

/* ================= 工具类区块 ================= */
.bg-borderc { background-color: var(--box-border); }

/* ================= 圆点进度 ================= */
.word-item{ width: 16px; height: 16px; border-radius: 50%; background-color: #cbd5e1; transition: all 0.3s ease; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.word-item.correct { background-color: #86efac; box-shadow: 0 0 6px #86efac; }
.word-item.wrong { background-color: #fca5a5; box-shadow: 0 0 6px #fca5a5; }
.word-item.current {  background-color: #facc15;  box-shadow: 0 0 8px #facc15, 0 0 0 2px #fef08a;  transform: scale(1.15);}