/* =========================================================
 * BrightEnglish 明亮英语教学平台 · 全局样式
 * 明亮浅色系 + 高对比文字 + 丰富动画
 * ========================================================= */

:root {
  /* 品牌色 */
  --blue:   #4D96FF;
  --blue-d:  #2F6FE0;
  --violet: #9B5DE5;
  --green:  #2ECC71;
  --green-d:#22A85A;
  --orange: #FF9F45;
  --pink:   #FF6B9D;
  --cyan:   #00C2A8;
  --yellow: #FFD93D;
  --red:    #FF6B6B;

  /* 中性色 */
  --ink:    #1E2A44;
  --ink-2:  #5B6B8C;
  --ink-3:  #8CA0C0;
  --line:   #E3EBF7;
  --bg:     #F4F8FF;
  --bg-2:   #EAF2FF;
  --white:  #FFFFFF;

  --shadow: 0 6px 24px rgba(45, 92, 166, .10);
  --shadow-lg: 0 14px 44px rgba(45, 92, 166, .18);
  --radius: 16px;
  --radius-sm: 10px;

  --font-zh: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
              "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Times New Roman", "Georgia", "Times", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-zh);
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-d); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #EEF3FE; padding: 2px 7px; border-radius: 6px; font-size: 12px; }
small { font-size: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.mt { margin-top: 12px; }
.spacer { flex: 1; }
.whitespace { white-space: nowrap; }
.inline { display: inline-block; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.95); }
.btn-lg { padding: 12px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; box-shadow: 0 6px 16px rgba(77,150,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(77,150,255,.45); }
.btn-success { background: linear-gradient(135deg, #3ED981, var(--green-d)); color: #fff; box-shadow: 0 6px 16px rgba(46,204,113,.32); }
.btn-success:hover { transform: translateY(-2px); }
.btn-warning { background: linear-gradient(135deg, #FFB45C, #F08A24); color: #fff; box-shadow: 0 6px 16px rgba(255,159,69,.32); }
.btn-warning:hover { transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg, #FF6B6B, #E5484D); color: #fff; box-shadow: 0 6px 16px rgba(229,72,77,.32); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(229,72,77,.42); }
.btn-ghost { background: #fff; color: var(--blue-d); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); background: #F2F7FF; }
.btn-soft { background: #EEF4FF; color: var(--blue-d); }
.btn-soft:hover { background: #E0ECFF; }
.btn-danger-soft { background: #FFF0F0; color: #E5484D; }
.btn-danger-soft:hover { background: #FFE0E0; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ---------------- 输入 ---------------- */
.input {
  width: 100%; min-width: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 14px; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: var(--font-zh);
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77,150,255,.16); }
.input-sm { padding: 6px 9px; font-size: 13px; }
.input-date { width: 150px; }
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------- 提示条 ---------------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: #E8FAF0; color: #157347; border-color: #B7E8CE; }
.alert-danger  { background: #FFF0F0; color: #C0392B; border-color: #F8C9C9; }
.alert-info    { background: #EAF3FF; color: var(--blue-d); border-color: #C8E0FF; }

/* ---------------- 标签 ---------------- */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.t-active, .t-confirmed { background: #E2F8EC; color: #1B8A50; }
.t-disabled, .t-absent { background: #F1F3F8; color: #6B7A99; }
.t-rejected { background: #FFF4E0; color: #C87A12; }
.t-pick { background: #EAF3FF; color: var(--blue-d); }
.t-game { background: #F1EAFF; color: #6C3FC0; }
.t-spelling { background: #E0F7F2; color: #0E8A78; }
.t-reading { background: #FFF0F6; color: #D04577; }
.t-manual, .t-adjust { background: #FFF8E0; color: #B08900; }
.t-actor { background: #EEF3FE; color: var(--blue-d); }
.t-words { background: #F1EAFF; color: #6C3FC0; }

/* ---------------- 面板/表格 ---------------- */
.panel {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h3 { font-size: 17px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid #F0F5FC; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #F7FAFF; }
.w-check { width: 42px; }
.w-actions { width: 130px; }
.w-points { width: 140px; }
.actions { display: flex; gap: 6px; }
.empty { text-align: center; color: var(--ink-3); padding: 26px; }
.empty-big { text-align: center; font-size: 18px; color: var(--green-d); padding: 40px; }
.row-disabled { opacity: .55; }
.pts-up { color: var(--green-d); font-weight: 700; }
.pts-down { color: var(--red); font-weight: 700; }
.word-cell, .phonetic-cell { font-family: var(--font-en); font-size: 16px; }
.syl-cell { white-space: nowrap; }
.syl-preview { font-family: var(--font-en); font-size: 15px; font-weight: 600; color: var(--blue-d); letter-spacing: .3px; }
.syl-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #FFF3E0; color: #E8810C; font-size: 11px; font-weight: 700; }

/* AI 音节生成 */
.btn-ai { padding: 9px 16px; border-radius: 12px; border: none; background: linear-gradient(135deg,#6D5EF6,#8B5CF6); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 6px 16px rgba(109,94,246,.32); transition: transform .15s, box-shadow .15s; }
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(109,94,26,.4); }
.ai-suggest { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding: 6px 8px; border-radius: 10px; background: #F4F2FF; border: 1px solid #E3DEFD; }
.ai-tag { padding: 1px 7px; border-radius: 999px; background: #6D5EF6; color: #fff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.ai-syl { font-family: var(--font-en); font-size: 14px; font-weight: 700; color: #5B4BD6; }
.btn-mini-ok, .btn-mini-no { width: 26px; height: 26px; border-radius: 8px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; line-height: 1; }
.btn-mini-ok { background: #E5F8EC; color: #1FA463; }
.btn-mini-ok:hover { background: #1FA463; color: #fff; }
.btn-mini-no { background: #FDECEC; color: #E25555; }
.btn-mini-no:hover { background: #E25555; color: #fff; }
.detail-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 6px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-btn { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.page-btn:hover:not(.disabled) { border-color: var(--blue); color: var(--blue-d); }
.page-btn.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-info { margin-left: 8px; color: var(--ink-3); font-size: 13px; }

/* =========================================================
 * 后台布局
 * ========================================================= */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, #2E5BFF 0%, #5B8CFF 55%, #7AA5FF 100%);
  display: flex; flex-direction: column; padding: 22px 16px; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 8px 18px; }
.brand-icon { font-size: 30px; }
.brand b { display: block; font-size: 17px; letter-spacing: .3px; }
.brand small { color: rgba(255,255,255,.8); }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; color: rgba(255,255,255,.88);
  font-weight: 600; font-size: 14px; transition: background .15s, transform .15s;
}
.nav-item:hover { background: rgba(255,255,255,.16); transform: translateX(3px); }
.nav-item.active { background: #fff; color: var(--blue-d); box-shadow: 0 6px 16px rgba(20,50,120,.25); }
.nav-ico { font-size: 17px; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 7px; font-weight: 700; animation: badgePulse 1.6s infinite; }
@keyframes badgePulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.15);} }
.front-link { display: block; text-align: center; margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; font-weight: 600; font-size: 14px; }
.front-link:hover { background: rgba(255,255,255,.28); }

.main-area { flex: 1; margin-left: 248px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 66px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.page-title { font-size: 19px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.hello { font-weight: 600; margin-right: 6px; }
.menu-toggle { display: none; background: none; border: none; font-size: 22px; }
.content { padding: 24px 26px; flex: 1; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-ico { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.c-blue .stat-ico { background: #E6F0FF; } .c-violet .stat-ico { background: #F1E9FF; }
.c-green .stat-ico { background: #E2F8EC; } .c-orange .stat-ico { background: #FFF1E0; }
.c-pink .stat-ico { background: #FFE9F2; } .c-cyan .stat-ico { background: #E0F7F4; }
.stat-meta b { font-size: 26px; display: block; line-height: 1.2; }
.stat-meta span { color: var(--ink-2); font-size: 13px; }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rank-list, .pick-mini { list-style: none; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F0F5FC; }
.rank-medal { width: 30px; text-align: center; font-weight: 700; }
.rank-name { font-weight: 600; }
.rank-class { font-size: 12px; }
.rank-pts { margin-left: auto; font-weight: 700; color: var(--blue-d); }
.pick-mini li { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #F0F5FC; }
.dot-pending { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* 卡片网格（班级/词库） */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; gap: 14px; align-items: flex-start; transition: transform .2s, box-shadow .2s; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.info-card-ico { font-size: 34px; }
.info-card-body { flex: 1; min-width: 0; }
.info-card-body h3 { font-size: 16px; margin-bottom: 4px; }
.info-card-actions { display: flex; gap: 6px; align-items: center; }
.info-card-actions.vertical { flex-direction: column; }
.book-card { align-items: stretch; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar .input { width: auto; min-width: 130px; }
.batch-bar { display: none; align-items: center; gap: 10px; background: #FFF8E8; border: 1px solid #F5E0B0; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.batch-bar.visible { display: flex; animation: dropIn .3s ease; }
.batch-line { display: flex; gap: 10px; align-items: center; padding: 14px 4px 2px; flex-wrap: wrap; }
.form-foot { padding-top: 14px; display: flex; justify-content: flex-end; }
.pts-pill { display: inline-flex; min-width: 38px; justify-content: center; background: #EAF3FF; color: var(--blue-d); font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* 积分规则表 */
.point-input { display: flex; align-items: center; gap: 8px; }
.point-input .input { width: 90px; }
.rules-table { max-width: 860px; }

/* 模态框 */
.modal { position: fixed; inset: 0; background: rgba(30, 42, 68, .45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; backdrop-filter: blur(3px); }
.modal.show { display: flex; animation: fadeIn .2s; }
.modal-card { background: #fff; border-radius: 18px; width: 560px; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalUp .28s cubic-bezier(.2,.9,.3,1.2); }
.modal-sm { width: 420px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; border-radius: 18px 18px 0 0; }
.modal-x { border: none; background: #F1F5FC; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
body.modal-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalUp { from { transform: translateY(26px) scale(.96); opacity: 0; } }
@keyframes dropIn { from { transform: translateY(-8px); opacity: 0; } }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-9px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.shake { animation: shake .45s; }

/* 导入面板 */
.import-panel .import-form { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.import-panel .import-form .input { width: auto; flex: 1; min-width: 220px; }
.narrow-panel { max-width: 560px; }

/* 设置行 */
.settings-body { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #F0F5FC; }
.setting-row:last-child { border-bottom: none; }
.setting-row .input { width: 200px; }
.w-160 { width: 160px !important; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #CBD8EE; border-radius: 999px; transition: .25s; }
.slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch-line { display: flex; align-items: center; gap: 8px; }

/* =========================================================
 * 登录 / 安装页
 * ========================================================= */
.login-body, .install-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; }
.login-card, .install-card { background: rgba(255,255,255,.96); border-radius: 22px; padding: 38px 34px; width: 420px; max-width: 100%; box-shadow: var(--shadow-lg); text-align: center; position: relative; z-index: 2; animation: modalUp .4s cubic-bezier(.2,.9,.3,1.2); }
.install-card { width: 620px; text-align: left; }
.login-logo, .install-logo { font-size: 48px; margin-bottom: 8px; }
.login-card h2 { margin-bottom: 6px; }
.login-form { text-align: left; margin-top: 20px; }
.install-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.install-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 18px 0; }
.install-meta div { background: #F2F7FF; border-radius: 12px; padding: 12px; }
.install-meta span { display: block; font-size: 12px; color: var(--ink-2); }

/* 气泡背景 */
.bg-bubbles { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.bg-bubbles span { position: absolute; bottom: -120px; border-radius: 50%; background: linear-gradient(135deg, rgba(77,150,255,.25), rgba(155,93,229,.2)); animation: floatUp linear infinite; }
.bg-bubbles span:nth-child(1){ width: 90px; height: 90px; left: 8%;  animation-duration: 16s; }
.bg-bubbles span:nth-child(2){ width: 60px; height: 60px; left: 22%; animation-duration: 12s; animation-delay: 2s; }
.bg-bubbles span:nth-child(3){ width: 120px; height: 120px; left: 38%; animation-duration: 20s; animation-delay: 1s; }
.bg-bubbles span:nth-child(4){ width: 70px; height: 70px; left: 55%; animation-duration: 14s; animation-delay: 3s; }
.bg-bubbles span:nth-child(5){ width: 100px; height: 100px; left: 70%; animation-duration: 18s; }
.bg-bubbles span:nth-child(6){ width: 50px; height: 50px; left: 85%; animation-duration: 11s; animation-delay: 2s; }
.bg-bubbles span:nth-child(7){ width: 80px; height: 80px; left: 92%; animation-duration: 15s; animation-delay: 1s; }
.bg-bubbles span:nth-child(8){ width: 64px; height: 64px; left: 48%; animation-duration: 13s; animation-delay: 4s; }
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: .2; }
}

/* =========================================================
 * 前台公共
 * ========================================================= */
.front-body { padding-bottom: 40px; }
.front-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 18px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  padding: 12px 26px; border-bottom: 1px solid var(--line);
}
.front-brand { display: flex; align-items: center; gap: 8px; }
.front-brand b { font-size: 17px; }
.front-brand small { color: var(--ink-3); font-size: 12px; }
.front-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.front-nav a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.front-nav a:hover { background: #EEF4FF; color: var(--blue-d); }
.front-nav a.active { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; box-shadow: 0 5px 14px rgba(77,150,255,.35); }
.view-container { max-width: 1280px; margin: 0 auto; padding: 28px 26px; position: relative; z-index: 2; }

.loading-screen, .error-screen { text-align: center; padding: 80px 20px; color: var(--ink-2); }
.spinner { width: 46px; height: 46px; border: 4px solid #DCE8FF; border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-ico { font-size: 56px; }

.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

/* Toast */
.toast-box { position: fixed; right: 24px; bottom: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-lg); font-size: 14px; transform: translateX(120%); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); max-width: 340px; }
.toast.show { transform: translateX(0); }
.toast-success { border-left: 4px solid var(--green); }
.toast-danger { border-left: 4px solid var(--red); }
.toast-info { border-left: 4px solid var(--blue); }
.toast-win { border-left: 4px solid var(--yellow); }

/* 首页 */
.home-hero { text-align: center; padding: 36px 0 30px; }
.hero-badge { display: inline-block; background: #EAF3FF; color: var(--blue-d); font-weight: 600; font-size: 13px; padding: 7px 18px; border-radius: 999px; margin-bottom: 18px; }
.hero-title { font-size: 38px; line-height: 1.3; margin-bottom: 12px; }
.grad-text { background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--ink-2); font-size: 17px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.module-card {
  position: relative; background: #fff; border-radius: 20px; padding: 26px 24px;
  box-shadow: var(--shadow); overflow: hidden; color: var(--ink);
  transition: transform .25s, box-shadow .25s;
}
.module-card::after { content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; opacity: .18; transition: transform .35s; }
.module-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.module-card:hover::after { transform: scale(1.6); }
.g-blue::after  { background: var(--blue); } .g-violet::after { background: var(--violet); }
.g-pink::after  { background: var(--pink); } .g-green::after  { background: var(--green); }
.g-orange::after{ background: var(--orange); } .g-cyan::after  { background: var(--cyan); }
.module-ico { font-size: 44px; margin-bottom: 12px; }
.module-card h3 { font-size: 20px; margin-bottom: 8px; }
.module-card p { color: var(--ink-2); font-size: 14px; min-height: 44px; }
.module-go { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--blue-d); }

.module-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.mh-ico { font-size: 40px; background: #fff; width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.module-header h2 { font-size: 24px; }

/* 通用配置行 */
.config-line { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.config-line label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.config-line label .input { width: 180px; }
.config-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.picker-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
.student-picker { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.stu-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px 7px 12px; font-weight: 600; font-size: 14px; color: var(--ink); transition: all .15s; display: inline-flex; align-items: center; gap: 7px; }
.stu-chip:hover { border-color: var(--blue); transform: translateY(-2px); }
.stu-chip.on { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(77,150,255,.4); }
.stu-pts { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 999px; padding: 1px 7px; }
.stu-chip.on .stu-pts { background: rgba(255,255,255,.25); }

/* =========================================================
 * 随机点名
 * ========================================================= */
.pick-config .config-line label .input { width: 170px; }
.pick-stage { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.stage-hint { color: var(--ink-3); font-size: 16px; }
.slots { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.slot {
  min-width: 180px; padding: 26px 30px; border-radius: 20px;
  font-family: var(--font-en); font-size: 40px; font-weight: 700;
  background: linear-gradient(135deg, #EEF4FF, #E4EEFF); color: var(--blue-d);
  border: 2px solid #D4E4FF; text-align: center;
  transition: all .3s;
}
.slot.spinning { color: var(--violet); }
.slot.locked {
  background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff;
  border-color: transparent; box-shadow: 0 12px 30px rgba(77,150,255,.5);
  animation: lockPop .5s cubic-bezier(.2,.9,.3,1.5);
}
@keyframes lockPop { 0%{transform:scale(.7);} 60%{transform:scale(1.12);} 100%{transform:scale(1);} }
.prob-line { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.prob-pill { background: #F2F7FF; border: 1px solid #D8E7FF; border-radius: 999px; padding: 6px 15px; font-size: 13px; color: var(--ink-2); }
.prob-pill b { color: var(--blue-d); }
.picked-results { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.result-card { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: dropIn .4s ease; }
.rc-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--blue)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.rc-status { font-size: 12px; color: var(--orange); font-weight: 600; }
.session-picked { display: flex; gap: 8px; flex-wrap: wrap; }
.session-chip { background: #EAF3FF; color: var(--blue-d); border-radius: 10px; padding: 7px 12px; font-weight: 600; display: flex; flex-direction: column; align-items: center; font-size: 14px; }
.session-chip small { color: var(--orange); font-weight: 500; }

/* =========================================================
 * 消消乐
 * ========================================================= */
.game-status { font-size: 15px; color: var(--ink-2); margin-bottom: 16px; }
.match-grid { display: grid; gap: 10px; perspective: 1000px; width: 100%; max-width: 720px; margin: 0 auto; }
.match-card { aspect-ratio: 1.05; cursor: pointer; }
.mc-inner { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.match-card.flipped .mc-inner, .match-card.done .mc-inner { transform: rotateY(180deg); }
.mc-front, .mc-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; display: flex; align-items: center; justify-content: center; padding: 8px; font-weight: 700; text-align: center; word-break: break-word; }
.mc-front { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; font-size: 22px; box-shadow: 0 6px 16px rgba(77,150,255,.35); }
.mc-back { transform: rotateY(180deg); background: #fff; border: 2px solid var(--line); font-size: 13px; color: var(--ink); gap: 4px; }
.mc-spk { font-size: 12px; opacity: .85; }
.mc-word { font-family: var(--font-en); font-size: 18px; color: var(--blue-d); }
.mc-meaning { color: #8A4FC0; }
.match-card.done { animation: vanish .5s forwards; }
.match-card.done .mc-inner.pop { animation: matchPop .4s; }
@keyframes matchPop { 0%{transform:rotateY(180deg) scale(1);} 50%{transform:rotateY(180deg) scale(1.15);} 100%{transform:rotateY(180deg) scale(1);} }
@keyframes vanish { 60%{opacity:1; transform:scale(1);} 100%{opacity:0; transform:scale(.4);} }

/* =========================================================
 * 双人 PK
 * ========================================================= */
.pk-pickers { display: flex; gap: 16px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.pk-picker-box { flex: 1; min-width: 240px; }
.vs-badge { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(155,93,229,.4); }
.pk-p1 { color: var(--blue-d); } .pk-p2 { color: #D04577; }
.pk-round-info { display: flex; align-items: center; gap: 14px; font-size: 15px; margin-bottom: 14px; flex-wrap: wrap; }
.pk-score { font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #F2F7FF; }
.pk-question { text-align: center; margin-bottom: 22px; }
.pk-meaning { font-size: 30px; font-weight: 800; color: var(--violet); padding: 18px; background: linear-gradient(135deg, #F6F1FF, #FDF0FF); border-radius: 16px; margin-bottom: 14px; }
.pk-timer { height: 8px; background: #E8EEF9; border-radius: 999px; overflow: hidden; }
.pk-timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--yellow), var(--red)); border-radius: 999px; }
.pk-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pk-board { border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: #FBFCFF; }
.pk-board h4 { margin-bottom: 12px; font-size: 16px; }
.pk-option { width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; font-family: var(--font-en); font-size: 17px; font-weight: 600; transition: all .15s; }
.pk-option:hover:not(.dim) { border-color: var(--blue); transform: translateX(4px); }
.pk-option.correct { background: linear-gradient(135deg, #3ED981, var(--green-d)); color: #fff; border-color: transparent; animation: lockPop .4s; }
.pk-option.wrong { background: #FFE8E8; color: #C0392B; border-color: #F5B8B8; }
.pk-option.dim { opacity: .4; }
.pk-result { text-align: center; padding: 30px 10px; }
.pk-result-ico { font-size: 64px; animation: trophyBounce .8s cubic-bezier(.2,.9,.3,1.5); }
@keyframes trophyBounce { 0%{transform:scale(0) rotate(-30deg);} 100%{transform:scale(1) rotate(0);} }
.pk-final { display: flex; justify-content: center; gap: 30px; font-size: 20px; margin: 18px 0; }
.pk-final b { font-size: 28px; }

/* =========================================================
 * 领读
 * ========================================================= */
.reader-app { padding: 0; overflow: hidden; }
.reader-settings { display: flex; gap: 14px; flex-wrap: wrap; padding: 16px 20px; background: #F6F9FF; border-bottom: 1px solid var(--line); align-items: flex-end; }
.reader-settings label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.reader-settings .input { width: auto; min-width: 80px; padding: 7px 10px; }
.reader-stage { text-align: center; padding: 44px 24px 30px; min-height: 280px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.reader-stage.word-in .big-word { animation: wordIn .4s ease; }
@keyframes wordIn { from { transform: translateY(18px); opacity: 0; } }
.big-word { font-family: var(--font-en); font-size: 64px; font-weight: 700; line-height: 1.1; }
.syl { position: relative; display: inline-block; margin: 0 3px; padding: 2px 5px; border-radius: 12px; transition: transform .2s cubic-bezier(.34,1.56,.64,1), background .2s, box-shadow .2s, filter .2s; }
.syl.active { z-index: 2; transform: scale(1.3) translateY(-8px); background: linear-gradient(180deg,#FFF6D5,#FFE49A); box-shadow: 0 0 0 3px rgba(255,196,64,.55), 0 10px 20px rgba(200,140,20,.28); filter: drop-shadow(0 4px 8px rgba(40,90,200,.22)); }
.syl.c0 { color: var(--blue-d); } .syl.c1 { color: #D04577; } .syl.c2 { color: var(--green-d); }
.syl.c3 { color: #E08A1E; } .syl.c4 { color: #7A4FC0; }
.syl-no { position: absolute; top: -14px; right: -12px; font-size: 12px; font-family: var(--font-zh); background: var(--yellow); color: #7A5A00; border-radius: 999px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.big-ipa { font-family: var(--font-en); font-size: 22px; color: var(--ink-2); }
.big-pos { font-family: var(--font-zh); font-size: 15px; color: var(--violet); font-weight: 600; }
.big-zh { font-size: 24px; font-weight: 700; color: var(--ink); }
.big-example { font-family: var(--font-en); font-size: 18px; color: var(--blue-d); }
.big-example small { display: block; font-family: var(--font-zh); color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.reader-controls { display: flex; gap: 10px; justify-content: center; padding: 6px 20px 18px; flex-wrap: wrap; }
.reader-words { display: flex; gap: 8px; padding: 14px 20px; background: #F6F9FF; border-top: 1px solid var(--line); overflow-x: auto; }
.rw-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 13px; font-family: var(--font-en); font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--ink); transition: all .15s; }
.rw-chip:hover { border-color: var(--blue); }
.rw-chip.current { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; border-color: transparent; }

/* =========================================================
 * 排行榜
 * ========================================================= */
.rank-podium { display: flex; justify-content: center; align-items: flex-end; gap: 22px; margin-bottom: 24px; flex-wrap: wrap; }
.podium { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border-radius: 18px; padding: 22px 26px; box-shadow: var(--shadow); }
.podium.p1 { order: 2; transform: translateY(-14px); box-shadow: var(--shadow-lg); }
.podium.p2 { order: 1; } .podium.p3 { order: 3; }
.podium-medal { font-size: 34px; animation: trophyBounce .7s; }
.podium-avatar { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700; }
.p1 .podium-avatar { background: linear-gradient(135deg, #FFC93C, #FF9F45); }
.p2 .podium-avatar { background: linear-gradient(135deg, #9FB6D9, #6E89B5); }
.p3 .podium-avatar { background: linear-gradient(135deg, #D99B6B, #B0744A); }
.podium-pts { font-weight: 800; color: var(--blue-d); font-size: 18px; }
.rank-no { width: 46px; font-weight: 700; font-size: 17px; }
.rank-bar-cell { width: 34%; }
.rank-bar { height: 12px; background: #EDF2FB; border-radius: 999px; overflow: hidden; }
.rank-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--violet)); transition: width .8s cubic-bezier(.2,.9,.3,1); }
.rank-pts-b { font-weight: 800; color: var(--blue-d); white-space: nowrap; }
.rank-tr.top3 { background: #FAFCFF; }

/* =========================================================
 * 响应式
 * ========================================================= */
@media (max-width: 1024px) {
  .panel-grid { grid-template-columns: 1fr; }
  .big-word { font-size: 48px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s; width: 260px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: block; }
  .pk-boards { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .slot { font-size: 30px; min-width: 140px; padding: 18px 20px; }
  .front-topbar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .view-container { padding: 18px 14px; }
  .field-row { grid-template-columns: 1fr; }
  .rank-bar-cell { width: 22%; }
}

/* 分数即时更新动画 */
.score-pop { display: inline-block; animation: scorePop .4s cubic-bezier(.2,.9,.3,1.5); }
@keyframes scorePop { 0%{transform:scale(1);} 50%{transform:scale(1.6); color:var(--green);} 100%{transform:scale(1);} }

/* =========================================================
 * 明牌模式（平面卡片，无 3D 翻转）
 * ========================================================= */
.mcard {
  position: relative; border-radius: 12px; padding: 10px 8px; min-height: 64px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; cursor: pointer; border: 2px solid var(--line); background: #fff;
  transition: transform .15s, box-shadow .15s, border-color .15s; word-break: break-word;
}
.mcard:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(45,92,166,.16); }
.mcard.face-card.mc-word { border-color: #BFD8FF; background: #F2F7FF; color: var(--blue-d); font-family: var(--font-en); font-size: 16px; }
.mcard.face-card.mc-meaning { border-color: #E3D2FA; background: #FAF5FF; color: #8A4FC0; font-size: 13px; }
.mcard.picked { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,159,69,.25); transform: translateY(-3px); }
.mcard.done { animation: cardVanish .45s forwards; pointer-events: none; }
.fc-speak { position: absolute; top: 3px; right: 5px; font-size: 11px; opacity: .7; }
@keyframes cardVanish { 60%{opacity:1; transform:scale(1);} 100%{opacity:0; transform:scale(.35);} }

/* 紧凑（双人）网格 */
.match-grid.compact { gap: 7px; }
.match-grid.compact .match-card { aspect-ratio: .95; }
.match-grid.compact .mc-front { font-size: 16px; border-radius: 10px; }
.match-grid.compact .mc-back { font-size: 11px; padding: 4px; border-radius: 10px; }
.match-grid.compact .mc-front, .match-grid.compact .mc-back { border-radius: 10px; }
.match-grid.compact .mcard { min-height: 46px; padding: 6px 4px; border-radius: 9px; }
.match-grid.compact .mcard.face-card.mc-word { font-size: 13px; }
.match-grid.compact .mcard.face-card.mc-meaning { font-size: 11px; }

/* =========================================================
 * 双人 PK：模式分段控件
 * ========================================================= */
.pk-mode-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #EDF3FE; border: 1px solid #DCE7FA; border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg-btn { border: none; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 700; color: var(--ink-2); font-size: 14px; transition: all .15s; }
.seg-btn:hover { color: var(--blue-d); }
.seg-btn.on { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; box-shadow: 0 6px 14px rgba(47,111,224,.32); }

/* =========================================================
 * 双人 PK：竞速进度
 * ========================================================= */
.pk2-progress { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.prog-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.prog-row span:first-child { min-width: 70px; }
.prog-row b { min-width: 24px; text-align: right; }
.prog-row.p1 { color: var(--blue-d); } .prog-row.p2 { color: #D04577; }
.prog-track { flex: 1; height: 10px; background: #E8EEF9; border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2,.9,.3,1); }
.prog-row.p1 .prog-fill { background: linear-gradient(90deg, var(--blue), var(--blue-d)); }
.prog-row.p2 .prog-fill { background: linear-gradient(90deg, var(--pink), #D04577); }

/* =========================================================
 * 双人 PK：左右独立面板
 * ========================================================= */
.pk2-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pk2-board { border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: #FBFCFF; }
.pk2-board.pk-p1 { border-color: #C9DEFF; }
.pk2-board.pk-p2 { border-color: #FBD0E0; }
.pk2-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pk2-name { font-weight: 800; font-size: 16px; }
.pk2-sub { font-size: 13px; color: var(--ink-2); }
.pk2-sub b { color: var(--ink); }
.pk2-stem { text-align: center; padding: 16px 12px; border-radius: 12px; margin-bottom: 14px; background: linear-gradient(135deg, #F2F7FF, #F8F4FF); display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; }
.pk2-en { font-family: var(--font-en); font-size: 26px; color: var(--blue-d); }
.pk2-spk { border: none; background: #fff; border-radius: 999px; width: 34px; height: 34px; font-size: 16px; box-shadow: 0 3px 8px rgba(45,92,166,.18); }
.pk2-spk:hover { transform: scale(1.1); }
.pk2-options { display: flex; flex-direction: column; gap: 8px; }
.pk2-opt { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 13px; font-size: 15px; font-weight: 600; transition: all .15s; }
.pk2-board.pk-p1 .pk2-opt { font-family: var(--font-en); font-size: 16px; }
.pk2-opt:hover:not(:disabled) { border-color: var(--blue); transform: translateX(3px); }
.pk2-opt.correct { background: linear-gradient(135deg, #3ED981, var(--green-d)); color: #fff; border-color: transparent; animation: lockPop .4s; }
.pk2-opt.wrong { background: #FFE8E8; color: #C0392B; border-color: #F5B8B8; }
.pk2-opt:disabled { cursor: default; }
.pk2-feedback { margin-top: 10px; font-size: 13px; min-height: 18px; }
.fb-ok { color: var(--green-d); font-weight: 700; }
.fb-bad { color: #C0392B; font-weight: 700; }
.pk2-done { text-align: center; padding: 26px 10px; }
.pk2-done-ico { font-size: 40px; animation: trophyBounce .6s; }
.pk2-done h4 { margin: 8px 0 4px; }
.match2-boards .pk2-board { padding: 12px; }

/* 响应式：窄屏 PK 单列 */
@media (max-width: 860px) {
  .pk2-boards { grid-template-columns: 1fr; }
  .pk2-en { font-size: 22px; }
}

/* =========================================================
 * 抽取人数按钮组（1–10）
 * ========================================================= */
.count-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.count-picker { display: flex; flex-wrap: wrap; gap: 7px; max-width: 340px; }
.count-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 800; font-size: 16px; color: var(--ink-2); transition: all .15s;
}
.count-btn:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--blue-d); }
.count-btn.on { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(47,111,224,.35); }

/* =========================================================
 * 大屏抽取槽位
 * ========================================================= */
.big-slots { gap: 18px; width: 100%; }
.big-slots .slot {
  position: relative; min-width: 200px; padding: 32px 34px; font-size: 46px; border-radius: 22px;
}
.slot-no {
  position: absolute; top: 8px; left: 10px; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,.7); color: var(--ink-2); border-radius: 999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
/* 滚动中流光边框 */
.big-slots .slot.spinning {
  color: var(--violet); border: 2px solid transparent;
  background: linear-gradient(#F3F7FF,#F3F7FF) padding-box,
    linear-gradient(120deg, var(--blue), var(--violet), var(--pink), var(--blue)) border-box;
  background-size: 200% 200%; animation: borderFlow 1.6s linear infinite;
}
@keyframes borderFlow { 0%{background-position:0% 50%;} 100%{background-position:200% 50%;} }
/* 定格各槽位配色 */
.big-slots .slot.locked .slot-no { background: rgba(255,255,255,.25); color: #fff; }
.big-slots .slot.locked.hue-0 { background: linear-gradient(135deg,#4D96FF,#2F6FE0); box-shadow:0 14px 34px rgba(47,111,224,.5); }
.big-slots .slot.locked.hue-1 { background: linear-gradient(135deg,#9B5DE5,#7A3FC0); box-shadow:0 14px 34px rgba(123,63,192,.5); }
.big-slots .slot.locked.hue-2 { background: linear-gradient(135deg,#2ECC71,#1BA85A); box-shadow:0 14px 34px rgba(27,168,90,.5); }
.big-slots .slot.locked.hue-3 { background: linear-gradient(135deg,#FF9F45,#F07E1E); box-shadow:0 14px 34px rgba(240,126,30,.5); }
.big-slots .slot.locked.hue-4 { background: linear-gradient(135deg,#FF6B9D,#E0457B); box-shadow:0 14px 34px rgba(224,69,123,.5); }
.big-slots .slot.locked.hue-5 { background: linear-gradient(135deg,#00C2A8,#089C88); box-shadow:0 14px 34px rgba(8,156,136,.5); }

/* 窄屏槽位收敛 */
@media (max-width: 860px) {
  .big-slots .slot { min-width: 150px; font-size: 34px; padding: 26px 24px; }
}

/* =========================================================
 * 游戏中心：单人 / 双人模式切换
 * ========================================================= */
.gm-mode { display: flex; gap: 16px; flex-wrap: wrap; }
.gm-mode-btn {
  flex: 1 1 240px; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 18px 22px; border-radius: 16px; border: 2px solid var(--line);
  background: #fff; transition: all .2s;
}
.gm-mode-btn .gmb-ico { font-size: 34px; }
.gm-mode-btn b { display: block; font-size: 17px; color: var(--ink); }
.gm-mode-btn small { color: var(--ink-3); font-size: 13px; }
.gm-mode-btn:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }
.gm-mode-btn.on { border-color: var(--blue-d); background: linear-gradient(135deg, #EEF5FF, #E2EEFF); }
.gm-mode-btn.on b { color: var(--blue-d); }

/* 游戏卡片 */
.gm-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.gm-game {
  border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all .18s;
}
.gm-game .gg-ico { font-size: 30px; }
.gm-game b { font-size: 15px; color: var(--ink); }
.gm-game small { color: var(--ink-3); font-size: 12px; }
.gm-game:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: var(--shadow); }
.gm-game.on { background: linear-gradient(135deg, var(--violet), #7A3FC0); border-color: transparent; }
.gm-game.on b, .gm-game.on small { color: #fff; }

/* =========================================================
 * 选人组件 gsp
 * ========================================================= */
.gsp { width: 100%; }
.gsp-tabs { display: inline-flex; background: #EDF3FE; border: 1px solid #DCE7FA; border-radius: 11px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.gsp-tab { border: none; background: transparent; padding: 7px 16px; border-radius: 8px; font-weight: 700; color: var(--ink-2); font-size: 13.5px; transition: all .15s; }
.gsp-tab.on { background: linear-gradient(135deg, var(--blue), var(--blue-d)); color: #fff; box-shadow: 0 5px 12px rgba(47,111,224,.3); }

.gsp-slots { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gsp-slot {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--line);
  border-radius: 14px; padding: 12px 16px; background: #FBFCFF; min-width: 200px;
}
.gsp-slot-tag { font-size: 12px; font-weight: 800; color: var(--violet); background: #F1E9FD; padding: 3px 9px; border-radius: 999px; }
.gsp-slot-name { font-weight: 800; font-size: 16px; color: var(--ink); flex: 1; }
.gsp-slot-name.rolling { color: var(--violet); animation: rollPulse .35s linear infinite; }
.gsp-swap { border: none; background: #EEF4FF; color: var(--blue-d); border-radius: 9px; padding: 6px 9px; font-size: 13px; transition: all .15s; }
.gsp-swap:hover { background: var(--blue); color: #fff; }

/* 手动下拉 */
.gsp-dropdown { position: relative; max-width: 420px; }
.gsp-dd-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 15px;
  font-weight: 700; color: var(--ink-2); transition: all .15s;
}
.gsp-dd-btn:hover { border-color: var(--blue); }
.gsp-dd-caret { color: var(--ink-3); }
.gsp-dd-panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; animation: ddIn .18s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.gsp-search { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; outline: none; }
.gsp-search:focus { border-color: var(--blue); }
.gsp-dd-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.gsp-opt {
  display: flex; align-items: center; gap: 10px; border: none; background: #fff; text-align: left;
  padding: 9px 12px; border-radius: 10px; font-weight: 700; color: var(--ink); font-size: 14px; transition: all .12s;
}
.gsp-opt-check { width: 18px; color: var(--blue-d); }
.gsp-opt:hover { background: #F0F6FF; }
.gsp-opt.on { background: #E6F0FF; color: var(--blue-d); }
.gsp-opt.disabled, .gsp-opt:disabled { color: var(--ink-3); background: #F6F8FC; cursor: not-allowed; }
.gsp-empty { padding: 10px; font-size: 13px; }

/* =========================================================
 * 还原单词
 * ========================================================= */
.rs-progress { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.rs-progress b { color: var(--blue-d); }
.rs-card {
  text-align: center; border: 1.5px solid var(--line); border-radius: 18px;
  padding: 24px; background: linear-gradient(135deg, #F7FAFF, #EDF4FF); margin-bottom: 20px;
}
.rs-pos { color: var(--ink-3); font-family: var(--font-en); font-size: 15px; margin-bottom: 8px; }
.rs-meaning { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.rs-speak { border: none; background: linear-gradient(135deg, var(--cyan), #089C88); color: #fff; font-weight: 700; padding: 9px 20px; border-radius: 999px; box-shadow: 0 8px 18px rgba(8,156,136,.32); transition: all .15s; }
.rs-speak:hover { transform: translateY(-2px); }

.rs-answer { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.rs-slot {
  width: 46px; height: 56px; border-bottom: 3px solid #C9D8F2; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 30px; font-weight: 700; color: var(--blue-d); background: #F4F8FF;
}
.rs-slot.filled { animation: slotPop .25s cubic-bezier(.2,.9,.3,1.6); background: #E8F1FF; }
.rs-answer.correct .rs-slot { background: #E4FAEE; border-bottom-color: var(--green); color: var(--green-d); }
.rs-answer.wrong .rs-slot { background: #FDECEC; border-bottom-color: var(--red); color: var(--red); }
@keyframes slotPop { from { transform: scale(.6); } to { transform: scale(1); } }

.rs-letters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.rs-key {
  width: 52px; height: 52px; border-radius: 14px; border: none;
  font-family: var(--font-en); font-size: 26px; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, var(--blue), var(--blue-d));
  box-shadow: 0 7px 0 #1F56C4, 0 10px 18px rgba(47,111,224,.35); transition: all .1s;
}
.rs-key:hover { transform: translateY(-2px); }
.rs-key:active { transform: translateY(5px); box-shadow: 0 2px 0 #1F56C4; }
.rs-key.used, .rs-key:disabled {
  background: #DCE5F2; color: var(--ink-3); box-shadow: none; transform: scale(.9); cursor: default;
}
.rs-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rs-feedback { text-align: center; margin-top: 12px; font-weight: 700; }
.shake { animation: shakeX .45s; }
@keyframes shakeX { 0%,100%{transform:translateX(0);} 20%{transform:translateX(-9px);} 40%{transform:translateX(9px);} 60%{transform:translateX(-6px);} 80%{transform:translateX(6px);} }
@keyframes rollPulse { 0%,100%{opacity:1;} 50%{opacity:.45;} }

/* =========================================================
 * 选择答题
 * ========================================================= */
.qz-progress { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.qz-progress b { color: var(--blue-d); }
.qz-stem { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.qz-en { font-family: var(--font-en); font-size: 30px; color: var(--ink); }
.qz-spk { border: none; background: #EEF4FF; color: var(--blue-d); border-radius: 10px; padding: 8px 11px; font-size: 17px; }
.qz-spk:hover { background: var(--blue); color: #fff; }
.qz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 680px; margin: 0 auto; }
.qz-opt {
  border: 1.5px solid var(--line); background: #fff; border-radius: 13px; padding: 14px 16px;
  font-family: var(--font-en); font-size: 18px; font-weight: 700; color: var(--ink); text-align: left; transition: all .15s;
}
.qz-opt:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }
.qz-opt.correct { background: linear-gradient(135deg, #DFFBEB, #C9F6DE); border-color: var(--green); color: var(--green-d); }
.qz-opt.wrong { background: #FDECEC; border-color: var(--red); color: var(--red); }
.qz-opt:disabled { cursor: default; }
.qz-feedback { text-align: center; margin-top: 14px; font-weight: 700; }

/* 紧凑（双人分屏） */
.quiz-board.compact .qz-progress, .restore-board.compact .rs-progress { font-size: 12px; margin-bottom: 10px; }
.quiz-board.compact .qz-en { font-size: 21px; }
.quiz-board.compact .qz-options { grid-template-columns: 1fr; gap: 7px; }
.quiz-board.compact .qz-opt { font-size: 14px; padding: 9px 11px; border-radius: 10px; }
.restore-board.compact .rs-card { padding: 14px; margin-bottom: 12px; }
.restore-board.compact .rs-meaning { font-size: 19px; margin-bottom: 8px; }
.restore-board.compact .rs-slot { width: 32px; height: 40px; font-size: 21px; }
.restore-board.compact .rs-key { width: 36px; height: 40px; font-size: 19px; border-radius: 10px; box-shadow: 0 5px 0 #1F56C4; }
.restore-board.compact .rs-letters { gap: 6px; margin-bottom: 12px; }
.restore-board.compact .rs-controls .btn { padding: 7px 12px; font-size: 13px; }

/* =========================================================
 * 响应式
 * ========================================================= */
@media (max-width: 900px) {
  .gm-games { grid-template-columns: repeat(2, 1fr); }
  .qz-options { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gm-games { grid-template-columns: 1fr 1fr; }
  .gsp-slot { min-width: 100%; }
  .rs-key { width: 44px; height: 46px; font-size: 22px; }
  .rs-slot { width: 38px; height: 48px; font-size: 24px; }
}

/* =========================================================
 * 全屏抽取动画（游戏中心选人 / 换人）
 * ========================================================= */
.pick-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 720px at 18% 8%, #3B6FE0 0%, transparent 55%),
              radial-gradient(1000px 660px at 86% 92%, #7A3FC0 0%, transparent 55%),
              linear-gradient(135deg, #16327A 0%, #241B5C 100%);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s;
  overflow: hidden;
}
.pick-overlay.show { opacity: 1; visibility: visible; }
.pick-overlay.closing { opacity: 0; visibility: hidden; }

.po-bg { position: absolute; inset: 0; overflow: hidden; }
.po-bg span {
  position: absolute; bottom: -130px; display: block; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.38), rgba(255,255,255,.06));
  animation: poRise linear infinite;
}
.po-bg span:nth-child(1){ left:8%;  width:90px;  height:90px;  animation-duration:13s; }
.po-bg span:nth-child(2){ left:22%; width:50px;  height:50px;  animation-duration:9s;  animation-delay:1.2s; }
.po-bg span:nth-child(3){ left:42%; width:120px; height:120px; animation-duration:16s; animation-delay:.6s; }
.po-bg span:nth-child(4){ left:63%; width:64px;  height:64px;  animation-duration:11s; animation-delay:2s; }
.po-bg span:nth-child(5){ left:78%; width:100px; height:100px; animation-duration:14s; animation-delay:1.6s; }
.po-bg span:nth-child(6){ left:90%; width:46px;  height:46px;  animation-duration:8s;  animation-delay:.3s; }
@keyframes poRise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(-112vh) rotate(360deg); opacity: .18; }
}

.po-inner { position: relative; z-index: 2; text-align: center; padding: 24px; width: min(1120px, 92vw); }
.po-kicker {
  display: inline-block; color: #CFE0FF; letter-spacing: 3px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.25); padding: 5px 16px; border-radius: 999px;
  background: rgba(255,255,255,.08); margin-bottom: 18px;
}
.po-title {
  color: #fff; font-size: clamp(30px, 4.6vw, 52px); font-weight: 800;
  text-shadow: 0 6px 24px rgba(0,0,0,.3); margin-bottom: 34px;
}

.po-slots { display: flex; gap: clamp(16px, 3vw, 34px); justify-content: center; align-items: stretch; flex-wrap: wrap; }
.po-slot {
  position: relative; min-width: 280px; flex: 1; max-width: 420px;
  border-radius: 22px; padding: 30px 26px 34px;
  background: rgba(255,255,255,.10); border: 2px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.po-slot.spinning { animation: poGlow 1.1s ease-in-out infinite; }
@keyframes poGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(120,180,255,0); border-color: rgba(255,255,255,.3); }
  50%     { box-shadow: 0 0 34px 4px rgba(120,180,255,.55); border-color: rgba(180,215,255,.9); }
}
.po-no {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); color: #fff; font-weight: 800; font-size: 18px;
}
.po-name {
  font-size: clamp(34px, 5vw, 58px); font-weight: 800; color: #fff;
  line-height: 1.15; min-height: 1.2em;
}
.po-slot.spinning .po-name { animation: rollPulse .3s linear infinite; }
.po-slot.locked { animation: poLock .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes poLock {
  0%   { transform: scale(.86); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.po-slot.hue-0 { background: linear-gradient(135deg, rgba(77,150,255,.96), rgba(47,111,224,.96)); border-color: #BFD8FF; }
.po-slot.hue-1 { background: linear-gradient(135deg, rgba(155,93,229,.96), rgba(122,63,192,.96)); border-color: #E4D2FB; }
.po-slot.hue-2 { background: linear-gradient(135deg, rgba(46,204,113,.96), rgba(34,168,90,.96)); border-color: #C4F2D6; }
.po-slot.hue-3 { background: linear-gradient(135deg, rgba(255,159,69,.96), rgba(245,120,30,.96)); border-color: #FFE0C2; }
.po-slot.hue-4 { background: linear-gradient(135deg, rgba(255,107,157,.96), rgba(232,62,122,.96)); border-color: #FFD2E2; }
.po-slot.hue-5 { background: linear-gradient(135deg, rgba(0,194,168,.96), rgba(0,150,136,.96)); border-color: #BFF3EC; }

.po-foot { margin-top: 38px; min-height: 60px; display: flex; justify-content: center; }
.po-confirm {
  border: none; border-radius: 999px; padding: 16px 46px;
  font-size: 20px; font-weight: 800; color: #241B5C;
  background: linear-gradient(135deg, #FFE27A, #FFC93D);
  box-shadow: 0 12px 30px rgba(255,201,61,.45);
  animation: poBtnIn .45s cubic-bezier(.2,1.4,.4,1);
}
.po-confirm:hover { transform: translateY(-2px) scale(1.03); }
@keyframes poBtnIn {
  from { opacity: 0; transform: translateY(16px) scale(.9); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
 * 希沃交互智能白板：大屏触控 · 16:9 · 一屏完整
 * ========================================================= */
#gArena { scroll-margin-top: 82px; }

/* 大屏放大，触控目标更易点 */
@media (min-width: 1600px) {
  .content { padding: 30px 40px; }
  .game-panel { padding: 28px; }
  .pk2-en { font-size: 32px; }
  .pk2-opt { padding: 14px 18px; font-size: 18px; }
  .pk2-board.pk-p1 .pk2-opt { font-size: 19px; }
  .qz-opt { font-size: 19px; padding: 15px 18px; }
  .rs-key { width: 56px; height: 62px; font-size: 27px; }
  .rs-slot { width: 46px; height: 58px; font-size: 28px; }
  .gm-game { padding: 22px; }
  .gsp-slot-name { font-size: 18px; }
  .btn, .gsp-dd-btn, .gsp-swap { min-height: 46px; }
  .gsp-opt { padding: 12px 14px; font-size: 15px; }
}

/* 矮屏压缩纵向间距，保证游戏在一屏内完整显示 */
@media (max-height: 820px) {
  .content { padding: 16px 24px; }
  .module-header { margin-bottom: 14px; }
  .panel { margin-bottom: 14px; }
  .game-panel { padding: 18px 20px; }
  .pk2-progress { margin-bottom: 10px; gap: 6px; }
  .pk2-boards { gap: 12px; }
  .pk2-board { padding: 12px; }
  .pk2-head { margin-bottom: 8px; }
  .pk2-stem { padding: 10px; min-height: 48px; margin-bottom: 10px; }
  .pk2-options { gap: 6px; }
  .pk2-opt { padding: 8px 12px; }
  .match-grid { gap: 8px; }
  .qz-options { gap: 8px; }
  .rs-card { padding: 14px !important; margin-bottom: 10px !important; }
  .rs-letters { gap: 6px; margin-bottom: 10px; }
}

/* 触控设备：去除悬浮位移，避免点按抖动 */
@media (pointer: coarse) {
  .gm-game:hover, .gm-mode-btn:hover, .pk2-opt:hover:not(:disabled) { transform: none; }
  button, .qz-opt, .pk2-opt, .rs-key, .mcard, .match-card { touch-action: manipulation; }
}

/* =========================================================
 * 游戏全屏覆盖层（开始即全屏，结束自动关闭）
 * ========================================================= */
#gArena.game-fullscreen {
  --gscale: 1;
  /* 游戏内统一字体：英文/数字 Times New Roman，中文回退宋体 SimSun（Windows 自带） */
  --font-en: "Times New Roman", "SimSun", "Songti SC", "STSong", serif;
  --font-zh: "Times New Roman", "SimSun", "Songti SC", "STSong", serif;
  font-family: "Times New Roman", "SimSun", "Songti SC", "STSong", serif;
  position: fixed; inset: 0; z-index: 9000;
  margin: 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(160deg, #F4F8FF 0%, #EAF2FF 100%);
  padding: 72px 40px 30px;
  overflow: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: gameFsIn .3s ease;
}
/* 提升主内容层，确保全屏游戏盖住顶部导航（header z-index 60） */
body.game-fs-on .view-container { z-index: 9000; }
@keyframes gameFsIn {
  from { opacity: 0; transform: scale(.985); }
  to   { opacity: 1; transform: none; }
}
#gArena.game-fullscreen > * { width: 100%; }
#gArena.game-fullscreen .game-status {
  text-align: center; margin: 0 auto 14px;
  font-size: calc(16px * var(--gscale));
}
#gArena.game-fullscreen .match-grid {
  max-width: min(960px, 92vw);
  height: calc(100vh - 165px);
  margin: auto;
  grid-auto-rows: 1fr;
}
/* 翻牌卡片：去掉固定宽高比，按网格行高均分，保证整屏不滚动 */
#gArena.game-fullscreen .match-card { aspect-ratio: auto; min-height: 0; height: 100%; }
/* 明牌卡片：保持内容高度在行内居中，不被拉伸 */
#gArena.game-fullscreen .mcard.face-card { align-self: center; height: auto; }
#gArena.game-fullscreen .pk2-boards { max-width: 1600px; margin: 0 auto; }
/* 双人 boards 内含进度条与内边距，网格高度收紧，保证整屏不滚动 */
#gArena.game-fullscreen .pk2-boards .match-grid { height: calc(100vh - 215px); }
#gArena.game-fullscreen .restore-board,
#gArena.game-fullscreen .quiz-board {
  max-width: 1150px; margin: 0 auto; width: 100%;
}

/* ---- 字号缩放：A− / A+ 工具改变 --gscale，后排学生可看清 ---- */
/* 消消乐（明牌 / 翻牌）：核心单词与释义 28px */
#gArena.game-fullscreen .mcard.face-card.mc-word { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .mcard.face-card.mc-meaning { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .mc-back { font-size: calc(28px * var(--gscale)); }
/* 选择答题 */
#gArena.game-fullscreen .qz-stem { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .qz-en { font-size: calc(32px * var(--gscale)); }
#gArena.game-fullscreen .qz-opt { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .qz-progress,
#gArena.game-fullscreen .rs-progress { font-size: calc(15px * var(--gscale)); }
/* 还原单词 */
#gArena.game-fullscreen .rs-meaning { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .rs-pos { font-size: calc(16px * var(--gscale)); }
#gArena.game-fullscreen .rs-key { font-size: calc(28px * var(--gscale)); }
#gArena.game-fullscreen .rs-slot { font-size: calc(30px * var(--gscale)); }

/* 双人 compact 同步缩放（双栏空间有限，适度放大保证不溢出） */
#gArena.game-fullscreen .quiz-board.compact .qz-stem { font-size: calc(22px * var(--gscale)); }
#gArena.game-fullscreen .quiz-board.compact .qz-en { font-size: calc(24px * var(--gscale)); }
#gArena.game-fullscreen .quiz-board.compact .qz-opt { font-size: calc(20px * var(--gscale)); }
#gArena.game-fullscreen .restore-board.compact .rs-meaning { font-size: calc(22px * var(--gscale)); }
#gArena.game-fullscreen .restore-board.compact .rs-key { font-size: calc(22px * var(--gscale)); }
#gArena.game-fullscreen .restore-board.compact .rs-slot { font-size: calc(24px * var(--gscale)); }
#gArena.game-fullscreen .match-grid.compact .mcard.face-card.mc-word { font-size: calc(18px * var(--gscale)); }
#gArena.game-fullscreen .match-grid.compact .mcard.face-card.mc-meaning,
#gArena.game-fullscreen .match-grid.compact .mc-back { font-size: calc(16px * var(--gscale)); }

/* 退出按钮 */
.game-exit {
  position: fixed; top: 18px; right: 28px; z-index: 9100;
  border: none; border-radius: 999px; padding: 11px 24px;
  background: rgba(30,42,68,.82); color: #fff;
  font-weight: 700; font-size: 15px;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .2s, transform .2s, background .15s;
}
.game-exit.show { opacity: 1; transform: none; pointer-events: auto; }
.game-exit:hover { background: var(--red); }

/* 字号工具条（A− / 百分比 / A+） */
.game-zoom {
  position: fixed; top: 18px; left: 28px; z-index: 9100;
  display: flex; align-items: center; gap: 4px;
  background: rgba(30,42,68,.82); border-radius: 999px; padding: 5px 8px;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.game-zoom.show { opacity: 1; transform: none; pointer-events: auto; }
.game-zoom button {
  border: none; background: rgba(255,255,255,.16); color: #fff;
  width: 40px; height: 34px; border-radius: 999px;
  font-family: var(--font-en); font-weight: 700; font-size: 17px; cursor: pointer;
  transition: background .15s;
}
.game-zoom button:hover { background: var(--blue); }
.game-zoom #gzVal { color: #fff; font-size: 13px; font-weight: 700; min-width: 46px; text-align: center; }

/* 全屏抽取自动关闭倒计时数字 */
.po-cd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; margin-left: 6px;
  background: rgba(36,27,92,.18); border-radius: 999px; font-size: 14px;
}

/* =========================================================
 * 早读任务中心（后台编辑 + 前台今日任务 + 句子领读）
 * ========================================================= */
.modal-lg { width: 920px; }
.rt-top-grid {
  display: grid; grid-template-columns: 2fr 1.4fr 1.4fr 1.6fr; gap: 12px; margin-bottom: 16px;
}
.rt-top-grid .field { margin-bottom: 0; }

.rt-section {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  background: #FAFCFF;
}
.rt-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.rt-section-head h4 { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rt-search { max-width: 260px; margin-bottom: 0; }

.rt-bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 10px;
  background: #F1F6FF; border: 1px solid #E0EBFD; border-radius: 10px;
}
.rt-bulk-bar #rtSelectedCount { margin-left: auto; font-weight: 700; color: var(--blue-d); }

.rt-words {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 400px; overflow-y: auto; padding-right: 4px;
}
.rt-tb-group {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.rt-group-title { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.rt-group-title input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.rtg-icon { font-size: 16px; }
.rtg-name { font-weight: 800; }
.rtg-count { margin-left: auto; font-weight: 600; }
.rt-tb-title { padding: 10px 14px; background: linear-gradient(90deg, #EAF1FF, #F4F0FF); }
.rt-tb-title .rtg-name { font-size: 15px; color: var(--violet); }
.rt-tb-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.rt-unit-group { border: 1px solid #E8EEF9; border-radius: 10px; overflow: hidden; }
.rt-unit-title { padding: 8px 12px; background: #F7FAFF; }
.rt-unit-title .rtg-name { font-size: 13.5px; color: var(--blue-d); }
.rt-unit-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 10px; }

.rt-word {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
  background: #fff; cursor: pointer; transition: border-color .15s;
}
.rt-word:hover { border-color: var(--blue); }
.rt-word input[type=checkbox] { width: 16px; height: 16px; flex: none; }
.rt-word .rt-ec { accent-color: var(--orange); }
.rtw-en { font-family: var(--font-en); font-weight: 700; font-size: 15px; color: var(--blue-d); }
.rtw-ipa { font-size: 11.5px; color: var(--ink-3); }
.rtw-zh { font-size: 12.5px; color: var(--ink-2); margin-left: auto; text-align: right; }

.rt-custom { display: flex; flex-direction: column; gap: 8px; }
.rt-custom-row { display: grid; grid-template-columns: 2fr 1.4fr auto; gap: 8px; align-items: center; }

/* 前台今日任务卡片 */
.rt-today-list { display: flex; flex-direction: column; gap: 10px; }
.rt-today-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1.5px solid #DCE7FA; border-radius: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, #F2F7FF, #F8F4FF);
}
.rtt-body { display: flex; flex-direction: column; gap: 3px; }

/* 句子领读 */
.big-sentence {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px); color: var(--blue-d);
  line-height: 1.4; max-width: 1200px; margin: 0 auto;
}
.big-sentence-zh { font-size: 19px; color: var(--ink-2); margin-top: 14px; }
.rw-chip.sentence { font-family: var(--font-zh); }

/* =========================================================
 * 早自习领读：单词勾选区（纯领读，无学生无积分）
 * ========================================================= */
.rw-pick-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: #F6F9FF; border: 1px solid var(--line); border-radius: 12px;
}
.rw-all { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; }
.rw-all input { width: 17px; height: 17px; accent-color: var(--blue); }
.rw-search { max-width: 260px; flex: 1 1 200px; }
.rw-pick-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  max-height: 360px; overflow-y: auto; padding-right: 4px; margin-bottom: 14px;
}
.rw-pick-word {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.rw-pick-word:hover { border-color: var(--blue); }
.rw-pick-cb { width: 17px; height: 17px; flex: none; accent-color: var(--blue); }
.rw-pw-en { font-family: var(--font-en); font-weight: 700; font-size: 16px; color: var(--blue-d); }
.rw-pw-ipa { font-size: 11.5px; color: var(--ink-3); }
.rw-pw-zh { font-size: 12.5px; color: var(--ink-2); margin-left: auto; text-align: right; }

/* =========================================================
 * 全屏领读器：单词/句子大字展示，字号自由调节，退出返回
 * ========================================================= */
#rReader.reader-fs {
  --rscale: 1;
  position: fixed; inset: 0; z-index: 9000;
  background: linear-gradient(160deg, #F4F8FF 0%, #EAF2FF 100%);
  display: flex; flex-direction: column;
  animation: gameFsIn .3s ease;
}
#rReader.reader-fs .reader-settings { flex: none; margin-top: 58px; padding: 12px 28px; }
#rReader.reader-fs .reader-stage { flex: 1; min-height: 0; padding: 18px 40px; overflow: auto; }
#rReader.reader-fs .reader-controls { flex: none; }
#rReader.reader-fs .reader-words { flex: none; }

.rfs-zoom {
  position: fixed; top: 16px; left: 26px; z-index: 9100;
  display: flex; align-items: center; gap: 4px;
  background: rgba(30,42,68,.82); border-radius: 999px; padding: 5px 8px;
}
.rfs-zoom button {
  border: none; background: rgba(255,255,255,.16); color: #fff;
  width: 40px; height: 34px; border-radius: 999px;
  font-family: var(--font-en); font-weight: 700; font-size: 17px; cursor: pointer;
}
.rfs-zoom button:hover { background: var(--blue); }
.rfs-zoom #rZoomVal { color: #fff; font-size: 13px; font-weight: 700; min-width: 46px; text-align: center; }
.rfs-exit {
  position: fixed; top: 16px; right: 26px; z-index: 9100;
  border: none; border-radius: 999px; padding: 10px 22px;
  background: rgba(30,42,68,.82); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
}
.rfs-exit:hover { background: var(--red); }

/* 舞台字号随 --rscale 缩放 */
#rReader.reader-fs .big-word { font-size: calc(64px * var(--rscale)); }
#rReader.reader-fs .big-sentence { font-size: calc(42px * var(--rscale)); }
#rReader.reader-fs .big-sentence-zh { font-size: calc(20px * var(--rscale)); }
#rReader.reader-fs .big-zh { font-size: calc(28px * var(--rscale)); }
#rReader.reader-fs .big-ipa { font-size: calc(22px * var(--rscale)); }
#rReader.reader-fs .big-pos { font-size: calc(16px * var(--rscale)); }
#rReader.reader-fs .big-example { font-size: calc(20px * var(--rscale)); }
#rReader.reader-fs .big-example small { font-size: calc(15px * var(--rscale)); }

/* =========================================================
 * 句式库管理专用样式
 * ========================================================= */
.toolbar-right { display: flex; gap: 10px; margin-left: auto; }
.sentence-cell { display: flex; align-items: center; gap: 8px; min-width: 280px; }
.sentence-text { font-family: var(--font-en); font-size: 16px; color: var(--ink); line-height: 1.5; }
.spk-btn { border: none; background: #EAF3FF; color: var(--blue-d); border-radius: 999px; width: 32px; height: 32px; font-size: 15px; flex: 0 0 auto; transition: background .15s, transform .15s; }
.spk-btn:hover { background: var(--blue); transform: scale(1.08); }
.modal-divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #F6F9FF; border: 1px solid var(--line); border-radius: 12px; }
.cat-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-meta b { font-size: 14px; }
.cat-meta small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-del-form { margin: 0; flex: 0 0 auto; }
@media (max-width: 720px) {
  .toolbar-right { margin-left: 0; width: 100%; }
  .modal-lg { width: 100%; }
}

/* ===== 教材 → 单元 层级（词库页） ===== */
.book-group {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  margin-bottom: 18px; background: linear-gradient(180deg, #FCFDFF, #F7FAFF);
}
.book-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bgh-title { display: flex; align-items: center; gap: 10px; }
.bgh-title h3 { margin: 0; font-size: 19px; color: var(--violet); }
.bgh-ico { font-size: 24px; }
.bgh-actions { display: flex; align-items: center; gap: 8px; }
.book-group-desc { margin: 8px 0 14px; }

/* ===== 面包屑（单词页） ===== */
.breadcrumb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.crumb-sep { color: var(--ink-3); font-size: 14px; }
.crumb-text { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.crumb-current { color: var(--blue-d); }

/* ===== 音节来源徽章 ===== */
.src-badge {
  display: inline-block; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 999px; margin-left: 7px; white-space: nowrap;
}
.src-final { background: #E7F6EC; color: #1E8A4C; border: 1px solid #BCE6CB; }
.src-dict { background: #E9F1FF; color: #2563C9; border: 1px solid #C6DBFB; }
.src-rule { background: #F3F1FF; color: #6D45C9; border: 1px solid #DCD2FB; }
