/* ================================
   智学小书虫 - 全局样式
   ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: #1E293B;
  background: #FFFEFC;
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #FFFBF5 0%, #FFF7ED 40%, #FFFEF7 100%);
  position: relative;
  overflow: hidden;
}

/* 背景装饰光晕 */
#app::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: rgba(139, 92, 246, 0.25);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

#app::after {
  content: '';
  position: absolute;
  bottom: 150px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* 毛玻璃卡片通用 */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 27, 75, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ================================
   开屏页面
   ================================ */

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FFFEFC 0%, #FFFCF7 60%, #FFFEFA 100%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 60% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 80% 40%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 90% 75%, rgba(255,255,255,0.5), transparent);
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.splash-worm {
  margin-bottom: 30px;
  animation: float 3s ease-in-out infinite;
}

.bounce-in {
  animation: bounceIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% { transform: translateY(200px) scale(0); opacity: 0; }
  60% { transform: translateY(-20px) scale(1.1); }
  80% { transform: translateY(10px) scale(0.95); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.splash-greeting {
  font-size: 20px;
  font-weight: 600;
  color: #4A3F35;
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.8s forwards;
}

.splash-quote {
  font-size: 14px;
  color: #9A8B7D;
  font-style: italic;
  margin-bottom: 50px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 1s forwards;
  padding: 0 40px;
  text-align: center;
  line-height: 1.6;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-btn {
  padding: 14px 40px;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  opacity: 0;
  animation: fadeInUp 0.6s ease 1.3s forwards;
  transition: transform 0.2s ease;
}

.splash-btn:active {
  transform: scale(0.95);
}

/* ================================
   小书虫卡通形象
   ================================ */

/* ==========================================
   小书虫虫虫 —— 圆滚滚萌系新版
   绿色身体、大圆圆眼、小触角、小博士帽、抱书
   ========================================== */

.worm-body {
  position: relative;
  width: 100px;
  height: 120px;
}

.worm-body.small {
  width: 64px;
  height: 76px;
}

/* 脑袋：圆滚滚，占主体 */
.worm-head {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 72px;
  background: linear-gradient(180deg, #86EFAC 0%, #4ADE80 55%, #22C55E 100%);
  border-radius: 50% 50% 48% 48%;
  z-index: 10;
  box-shadow:
    inset -8px -8px 18px rgba(0,0,0,0.08),
    inset 6px 4px 12px rgba(255,255,255,0.25),
    0 6px 16px rgba(34, 197, 94, 0.25);
}

.worm-body.small .worm-head {
  width: 52px;
  height: 48px;
  top: 4px;
  box-shadow:
    inset -4px -4px 10px rgba(0,0,0,0.08),
    inset 3px 2px 6px rgba(255,255,255,0.25),
    0 4px 10px rgba(34, 197, 94, 0.25);
}

/* 小博士帽（顶在头上） */
.worm-head::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 22px;
  background: linear-gradient(180deg, #FFB74D 0%, #FF8A65 100%);
  border-radius: 6px 6px 4px 4px;
  z-index: 12;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}
/* 帽子顶的流苏/小球 */
.worm-head::after {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #FCD34D;
  border-radius: 50%;
  z-index: 13;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.worm-body.small .worm-head::before {
  width: 30px;
  height: 14px;
  top: -9px;
}
.worm-body.small .worm-head::after {
  width: 8px;
  height: 8px;
  top: -13px;
}

/* 小触角 */
.worm-glasses {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 14px;
  z-index: 5;
}
.worm-glasses::before,
.worm-glasses::after {
  content: '';
  position: absolute;
  top: 0;
  width: 3px;
  height: 14px;
  background: #16A34A;
  border-radius: 2px;
}
.worm-glasses::before { left: 8px; transform: rotate(-20deg); }
.worm-glasses::after  { right: 8px; transform: rotate(20deg); }
/* 触角顶端小圆球 */
.worm-body.small .worm-glasses {
  top: 0;
  width: 24px;
  height: 10px;
}
.worm-body.small .worm-glasses::before,
.worm-body.small .worm-glasses::after {
  width: 2px;
  height: 10px;
}

/* 去掉旧眼镜样式的伪元素干扰——保留小触角 */
/* 眼睛：大大圆圆，带高光 */
.worm-eyes {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 11;
}

.worm-body.small .worm-eyes {
  top: 15px;
  gap: 13px;
}

.worm-eye {
  width: 16px;
  height: 18px;
  background: #1E293B;
  border-radius: 50%;
  position: relative;
  animation: blink 4.5s ease-in-out infinite;
}
.worm-eye::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 4px;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
}
.worm-eye.left  { transform: translateY(0); }
.worm-eye.right { transform: translateY(0); }

.worm-body.small .worm-eye {
  width: 11px;
  height: 12px;
}
.worm-body.small .worm-eye::after {
  top: 2px;
  left: 2.5px;
  width: 3.5px;
  height: 3.5px;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* 腮红：圆圆粉粉 */
.worm-cheeks {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 68px;
  z-index: 10;
}

.worm-body.small .worm-cheeks {
  top: 24px;
  width: 44px;
}

.worm-cheek {
  width: 12px;
  height: 7px;
  background: #FDA4AF;
  border-radius: 50%;
  opacity: 0.85;
  filter: blur(0.3px);
}

.worm-body.small .worm-cheek {
  width: 8px;
  height: 5px;
}

/* 嘴巴：微笑的小弯月 */
.worm-mouth {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  border-bottom: 2px solid #166534;
  border-radius: 0 0 50% 50%;
  z-index: 11;
}

.worm-body.small .worm-mouth {
  top: 29px;
  width: 10px;
  height: 5px;
  border-bottom-width: 1.5px;
}

/* 身体：胖胖的一节 */
.worm-body-seg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #86EFAC 0%, #4ADE80 60%, #22C55E 100%);
  border-radius: 50%;
  box-shadow:
    inset -5px -5px 14px rgba(0,0,0,0.08),
    inset 4px 2px 8px rgba(255,255,255,0.2);
}

.seg1 {
  top: 58px;
  width: 70px;
  height: 45px;
  z-index: 7;
}
.worm-body.small .seg1 {
  top: 38px;
  width: 46px;
  height: 30px;
}

.seg2 {
  top: 82px;
  width: 60px;
  height: 38px;
  z-index: 5;
}
.worm-body.small .seg2 {
  top: 55px;
  width: 40px;
  height: 24px;
}

.seg3 {
  display: none;
}

/* 脚/抱着的书 */
.worm-feet {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 8;
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.worm-body.small .worm-feet {
  bottom: 0;
  font-size: 12px;
}

/* ================================
   心情签到页
   ================================ */

.mood-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FFFEFC 0%, #FFFCF7 60%, #FFFEFA 100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 30px 30px;
}

.mood-worm {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.mood-title {
  font-size: 20px;
  font-weight: 600;
  color: #4A3F35;
  margin-bottom: 30px;
  text-align: center;
}

/* 虫虫心情回应 */
.mood-worm-response {
  margin: 20px 0 10px;
}
.mood-worm-resp {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mood-worm-face {
  font-size: 36px;
  line-height: 1;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  animation: wormBounce 2s ease-in-out infinite;
}
.mood-worm-bubble {
  background: rgba(255,255,255,0.95);
  border-radius: 0 16px 16px 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
  flex: 1;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.mood-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.mood-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 8px;
}

.mood-option:active {
  transform: scale(0.92);
}

.mood-emoji {
  font-size: 42px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mood-option.selected .mood-emoji {
  transform: scale(1.3);
  animation: bounce 0.5s;
}

@keyframes bounce {
  0%, 100% { transform: scale(1.3); }
  50% { transform: scale(1.5); }
}

.mood-option span {
  font-size: 13px;
  color: #7B6B5D;
}

.mood-option.selected span {
  color: #EA580C;
  font-weight: 600;
}

.mood-detail {
  width: 100%;
  max-width: 340px;
  animation: fadeInUp 0.4s ease;
}

.mood-detail-title {
  font-size: 14px;
  color: #9A8B7D;
  margin-bottom: 12px;
  text-align: center;
}

.mood-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.mood-reason-tag {
  padding: 6px 12px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 20px;
  font-size: 12px;
  color: #9A3412;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mood-reason-tag.selected {
  background: #FED7AA;
  border-color: #FB923C;
  color: #9A3412;
  font-weight: 600;
}

.mood-input-wrap {
  margin-bottom: 20px;
}

.mood-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #FED7AA;
  background: #FFFEFC;
  color: #4A3F35;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  box-sizing: border-box;
}

.mood-input::placeholder {
  color: #B8A99B;
}

.mood-input:focus {
  border-color: #FB923C;
  background: #FFF7ED;
}

.mood-next-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  animation: fadeInUp 0.4s ease;
  transition: transform 0.2s ease;
}

.mood-next-btn:active {
  transform: scale(0.95);
}

/* ================================
   身份选择
   ================================ */

.role-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FFFEFC 0%, #FFF7ED 60%, #FFFEFA 100%);
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.role-title {
  font-size: 24px;
  font-weight: 700;
  color: #4A3F35;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.role-cards {
  display: flex;
  gap: 24px;
}

.role-card {
  width: 130px;
  height: 160px;
  background: #FFFFFF;
  border: 1px solid rgba(234, 179, 8, 0.2);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.12);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.role-card:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.18);
}

.role-icon {
  font-size: 48px;
  margin-bottom: 4px;
}

.role-name {
  font-size: 16px;
  font-weight: 600;
  color: #4A3F35;
}

.role-desc {
  font-size: 11px;
  color: #9A8B7D;
}

/* ================================
   主容器与页面切换
   ================================ */

.main-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 80px;
  -webkit-overflow-scrolling: touch;
}

.page {
  display: none;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 90px;
  -webkit-overflow-scrolling: touch;
  animation: pageFadeIn 0.35s ease;
  box-sizing: border-box;
}

.page.active {
  display: block;
  height: 100vh;
  max-height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 90px;
  -webkit-overflow-scrolling: touch;
}

/* 页面容器：占满剩余高度 */
#pageContainer {
  flex: 1;
  position: relative;
  overflow: hidden;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ================================
   底部 Tab 栏
   ================================ */

.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(30, 27, 75, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 8px 0;
}

.tab-item:active {
  transform: scale(0.9);
}

.tab-item-icon {
  font-size: 22px;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.tab-item.active .tab-item-icon {
  opacity: 1;
  transform: translateY(-3px);
  filter: drop-shadow(0 3px 8px rgba(139, 92, 246, 0.5));
}

.tab-item-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease;
}

.tab-item.active .tab-item-label {
  color: #FFD166;
  font-weight: 600;
}

/* ================================
   底部 Tab 栏（真实类名版本）
   ================================ */

.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(30, 27, 75, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-tab-bar .tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 8px 0;
}

.bottom-tab-bar .tab-item:active {
  transform: scale(0.9);
}

.bottom-tab-bar .tab-icon {
  font-size: 22px;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.bottom-tab-bar .tab-item.active .tab-icon {
  opacity: 1;
  transform: translateY(-3px);
  filter: drop-shadow(0 3px 8px rgba(139, 92, 246, 0.5));
}

.bottom-tab-bar .tab-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease;
}

.bottom-tab-bar .tab-item.active .tab-label {
  color: #FFD166;
  font-weight: 600;
}

/* 中间凸起按钮 */
.tab-center {
  position: relative;
}

.tab-center-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A65, #FFD166);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: absolute;
  top: -15px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tab-center-icon:active {
  transform: scale(0.9);
}

/* 教师端Tab栏用蓝色系 */
.teacher-tabs .tab-item.active .tab-icon {
  filter: drop-shadow(0 3px 8px rgba(59, 130, 246, 0.5));
}

.teacher-tabs .tab-item.active .tab-label {
  color: #60A5FA;
}

/* 教师端Tab栏用不同色系 */
.teacher-tab .tab-item.active .tab-item-icon {
  filter: drop-shadow(0 3px 8px rgba(59, 130, 246, 0.5));
}

.teacher-tab .tab-item.active .tab-item-label {
  color: #60A5FA;
}

/* ================================
   顶部 Header
   ================================ */

.page-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.greeting-text {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.greeting-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.points-badge {
  padding: 6px 12px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 20px;
  font-size: 12px;
  color: #FDBA74;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.avatar-small {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A65, #FFD166);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.3);
}

/* ================================
   通用卡片 & 文本
   ================================ */

.section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title .emoji {
  font-size: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(99, 102, 241, 0.9));
  color: #fff;
}

.card-orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(251, 146, 60, 0.9));
  color: #fff;
}

.card-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(52, 211, 153, 0.9));
  color: #fff;
}

/* ================================
   首页 · 小书虫问候卡
   ================================ */

.worm-greeting-card {
  margin: 0 16px 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(59, 130, 246, 0.85));
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.worm-greeting-card:active {
  transform: scale(0.98);
}

.worm-greeting-avatar {
  flex-shrink: 0;
}

.worm-greeting-text {
  flex: 1;
}

.worm-greeting-text .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.worm-greeting-text .sub {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.worm-greeting-arrow {
  font-size: 18px;
  opacity: 0.7;
}

/* ================================
   首页 · 今日作业卡片
   ================================ */

.today-homework-card {
  margin: 0 16px 20px;
  padding: 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.thc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.thc-title {
  font-size: 17px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.thc-time-est {
  font-size: 12px;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: 12px;
}

.thc-progress-bar {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}

.thc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF8A65, #F97316);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.thc-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 14px;
}

.thc-progress-text .percent {
  font-weight: 600;
  color: #FF8A65;
}

.homework-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hw-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}

.hw-item:active {
  transform: scale(0.98);
}

.hw-item.current {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.3);
}

.hw-item.completed {
  opacity: 0.6;
}

.hw-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.hw-item.completed .hw-checkbox {
  background: linear-gradient(135deg, #10B981, #34D399);
  border-color: #10B981;
  color: #fff;
  font-size: 12px;
}

.hw-info {
  flex: 1;
}

.hw-subject {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.hw-subj-icon {
  font-size: 14px;
}

.hw-subj-name {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}

.hw-item.completed .hw-subj-name {
  text-decoration: line-through;
  color: #94A3B8;
}

.hw-desc {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 4px;
}

.hw-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #94A3B8;
}

.hw-difficulty {
  letter-spacing: 1px;
}

.hw-start-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, #FF8A65, #FFB74D);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hw-start-btn:active {
  transform: scale(0.92);
}

.hw-item.completed .hw-start-btn {
  background: #10B981;
}

/* 完成状态按钮 */
.hw-done-text {
  font-size: 12px;
  color: #10B981;
  font-weight: 600;
}

/* ================================
   数据概览卡片
   ================================ */

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 20px;
}

.data-item {
  padding: 14px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.data-icon {
  font-size: 20px;
}

.data-value {
  font-size: 20px;
  font-weight: 700;
  color: #1E293B;
}

.data-value .unit {
  font-size: 12px;
  font-weight: 400;
  color: #64748B;
  margin-left: 2px;
}

.data-label {
  font-size: 12px;
  color: #64748B;
}

.data-trend {
  font-size: 11px;
  color: #10B981;
  font-weight: 500;
}

.data-trend.down {
  color: #F43F5E;
}

/* ================================
   番茄钟学习模式
   ================================ */

.pomodoro-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 30px;
}

.pomo-subject {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.pomo-hw-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 40px;
  text-align: center;
}

.pomo-timer-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 40px;
}

.pomo-timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pomo-timer-ring circle {
  fill: none;
  stroke-width: 10;
}

.pomo-ring-bg {
  stroke: rgba(255,255,255,0.15);
}

.pomo-ring-progress {
  stroke: url(#pomoGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.pomo-time-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.pomo-time {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.pomo-status {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

.pomo-worm {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.pomo-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.pomo-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.2s ease;
}

.pomo-btn:active {
  transform: scale(0.9);
}

.pomo-btn-primary {
  background: linear-gradient(135deg, #F97316, #FB923C);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  color: #fff;
}

.pomo-btn-secondary {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

.pomo-encourage {
  text-align: center;
  padding: 14px 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #C4B5FD;
  font-size: 13px;
  line-height: 1.6;
  max-width: 300px;
  animation: fadeInUp 0.5s ease;
}

.pomo-encourage .worm-mini {
  font-size: 18px;
  margin-right: 4px;
}

.pomo-ask-help {
  margin-top: 16px;
  padding: 10px 20px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 24px;
  color: #FDBA74;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pomo-ask-help:active {
  transform: scale(0.95);
  background: rgba(249, 115, 22, 0.3);
}

/* ================================
   弹窗通用
   ================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  animation: modalBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes modalBounce {
  from { opacity: 0; transform: scale(0.8) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 12px;
  text-align: center;
}

.modal-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-btn:active {
  transform: scale(0.96);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #FF8A65, #FFB74D);
  color: #fff;
}

.modal-btn-secondary {
  background: #F1F5F9;
  color: #64748B;
}

.modal-btn-orange {
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #fff;
}

/* ================================
   作业完成反馈弹窗
   ================================ */

.complete-modal .complete-worm {
  text-align: center;
  font-size: 60px;
  margin-bottom: 8px;
  animation: bounceIn 0.8s ease;
}

.complete-modal .complete-subject {
  font-size: 13px;
  color: #64748B;
  text-align: center;
  margin-bottom: 4px;
}

.complete-modal .complete-big-title {
  font-size: 22px;
  font-weight: 700;
  color: #1E293B;
  text-align: center;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #F97316, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.complete-modal .complete-time {
  text-align: center;
  font-size: 14px;
  color: #64748B;
  margin-bottom: 24px;
}

.complete-modal .complete-time strong {
  color: #FF8A65;
  font-weight: 700;
}

.feedback-section {
  margin-bottom: 16px;
}

.feedback-label {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 10px;
}

.difficulty-options {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.diff-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diff-option:active {
  transform: scale(0.95);
}

.diff-option.selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: #FF8A65;
}

.diff-emoji {
  font-size: 24px;
}

.diff-label {
  font-size: 11px;
  color: #64748B;
}

.diff-option.selected .diff-label {
  color: #FF8A65;
  font-weight: 600;
}

.feedback-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  font-size: 13px;
  color: #1E293B;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 70px;
}

.feedback-input:focus {
  border-color: #FF8A65;
  background: #fff;
}

/* ================================
   学习报告页
   ================================ */

.report-page {
  min-height: 100%;
  padding: 20px 16px 40px;
}

.report-card {
  background: linear-gradient(160deg, #FF8A65 0%, #FFB74D 50%, #FFD166 100%);
  border-radius: 24px;
  padding: 30px 24px;
  color: #fff;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.report-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.report-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: rgba(249, 115, 22, 0.15);
  border-radius: 50%;
}

.report-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.report-date {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.report-main-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.report-subtitle {
  font-size: 14px;
  opacity: 0.9;
  font-style: italic;
}

.report-worm {
  text-align: center;
  font-size: 50px;
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
}

.report-section {
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.report-section-title {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-total-time {
  text-align: center;
  padding: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 16px;
}

.report-total-time .time-num {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.report-total-time .time-label {
  font-size: 12px;
  opacity: 0.8;
}

.report-total-time .time-compare {
  font-size: 12px;
  margin-top: 6px;
  color: #86EFAC;
}

.subject-time-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subject-time-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sti-name {
  width: 48px;
  font-size: 13px;
  font-weight: 500;
}

.sti-bar {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 5px;
  overflow: hidden;
}

.sti-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F97316, #FBBF24);
  border-radius: 5px;
  transition: width 1s ease;
}

.sti-time {
  width: 50px;
  font-size: 12px;
  text-align: right;
  opacity: 0.9;
}

.report-achievements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.achievement-item {
  padding: 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  text-align: center;
}

.achievement-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.achievement-value {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.achievement-label {
  font-size: 11px;
  opacity: 0.8;
}

.report-worm-msg {
  padding: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.8;
  position: relative;
}

.report-worm-msg .from {
  display: block;
  text-align: right;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.report-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.report-action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.report-action-btn:active {
  transform: scale(0.96);
}

.report-btn-save {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.report-btn-done {
  background: #F97316;
  color: #fff;
}

/* ================================
   错题本页面
   ================================ */

.wrongbook-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wb-stats {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
}

.wb-stat-item {
  text-align: center;
}

.wb-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.wb-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.wb-subject-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.wb-subj-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wb-subj-tab.active {
  background: linear-gradient(135deg, #F97316, #FB923C);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.wb-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  margin: 0 16px 16px;
  background: linear-gradient(135deg, #10B981, #34D399);
  color: #fff;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s ease;
}

.wb-upload-btn:active {
  transform: scale(0.97);
}

.wb-list {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wb-item {
  padding: 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.wb-item:active {
  transform: scale(0.98);
}

.wb-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
  line-height: 1.5;
}

.wb-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.wb-tag {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.wb-tag.knowledge {
  background: rgba(139, 92, 246, 0.1);
  color: #F97316;
}

.wb-tag.error-cause {
  background: rgba(244, 63, 94, 0.1);
  color: #E11D48;
}

.wb-tag.mastered {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.wb-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94A3B8;
}

/* 错题详情页 */
.wrong-detail-page {
  padding: 16px 16px 40px;
}

.wd-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  padding: 8px 0;
  cursor: pointer;
  margin-bottom: 12px;
}

.wd-card {
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.wd-label {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 6px;
}

.wd-question {
  font-size: 15px;
  color: #1E293B;
  line-height: 1.6;
  margin-bottom: 8px;
}

.wd-ai-analysis {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.wd-ai-title {
  font-size: 13px;
  font-weight: 600;
  color: #F97316;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wd-ai-content {
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
}

.wd-solution-steps {
  margin-bottom: 14px;
}

.wd-step {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}

.wd-step:last-child {
  border-bottom: none;
}

.wd-step-num {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #FF8A65, #FFB74D);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.wd-step-content {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

.wd-variations-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wd-variation {
  padding: 12px;
  background: #F8FAFC;
  border-radius: 12px;
  margin-bottom: 8px;
}

.wd-var-q {
  font-size: 13px;
  color: #1E293B;
  margin-bottom: 8px;
  line-height: 1.5;
}

.wd-var-btn {
  font-size: 12px;
  color: #FF8A65;
  cursor: pointer;
}

.wd-master-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10B981, #34D399);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.2s ease;
}

.wd-master-btn:active {
  transform: scale(0.97);
}

/* ================================
   AI 陪伴聊天页
   ================================ */

.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  height: calc(100svh - 70px);
}

.chat-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 27, 75, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-header-avatar {
  position: relative;
}

.chat-header-avatar .online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  border: 2px solid rgba(255, 138, 101, 0.3);
}

.chat-header-info .name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.chat-header-info .status {
  font-size: 11px;
  color: #86EFAC;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg-row {
  display: flex;
  gap: 8px;
  max-width: 85%;
}

.msg-row.bot {
  align-self: flex-start;
}

.msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.msg-row.bot .msg-avatar {
  background: linear-gradient(135deg, #86EFAC, #4ADE80);
}

.msg-row.user .msg-avatar {
  background: linear-gradient(135deg, #FF8A65, #FFB74D);
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.msg-row.bot .msg-bubble {
  background: rgba(255,255,255,0.9);
  color: #1E293B;
  border-bottom-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, #FF8A65, #FFB74D);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  text-align: center;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(30, 27, 75, 0.6);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.quick-reply {
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  font-size: 12px;
  color: #C4B5FD;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-reply:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.2);
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: rgba(30, 27, 75, 0.9);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-input {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.chat-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316, #FB923C);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:active {
  transform: scale(0.9);
}

/* 打字指示 */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* ================================
   个人中心
   ================================ */

.profile-page {
  padding-bottom: 30px;
}

.profile-header {
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A65, #FFD166);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.profile-level {
  font-size: 13px;
  color: #C4B5FD;
  margin-bottom: 10px;
}

.profile-level-bar {
  width: 200px;
  height: 6px;
  margin: 0 auto;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}

.profile-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #F97316, #FBBF24);
  border-radius: 3px;
  width: 65%;
}

.profile-points {
  margin-top: 10px;
  font-size: 13px;
  color: #FDBA74;
  font-weight: 600;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 16px;
  gap: 8px;
}

.stat-col {
  text-align: center;
}

.stat-col .num {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.stat-col .label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.medal-section {
  padding: 0 16px 20px;
}

.medal-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.medal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
}

.medal-item.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.medal-icon {
  font-size: 28px;
}

.medal-name {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.menu-list {
  padding: 0 16px 20px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.88);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu-item:active {
  transform: scale(0.98);
}

.menu-icon {
  font-size: 18px;
}

.menu-text {
  flex: 1;
  font-size: 14px;
  color: #1E293B;
}

.menu-arrow {
  color: #CBD5E1;
  font-size: 14px;
}

/* ================================
   教师端页面
   ================================ */

.teacher-page {
  min-height: 100%;
  padding-bottom: 30px;
}

.teacher-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.teacher-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.teacher-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.teacher-add-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FFD166, #60A5FA);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  transition: transform 0.2s ease;
}

.teacher-add-btn:active {
  transform: scale(0.9);
}

/* 班级概览卡片 */
.class-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}

.co-card {
  padding: 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
}

.co-card .label {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 6px;
}

.co-card .value {
  font-size: 22px;
  font-weight: 700;
  color: #1E293B;
}

.co-card .value .unit {
  font-size: 12px;
  font-weight: 400;
  color: #64748B;
}

.co-card .sub {
  font-size: 11px;
  margin-top: 4px;
  color: #10B981;
}

/* 作业列表 */
.homework-list-t {
  padding: 0 16px;
}

.hw-t-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hw-t-item:active {
  transform: scale(0.98);
}

.hw-t-info {
  flex: 1;
}

.hw-t-subject {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.hw-t-subj-icon {
  font-size: 16px;
}

.hw-t-subj-name {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
}

.hw-t-content {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 6px;
}

.hw-t-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #94A3B8;
}

.hw-t-rate {
  text-align: right;
}

.hw-t-rate-num {
  font-size: 18px;
  font-weight: 700;
  color: #10B981;
}

.hw-t-rate-label {
  font-size: 11px;
  color: #64748B;
}

/* 班级报告页 */
.report-t-section {
  padding: 0 16px 20px;
}

.report-t-card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 18px;
}

.report-t-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hard-question-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 10px;
}

.hq-rank {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #F43F5E, #FB7185);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.hq-rank.rank-2 {
  background: linear-gradient(135deg, #F97316, #FB923C);
}

.hq-rank.rank-3 {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

.hq-rank.rank-other {
  background: #94A3B8;
}

.hq-content {
  flex: 1;
}

.hq-qname {
  font-size: 13px;
  color: #1E293B;
  font-weight: 500;
  margin-bottom: 2px;
}

.hq-count {
  font-size: 11px;
  color: #64748B;
}

.hq-fire {
  font-size: 14px;
  color: #F97316;
  letter-spacing: 1px;
}

.error-cause-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ec-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ec-label {
  width: 70px;
  font-size: 12px;
  color: #64748B;
}

.ec-bar {
  flex: 1;
  height: 18px;
  background: #F1F5F9;
  border-radius: 9px;
  overflow: hidden;
}

.ec-bar-fill {
  height: 100%;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 10px;
  color: #fff;
  font-weight: 600;
}

.ec-1 .ec-bar-fill { background: linear-gradient(90deg, #F43F5E, #FB7185); width: 40%; }
.ec-2 .ec-bar-fill { background: linear-gradient(90deg, #F97316, #FB923C); width: 28%; }
.ec-3 .ec-bar-fill { background: linear-gradient(90deg, #F59E0B, #FBBF24); width: 20%; }
.ec-4 .ec-bar-fill { background: linear-gradient(90deg, #FF8A65, #FFD166); width: 12%; }

.student-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #FFF7ED;
  border-left: 3px solid #F97316;
  border-radius: 8px;
}

.sa-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
}

.sa-reason {
  font-size: 11px;
  color: #C2410C;
}

.sa-item.success {
  background: #F0FDF4;
  border-left-color: #10B981;
}

.sa-item.success .sa-reason {
  color: #059669;
}

/* 布置作业表单 */
.form-section {
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  font-size: 14px;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: #FFD166;
  background: #fff;
}

.form-select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  font-size: 14px;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-item {
  flex: 1;
}

.difficulty-picker {
  display: flex;
  gap: 8px;
}

.diff-pick-item {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diff-pick-item.selected {
  border-color: #FFD166;
  background: rgba(59, 130, 246, 0.1);
}

.diff-pick-item .stars {
  font-size: 14px;
  color: #F59E0B;
  margin-bottom: 2px;
}

.diff-pick-item .label {
  font-size: 11px;
  color: #64748B;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #FFD166, #60A5FA);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease;
  margin-top: 8px;
}

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

/* 撒花动效 */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 600;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* ================================
   教师端样式补充
   ================================ */

/* 教师顶部右侧按钮 */
.t-header-btn {
  background: linear-gradient(135deg, #FFD166, #60A5FA);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transition: transform 0.2s;
}

.t-header-btn:active {
  transform: scale(0.95);
}

/* 数据概览 */
.t-overview {
  display: flex;
  gap: 10px;
  padding: 0 20px 16px;
}

.t-overview-item {
  flex: 1;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.t-ov-num {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.t-ov-label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

/* 学科卡片网格 */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 20px 16px;
}

.subject-card {
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.subject-card:active {
  transform: scale(0.93);
}

.subj-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.subj-name {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 2px;
}

.subj-info {
  font-size: 10px;
  color: #64748B;
  margin-bottom: 2px;
}

.subj-rate {
  font-size: 10px;
  color: #10B981;
  font-weight: 600;
}

.subj-rate-gray {
  color: #94A3B8;
}

/* 作业列表卡片 */
.teacher-hw-list {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teacher-hw-card {
  padding: 14px;
}

.thw-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.thw-subject {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.thw-content {
  font-size: 13px;
  color: #64748B;
}

.thw-rate {
  text-align: right;
}

.thw-rate-num {
  font-size: 20px;
  font-weight: 700;
  color: #FFD166;
  line-height: 1;
}

.thw-rate-label {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.thw-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.thw-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD166, #60A5FA);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.thw-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94A3B8;
  margin-bottom: 10px;
}

.thw-report-btn {
  width: 100%;
  padding: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: #FFD166;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.thw-report-btn:active {
  background: rgba(59, 130, 246, 0.2);
}

/* 热门题目列表 */
.teacher-hot-list {
  margin: 0 20px 16px;
  padding: 6px 14px;
}

.hot-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
  gap: 10px;
}

.hot-item:last-child {
  border-bottom: none;
}

.hot-rank {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hot-item:nth-child(2) .hot-rank {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

.hot-item:nth-child(3) .hot-rank {
  background: linear-gradient(135deg, #94A3B8, #CBD5E1);
}

.hot-q {
  flex: 1;
  font-size: 13px;
  color: #334155;
}

.hot-count {
  font-size: 11px;
  color: #F97316;
  font-weight: 600;
}

/* 表单样式 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  color: #1E293B;
  background: #F8FAFC;
  box-sizing: border-box;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: #FFD166;
  background: #fff;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* 难度选择 */
.diff-select {
  display: flex;
  gap: 8px;
}

.diff-opt {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 12px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
  background: #F8FAFC;
}

.diff-opt.active {
  border-color: #FFD166;
  background: rgba(59, 130, 246, 0.1);
  color: #FFD166;
  font-weight: 600;
}

.diff-opt:active {
  transform: scale(0.95);
}

/* 弹窗操作按钮 */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-outline {
  flex: 1;
  padding: 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #64748B;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:active {
  background: #F1F5F9;
}

.btn-primary {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #FFD166, #FF8A65);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s;
}

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

/* 发布成功提示 */
.assign-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  padding: 30px 40px;
  border-radius: 20px;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.assign-success.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.assign-success-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.assign-success-text {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}

.assign-success-sub {
  font-size: 13px;
  color: #64748B;
}

/* 滚动条美化 */
.main-container::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.main-container::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* ================================
   布置作业三步向导
   ================================ */

.assign-modal {
  max-width: 380px;
  width: 90%;
}

.assign-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(74, 63, 53, 0.08);
  color: rgba(74, 63, 53, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-item.active .step-num {
  background: linear-gradient(135deg, #FF9A76, #FFB347);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 154, 118, 0.35);
}

.step-item.done .step-num {
  background: linear-gradient(135deg, #10B981, #34D399);
  color: #fff;
}

.step-label {
  font-size: 11px;
  color: rgba(74, 63, 53, 0.45);
  transition: color 0.3s ease;
}

.step-item.active .step-label {
  color: #FF9A76;
  font-weight: 600;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(74, 63, 53, 0.08);
  margin: 0 8px 20px 8px;
  border-radius: 1px;
}

/* 步骤面板 */
.assign-step {
  display: none;
  animation: stepSlideIn 0.3s ease;
}

.assign-step.active {
  display: block;
}

@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.assign-step-title {
  font-size: 18px;
  font-weight: 600;
  color: #4A3F35;
  margin-bottom: 16px;
  text-align: center;
}

/* 学科选择网格 */
.assign-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.assign-subj-card {
  background: rgba(74, 63, 53, 0.04);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.assign-subj-card:active {
  transform: scale(0.95);
}

.assign-subj-card:hover {
  background: rgba(255, 154, 118, 0.08);
}

.assign-subj-card.active {
  border-color: #FF9A76;
  background: rgba(255, 154, 118, 0.12);
}

.as-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.as-name {
  font-size: 13px;
  color: #4A3F35;
  font-weight: 500;
}

/* 班级选择列表 */
.assign-class-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.assign-class-card {
  background: rgba(74, 63, 53, 0.04);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.assign-class-card:active {
  transform: scale(0.98);
}

.assign-class-card.active {
  border-color: #FF9A76;
  background: rgba(255, 154, 118, 0.12);
}

.ac-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  background: rgba(74, 63, 53, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ac-info {
  flex: 1;
}

.ac-name {
  font-size: 15px;
  font-weight: 600;
  color: #4A3F35;
  margin-bottom: 2px;
}

.ac-count {
  font-size: 12px;
  color: #8A7B6E;
}

.ac-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(74, 63, 53, 0.08);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.assign-class-card.active .ac-check {
  background: #10B981;
  color: #fff;
}

.assign-tip {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 8px;
}

/* 底部按钮区 */
.assign-actions {
  margin-top: 20px;
  gap: 8px;
}

.assign-actions .btn-primary {
  flex: 1.5;
}

.assign-actions .btn-outline {
  flex: 1;
}

/* ===== 教师身份设定页 ===== */
.t-setup-wrap {
  padding: 24px 20px 120px;
}

.t-setup-header {
  text-align: center;
  margin-bottom: 32px;
}

.t-setup-icon {
  font-size: 56px;
  margin-bottom: 12px;
  animation: wormFloat 3s ease-in-out infinite;
}

.t-setup-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
}

.t-setup-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

.t-setup-step {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.t-setup-step-title {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.t-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB74D, #FF8A65);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-setup-subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.t-subj-card {
  background: #F8FAFC;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.t-subj-card:active {
  transform: scale(0.95);
}

.t-subj-card.active {
  border-color: #FFB74D;
  background: #EEF2FF;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.t-subj-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.t-subj-name {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

.t-subj-card.active .t-subj-name {
  color: #FF8A65;
  font-weight: 600;
}

.t-setup-class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.t-class-card {
  background: #F8FAFC;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.t-class-card:active {
  transform: scale(0.95);
}

.t-class-card.active {
  border-color: #FFB74D;
  background: #EEF2FF;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.t-class-name {
  font-size: 14px;
  color: #1E293B;
  font-weight: 600;
  margin-bottom: 4px;
}

.t-class-card.active .t-class-name {
  color: #FF8A65;
}

.t-class-count {
  font-size: 12px;
  color: #94A3B8;
}

.t-setup-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  font-size: 16px;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  transition: border-color 0.2s;
}

.t-setup-input:focus {
  border-color: #FFB74D;
  background: #fff;
}

.t-setup-confirm {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #FFB74D, #FF8A65);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transition: all 0.25s ease;
}

.t-setup-confirm:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* ===== 学生身份设定页 ===== */
.student-setup-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.s-setup-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FFFEFC 0%, #FFFCF7 60%, #FFFEFA 100%);
}

.s-setup-wrap {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 380px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUpSoft 0.5s ease-out;
}

@keyframes slideUpSoft {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.s-setup-header {
  text-align: center;
  margin-bottom: 24px;
}

.s-setup-worm {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.s-setup-worm .worm-body {
  animation: wormBounce 2.5s ease-in-out infinite;
}

@keyframes wormBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.s-setup-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}

.s-setup-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.s-setup-step {
  margin-bottom: 20px;
}

.s-step-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.s-class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.s-class-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.s-class-card:hover {
  border-color: #FF8A65;
  background: #f5f3ff;
}

.s-class-card.active {
  border-color: #FF8A65;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(139,92,246,0.25);
}

.s-class-num {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.s-class-card.active .s-class-num {
  color: #6d28d9;
}

.s-class-info {
  font-size: 11px;
  color: #94a3b8;
}

.s-name-input {
  width: 100%;
  height: 46px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 15px;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s;
}

.s-name-input:focus {
  border-color: #FF8A65;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139,92,246,0.1);
}

.s-name-input::placeholder {
  color: #cbd5e1;
}

.s-setup-confirm {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
  transition: all 0.2s;
  margin-top: 8px;
}

.s-setup-confirm:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.s-setup-tip {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin: 16px 0 0;
}

/* =================================
   学习页（番茄钟专注模式）
   ================================= */

.page-study {
  padding: 0 0 30px;
}

.study-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(255, 254, 252, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 1px solid rgba(255, 154, 118, 0.1);
}

.study-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 154, 118, 0.1);
  border: none;
  color: #FF9A76;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.study-back:active {
  transform: scale(0.92);
}

.study-subject {
  font-size: 16px;
  font-weight: 600;
  color: #4A3B37;
}

/* 小书虫陪伴区 */
.study-worm-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 20px 10px;
}

.study-worm {
  flex-shrink: 0;
  animation: wormBob 2s ease-in-out infinite;
}

.study-encourage {
  background: rgba(255,255,255,0.92);
  color: #334155;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 220px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.study-encourage::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid rgba(255,255,255,0.92);
}

/* 朗读按钮 */
.worm-speak-btn {
  align-self: flex-end;
  margin-bottom: 12px;
  margin-left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFB347, #FF9A76);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,154,118,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.worm-speak-btn:active { transform: scale(0.9); }

/* 番茄钟圆环 */
.pomodoro-timer {
  display: flex;
  justify-content: center;
  padding: 20px 0 30px;
}

.timer-circle {
  position: relative;
  width: 260px;
  height: 260px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 12;
}

.timer-progress {
  fill: none;
  stroke: url(#timerGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  stroke: #F97316;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-time {
  font-size: 52px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 8px;
}

.timer-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* 作业信息卡 */
.study-info {
  margin: 0 20px 20px;
  padding: 16px 18px;
}

.study-task-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.study-task-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

/* 操作按钮 */
.study-actions {
  display: flex;
  gap: 12px;
  padding: 0 20px 16px;
}

.study-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.study-btn:active {
  transform: scale(0.96);
}

.ask-btn {
  background: rgba(255, 255, 255, 0.8);
  color: #FF9A76;
  border: 1px solid rgba(255, 154, 118, 0.3);
}

.done-btn {
  background: linear-gradient(135deg, #FF9A76, #FFB899);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 154, 118, 0.35);
}

/* 控制按钮 */
.study-controls {
  display: flex;
  gap: 12px;
  padding: 0 20px;
}

.ctrl-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #6B5B57;
  border: 1px solid rgba(255, 154, 118, 0.2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-btn:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.15);
}

/* 小书虫浮动动画 */
@keyframes wormBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 作业卡片可点击效果 */
.hw-item {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ========== 完成反馈页样式 ========== */
.complete-cele {
  text-align: center;
  padding: 30px 20px 15px;
}

.complete-icon {
  font-size: 56px;
  margin-bottom: 10px;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.complete-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.complete-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

/* 虫虫表扬区 */
.complete-worm-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 10px;
  justify-content: center;
}

.complete-worm {
  flex-shrink: 0;
  animation: wormBob 2.5s ease-in-out infinite;
  transform: scale(0.8);
}

.complete-praise-bubble {
  background: rgba(255,255,255,0.95);
  color: #1E293B;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 200px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.complete-praise-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: rgba(255,255,255,0.95);
}

/* 统计卡 */
.complete-stats {
  display: flex;
  gap: 12px;
  margin: 0 20px 20px;
}

.complete-stat {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
}

.complete-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: #F97316;
  line-height: 1;
  margin-bottom: 6px;
}

.complete-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* 反馈区块 */
.feedback-section {
  margin: 0 20px 14px;
}

.feedback-q {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  margin: 0 0 8px;
  font-weight: 500;
}

.difficulty-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.diff-btn {
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px 2px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.diff-btn span {
  font-size: 11px;
}

.diff-btn:hover {
  background: rgba(255,255,255,0.18);
}

.diff-btn.selected {
  background: rgba(249, 115, 22, 0.2);
  border-color: #F97316;
  color: #fff;
  transform: scale(1.05);
}

.feedback-input,
.feedback-textarea {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.feedback-textarea {
  min-height: 50px;
  resize: vertical;
}

.feedback-input::placeholder,
.feedback-textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.feedback-input:focus,
.feedback-textarea:focus {
  border-color: #F97316;
  background: rgba(255,255,255,0.15);
}

/* 提示文字 */
.feedback-hint {
  text-align: center;
  color: #F43F5E;
  font-size: 13px;
  margin: 0 20px 12px;
  padding: 8px 12px;
  background: rgba(244, 63, 94, 0.15);
  border-radius: 8px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.page-subject-complete .big-btn {
  margin: 6px 20px 20px;
  width: calc(100% - 40px);
  padding: 12px;
  font-size: 15px;
}

/* ========== AI 讲解建议 ========== */
.tr-ai-suggest {
  background: linear-gradient(135deg, rgba(255,186,150,0.15), rgba(139,92,246,0.1));
  border: 1px solid rgba(255,160,120,0.3);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--t-body, #4A3B38);
  white-space: pre-line;
}

.tr-ai-suggest .ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--t-sub, #9C8A85);
  font-style: italic;
}

.tr-ai-suggest .dots {
  display: inline-flex;
  gap: 3px;
}
.tr-ai-suggest .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary, #FF8A65);
  animation: aiBounce 1.2s infinite ease-in-out;
}
.tr-ai-suggest .dots i:nth-child(2) { animation-delay: 0.15s; }
.tr-ai-suggest .dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ========== 教师端学生完成情况 ========== */
.tr-diff-charts {
  display: flex;
  gap: 16px;
}

.tr-diff-col {
  flex: 1;
  text-align: center;
}

.tr-diff-label {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 8px;
}

.tr-summary-line {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #F1F5F9;
  border-radius: 8px;
}

.tr-student-list {
  max-height: 400px;
  overflow-y: auto;
}

.tr-student-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.tr-student-item:last-child {
  border-bottom: none;
}

.tr-student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A65, #FFD166);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
}

.tr-student-info {
  flex: 1;
  min-width: 0;
}

.tr-student-name {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  margin-bottom: 4px;
}

.tr-student-class {
  font-size: 12px;
  color: #64748B;
}

.tr-student-stats {
  text-align: right;
  flex-shrink: 0;
}

.tr-student-time {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}

.tr-student-time span {
  font-size: 11px;
  font-weight: 400;
  color: #64748B;
}

.tr-diff-tags {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.tr-diff-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.tr-diff-tag.easy { background: #D1FAE5; color: #059669; }
.tr-diff-tag.mid-easy { background: #DBEAFE; color: #2563EB; }
.tr-diff-tag.mid-hard { background: #FEF3C7; color: #D97706; }
.tr-diff-tag.hard { background: #FEE2E2; color: #DC2626; }

.tr-student-hard {
  font-size: 12px;
  color: #64748B;
  margin-top: 6px;
  padding: 6px 10px;
  background: #F8FAFC;
  border-radius: 6px;
  border-left: 3px solid #F97316;
}

.tr-empty-students {
  text-align: center;
  padding: 30px 20px;
  color: #94A3B8;
  font-size: 14px;
}

.hw-item:active {
  transform: scale(0.98);
}

/* 完成反馈页 */
.page-subject-complete {
  padding: 30px 24px 24px;
  overflow-y: auto;
  max-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

.complete-cele {
  text-align: center;
  margin-bottom: 16px;
}

.complete-icon {
  font-size: 48px;
  margin-bottom: 8px;
  animation: bounceIn 0.6s ease;
}

.complete-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.complete-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.complete-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 16px;
  margin-bottom: 20px;
}

.complete-stat {
  text-align: center;
}

.complete-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: #F97316;
  margin-bottom: 2px;
}

.complete-stat-label {
  font-size: 12px;
  color: #64748b;
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* =================================
   温暖奶油风主题（覆盖深色旧版）
   ================================= */

:root {
  /* 主色：蜜桃橙 + 暖杏黄（干净通透） */
  --c-primary: #FF9A76;
  --c-primary-soft: #FFB899;
  --c-accent: #FFCF7B;
  --c-worm: #7DD9A8;
  --c-worm-deep: #4ECB8E;

  /* 背景：接近米白，极淡暖调（干净清爽） */
  --bg-1: #FFFEFC;
  --bg-2: #FFFCF7;
  --bg-3: #FFFEFA;
  --glow-1: rgba(255, 207, 123, 0.08);
  --glow-2: rgba(255, 154, 118, 0.06);

  /* 文字：更浅一度，更柔和 */
  --t-title: #4A3B37;
  --t-body: #7A6B67;
  --t-sub: #B8A8A2;

  /* 玻璃卡片（更轻更透） */
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(255, 154, 118, 0.15);
  --card-shadow: 0 6px 24px rgba(255, 154, 118, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
}

/* 背景替换：奶白米杏 + 极淡柔光 */
#app {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
}

#app::before {
  background: var(--glow-1);
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  filter: blur(120px);
  opacity: 1;
}

#app::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -40px;
  width: 260px;
  height: 260px;
  background: var(--glow-2);
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 1;
}

/* 文字颜色统一替换 */
body { color: var(--t-body); }

/* 主标题色 */
.greeting-title,
.section-title,
.study-task-name,
.modal-title,
.page-title {
  color: var(--t-title) !important;
}

/* 玻璃卡片统一 */
.glass-card,
.homework-card,
.stats-card,
.wrong-card,
.report-card,
.teacher-card,
.t-home-card,
.tr-question-item,
.tr-student-item,
.setup-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius) !important;
  box-shadow: 0 6px 24px rgba(255, 154, 118, 0.10) !important;
}

/* 主按钮统一 */
.btn-primary,
.btn-main,
.assign-submit-btn,
#completeSubmitBtn,
.pomodoro-btn,
.study-control-btn {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-soft) 100%) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 16px !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 20px rgba(255, 138, 101, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:active,
.btn-main:active,
.assign-submit-btn:active {
  transform: scale(0.96);
  box-shadow: 0 3px 10px rgba(255, 138, 101, 0.3) !important;
}

/* 底部 Tab 栏暖色 */
.bottom-tab,
.bottom-tab-bar {
  background: rgba(255, 248, 240, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 138, 101, 0.15) !important;
}

.bottom-tab-bar .tab-item,
.tab-item {
  color: var(--t-sub) !important;
}

.bottom-tab-bar .tab-label {
  color: var(--t-sub) !important;
}

.bottom-tab-bar .tab-item.active,
.tab-item.active {
  color: var(--c-primary) !important;
}

.bottom-tab-bar .tab-item.active .tab-label {
  color: var(--c-primary) !important;
}

.bottom-tab-bar .tab-item.active .tab-icon {
  filter: drop-shadow(0 3px 8px rgba(255, 154, 118, 0.4)) !important;
}

/* 进度条暖色 */
.hw-progress-fill,
.progress-bar-fill {
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent)) !important;
}

/* 小书虫颜色微调（已在页面元素中，这里调整体呼吸动效） */
@keyframes wormBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

.worm-breath {
  animation: wormBreath 2.5s ease-in-out infinite;
}

/* 桌面端居中（最大宽度480px，像一本书） */
@media (min-width: 768px) {
  #app {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(214, 154, 120, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
  }
}

/* ===== 统一返回键（左上角） ===== */
.page-back-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 154, 118, 0.14);
  border: 1px solid rgba(255, 154, 118, 0.25);
  color: #FF9A76;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.15s ease;
  font-family: inherit;
  padding: 0;
}
.page-back-btn:active {
  transform: scale(0.9);
  background: rgba(255, 154, 118, 0.28);
}
/* 非激活页面隐藏返回键 */
.page:not(.active) .page-back-btn {
  display: none !important;
}
/* 桌面端居中时，返回键限制在app内 */
@media (min-width: 768px) {
  .page-back-btn {
    left: calc(50% - 240px + 14px);
  }
}
/* 学习页标题避让返回键 */
.study-subject {
  padding-left: 44px;
  text-align: center;
  padding-right: 44px;
}

/* 首页头部避让返回键 */
.home-header {
  padding-left: 54px;
}

/* 聊天页头部避让返回键 */
.chat-header {
  padding-left: 54px;
}

/* 错题本头部避让返回键 */
.mistakes-header,
.page-header {
  padding-left: 54px;
}

/* 报告页头部避让返回键 */
.report-header {
  padding-left: 54px;
}

/* 个人页头部避让返回键 */
.profile-header {
  padding-left: 54px;
}

/* =================================
   文字颜色全面适配浅色背景
   （所有在浅色背景上的白色文字改为深色）
   ================================= */

/* 开屏页 */
.splash-greeting,
.splash-title,
.splash-subtitle,
.splash-quote {
  color: var(--t-title) !important;
}

/* 心情签到页 */
.mood-title,
.mood-subtitle,
.mood-reason-title,
.mood-input::placeholder,
.mood-step-dot span {
  color: var(--t-title) !important;
}
.mood-input {
  color: var(--t-body) !important;
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(255, 138, 101, 0.3) !important;
}
.mood-reason-tag {
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--t-body) !important;
  border: 1px solid rgba(255, 138, 101, 0.25) !important;
}
.mood-reason-tag.selected {
  background: var(--c-primary) !important;
  color: #fff !important;
  border-color: var(--c-primary) !important;
}

/* 角色选择页 */
.role-title,
.role-subtitle,
.role-name,
.role-desc {
  color: var(--t-title) !important;
}
.role-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
}

/* 首页问候 */
.greeting-name,
.greeting-text,
.greeting-sub {
  color: var(--t-title) !important;
}

/* 章节/区块标题 */
.section-title,
.section-title-w,
.page-title,
.modal-title {
  color: var(--t-title) !important;
}

/* 彩色渐变卡片上的文字（紫/橙/绿卡片）——保持白色，但卡片改用浅底深字 */
.card-purple,
.card-orange,
.card-green {
  background: rgba(255, 255, 255, 0.75) !important;
  color: var(--t-title) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
}
.card-purple .card-num,
.card-purple .card-label,
.card-orange .card-num,
.card-orange .card-label,
.card-green .card-num,
.card-green .card-label {
  color: var(--t-title) !important;
}

/* 虫虫问候卡 */
.worm-greeting-card {
  color: var(--t-body) !important;
  background: rgba(255, 255, 255, 0.75) !important;
}

/* 作业卡片 */
.homework-card .hw-subject,
.homework-card .hw-title,
.homework-card .hw-meta,
.homework-card .hw-time {
  color: var(--t-title) !important;
}
.homework-card .hw-sub {
  color: var(--t-sub) !important;
}

/* 番茄钟页（学习页） */
.study-back {
  color: var(--t-title) !important;
}
.study-subject,
.timer-time,
.timer-label,
.pomo-hw-title,
.pomo-hw-sub {
  color: var(--t-title) !important;
}
.encourage-bubble {
  color: var(--t-body) !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

/* 报告卡 */
.report-card,
.report-card .report-title,
.report-card .report-num,
.report-card .report-label,
.report-card .report-sub {
  color: var(--t-title) !important;
}
.report-card .report-desc {
  color: var(--t-body) !important;
}

/* 错题本 */
.wb-stat-num,
.wb-stat-label {
  color: var(--t-title) !important;
}
.wb-subj-tab {
  color: var(--t-sub) !important;
  background: transparent !important;
}
.wb-subj-tab.active {
  color: var(--c-primary) !important;
  background: rgba(255, 138, 101, 0.12) !important;
}
.wb-upload-btn {
  color: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
  background: transparent !important;
}
.wrong-card .wrong-title,
.wrong-card .wrong-meta,
.wrong-card .wrong-subject {
  color: var(--t-title) !important;
}
.wrong-card .wrong-tag {
  color: var(--t-sub) !important;
}

/* 错题详情页 */
.wd-back-btn,
.wd-title,
.wd-step-title,
.wd-step-text,
.wd-ai-suggest {
  color: var(--t-title) !important;
}
.wd-step-num {
  background: var(--c-primary) !important;
  color: #fff !important;
}
.wd-master-btn {
  color: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
  background: transparent !important;
}

/* 聊天页 */
.chat-header-info .name,
.chat-header-info .status {
  color: var(--t-title) !important;
}
.msg-row.bot .msg-bubble {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--t-body) !important;
  border: 1px solid var(--card-border) !important;
}
.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-soft)) !important;
  color: #fff !important;
}
.chat-input {
  background: rgba(255, 255, 255, 0.85) !important;
  color: var(--t-body) !important;
  border-color: rgba(255, 138, 101, 0.3) !important;
}
.chat-input::placeholder {
  color: var(--t-sub) !important;
}

/* 聊天页：输入区 / 语音按钮 / 朗读开关 / 悬浮小虫 */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 138, 101, 0.12);
}
.chat-input-area .chat-input { flex: 1; }
.chat-send {
  flex-shrink: 0;
  padding: 0 18px; height: 38px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--c-primary, #FF9A76), var(--c-primary-soft, #FFB199));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chat-mic-btn, .chat-mute-btn {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 138, 101, 0.3);
  background: rgba(255, 255, 255, 0.9);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.chat-mic-btn:active, .chat-mute-btn:active { transform: scale(0.92); }
.chat-mic-btn.recording {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  border-color: #FF6B6B;
  animation: wormPulse 1s infinite;
}
@keyframes wormPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}
.chat-mute-btn { margin-left: auto; }

/* 悬浮小虫：随时打开聊天 */
.floating-worm {
  position: fixed;
  right: 18px; bottom: 84px;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFB199, #FF8E72);
  box-shadow: 0 8px 24px rgba(255, 138, 101, 0.45);
  font-size: 28px; cursor: pointer; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
  animation: wormFloat 2.4s ease-in-out infinite;
}
.floating-worm:active { transform: scale(0.9); }
@keyframes wormFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}


/* 个人资料页 */
.profile-name,
.profile-class,
.profile-level {
  color: var(--t-title) !important;
}
.stat-col .num,
.stat-col .label {
  color: var(--t-title) !important;
}
.medal-name,
.medal-desc {
  color: var(--t-body) !important;
}

/* 教师端 */
.teacher-info h2,
.teacher-info p,
.t-setup-title,
.t-setup-sub,
.t-step-num,
.t-step-title,
.assign-step-title,
.assign-step-desc {
  color: var(--t-title) !important;
}
.t-ov-num,
.t-ov-label,
.t-ov-delta {
  color: var(--t-title) !important;
}
.t-overview-item {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
  backdrop-filter: blur(10px) !important;
}
.t-subj-name,
.t-subj-rate {
  color: var(--t-title) !important;
}
.tr-section-title,
.tr-hot-q,
.tr-hot-meta,
.tr-student-name,
.tr-student-class,
.tr-student-time,
.tr-summary-line,
.tr-diff-label {
  color: var(--t-title) !important;
}
.tr-student-class,
.tr-hot-meta,
.tr-diff-label {
  color: var(--t-sub) !important;
}
.t-header-btn {
  color: var(--c-primary) !important;
  background: rgba(255, 138, 101, 0.1) !important;
}
.teacher-add-btn {
  color: var(--c-primary) !important;
  background: rgba(255, 138, 101, 0.12) !important;
}

/* 完成反馈页 */
.complete-title,
.complete-subtitle,
.complete-time-info,
.complete-diff-label,
.feedback-label,
.complete-sub,
.feedback-q {
  color: var(--t-title) !important;
}
.complete-praise {
  color: var(--t-body) !important;
}
.complete-stat {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid var(--card-border) !important;
}
.complete-stat-label {
  color: var(--t-sub) !important;
}
.diff-btn {
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--t-body) !important;
  border: 1px solid rgba(255, 138, 101, 0.25) !important;
}
.diff-btn.selected {
  background: var(--c-primary) !important;
  color: #fff !important;
  border-color: var(--c-primary) !important;
}
.feedback-input,
.feedback-textarea {
  background: rgba(255, 255, 255, 0.85) !important;
  color: var(--t-body) !important;
  border-color: rgba(255, 138, 101, 0.3) !important;
}
.feedback-input::placeholder,
.feedback-textarea::placeholder {
  color: var(--t-sub) !important;
}

/* 设置页 */
.ac-name,
.ac-sub {
  color: var(--t-title) !important;
}
.assign-class-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid var(--card-border) !important;
}
.assign-class-card.active {
  border-color: var(--c-primary) !important;
  background: rgba(255, 138, 101, 0.08) !important;
}

/* 学科选择/步骤 */
.step-item .step-num {
  background: rgba(255, 138, 101, 0.2) !important;
  color: var(--c-primary) !important;
}
.step-item.active .step-num,
.step-item.done .step-num {
  background: var(--c-primary) !important;
  color: #fff !important;
}

/* 排行榜数字徽章 */
.hot-rank,
.hq-rank {
  color: #fff !important;
}

/* 提交按钮类（有彩色背景的保留白字）——已在主按钮规则中覆盖 */

/* 底部大按钮容器（浅色背景上的文字） */
.ec-title,
.ec-desc {
  color: var(--t-title) !important;
}

/* 设置页等全屏覆盖层背景适配奶油风 */
.student-setup-screen .s-setup-bg,
.teacher-setup-screen .t-setup-bg {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%) !important;
}

/* 虫虫小贴士卡片（首页问候区下方） */
.worm-tip {
  margin: 8px 16px 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 154, 118, 0.15);
  box-shadow: 0 4px 16px rgba(255, 154, 118, 0.08);
}
.worm-tip-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.worm-tip-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--t-body, #5D4F4B);
}

/* 设置页虫虫容器居中 */
.s-setup-worm,
.home-worm,
.chat-header-worm {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 聊天头像虫虫适配 */
.chat-avatar.worm-avatar {
  background: transparent !important;
  font-size: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 虫虫呼吸浮动动画（统一） */
.bounce-in .worm-body,
.worm-body.small {
  animation: wormBreath 2.5s ease-in-out infinite;
}

@keyframes wormBreath {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

/* 输入框通用 */
input[type="text"],
input[type="number"],
textarea,
select {
  color: var(--t-body) !important;
}
input::placeholder,
textarea::placeholder {
  color: var(--t-sub) !important;
}

/* =================================
   白字彻底扫荡（浅色背景适配）
   所有半透明白色文字统一改为深色系
   ================================= */

/* 心情页 */
.mood-desc,
.mood-option span,
.mood-step-dot,
.mood-tip {
  color: var(--t-body) !important;
}
.mood-option.selected {
  background: rgba(255, 138, 101, 0.15) !important;
  border-color: var(--c-primary) !important;
}

/* 角色选择页 */
.role-card .role-icon {
  filter: none !important;
}

/* 首页数据卡 */
.stats-card .stat-num,
.stats-card .stat-label,
.stats-card .stat-unit {
  color: var(--t-title) !important;
}

/* 作业卡片内部文字 */
.hw-subject,
.hw-title,
.hw-desc,
.hw-meta,
.hw-time,
.hw-tag {
  color: var(--t-title) !important;
}
.hw-sub-text {
  color: var(--t-sub) !important;
}

/* 番茄钟页 */
.pomo-sub,
.pomo-label,
.pomo-tip {
  color: var(--t-sub) !important;
}
.pomo-encourage {
  color: var(--t-body) !important;
}

/* 报告页 */
.report-card .report-head,
.report-card .report-body,
.report-card .report-foot,
.report-summary,
.report-achievement,
.report-worm-msg {
  color: var(--t-title) !important;
}

/* 错题本 */
.wb-tab-bar,
.wb-fab {
  background: transparent !important;
}
.wrong-card .wrong-desc {
  color: var(--t-sub) !important;
}

/* 聊天页 */
.chat-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 138, 101, 0.1) !important;
}
.chat-quick-bar {
  background: transparent !important;
}
.chat-quick-item {
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--t-body) !important;
  border: 1px solid rgba(255, 138, 101, 0.2) !important;
}

/* 个人资料页 */
.profile-header {
  background: transparent !important;
}
.profile-level-bar {
  background: rgba(255, 138, 101, 0.15) !important;
}
.medal-item {
  background: rgba(255, 255, 255, 0.6) !important;
}

/* 开屏虫虫气泡 */
.splash-card {
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--t-body) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
}

/* 心情选项按钮 */
.mood-btn,
.mood-next-btn {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-soft)) !important;
  color: #fff !important;
  border: none !important;
}

/* 设置页步骤 */
.setup-step-desc {
  color: var(--t-sub) !important;
}

/* 通用：任何 rgba(255,255,255, 透明度) 的文字颜色 → 用深色替代
   注意：不覆盖按钮、徽章等有彩色背景的元素 */
.complete-sub,
.feedback-q,
.complete-stat-label,
.hw-progress-text,
.t-ov-label,
.profile-exp,
.level-text {
  color: var(--t-sub) !important;
}

/* ===== 首页头部 ===== */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
  gap: 12px;
}
.home-greeting { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-worm { width: 52px; height: 62px; flex-shrink: 0; }
.home-hi { font-size: 20px; font-weight: 700; color: var(--t-title, #4A3F35); line-height: 1.3; }
.home-sub { font-size: 13px; color: var(--t-sub, #8A7B6E); margin-top: 2px; }
.home-points {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  background: rgba(255,183,77,0.18);
  color: #E8833A; font-weight: 700; font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
}

/* ===== 首页统计卡 ===== */
.home-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 18px;
  padding: 16px 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,154,118,0.12);
  box-shadow: 0 4px 16px rgba(255,154,118,0.06);
}
.stat-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 20px; font-weight: 800; color: var(--t-title, #4A3F35); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--t-sub, #8A7B6E); }
.stat-divider { width: 1px; height: 28px; background: rgba(74,63,53,0.08); flex-shrink: 0; }

/* ===== 区块标题 ===== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 20px 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--t-title, #4A3F35);
}


/* ===== AI 出题按钮 ===== */
.btn-ai {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 154, 118, 0.35);
  background: rgba(255, 154, 118, 0.1);
  color: #F97316;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ai:hover { background: rgba(255, 154, 118, 0.2); }
.btn-ai:active { transform: scale(0.98); }
.btn-ai:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 减负账单卡片 ===== */
.saving-bill {
  margin: 12px 18px 0;
  padding: 16px 20px;
  border-radius: var(--radius, 20px);
  background: linear-gradient(135deg, rgba(255,154,118,0.15), rgba(255,209,102,0.2));
  border: 1px solid rgba(255, 154, 118, 0.25);
  box-shadow: 0 4px 16px rgba(255, 154, 118, 0.12);
}
.sb-title {
  font-size: 13px;
  color: #B8725B;
  margin-bottom: 6px;
  font-weight: 600;
}
.sb-time {
  font-size: 26px;
  font-weight: 800;
  color: #E8672D;
  line-height: 1.2;
}
.sb-sub {
  font-size: 12px;
  color: #9A7A6E;
  margin-top: 4px;
}

/* ===== 周报弹窗 ===== */
.weekly-report {
  max-height: 50vh;
  overflow-y: auto;
  padding: 14px;
  background: rgba(255,255,255,0.6);
  border-radius: 12px;
  line-height: 1.7;
  font-size: 14px;
  color: #4A3B37;
  white-space: pre-wrap;
}

/* ===== AI 今日教学决策卡 ===== */
.ai-decision-card {
  margin: 12px 18px 4px;
  padding: 14px 16px;
  border: 1px solid rgba(139,92,246,.35);
  box-shadow: 0 0 0 1px rgba(139,92,246,.12), 0 8px 30px rgba(139,92,246,.15);
  background: linear-gradient(180deg, rgba(139,92,246,.10), rgba(255,255,255,.55));
  position: relative;
  overflow: hidden;
}
.ai-decision-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #8B5CF6, transparent);
  animation: adcShimmer 3s ease-in-out infinite;
}
@keyframes adcShimmer { 0% { left: -100%; } 100% { left: 100%; } }
.adc-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.adc-badge {
  font-size:11px; padding:2px 8px; border-radius:999px;
  background:linear-gradient(135deg,#8B5CF6,#A78BFA); color:#fff;
  font-weight: 600;
}
.adc-title { font-weight:700; color:#5B21B6; font-size:15px; }
.adc-typing { color:#94A3B8; font-size:13px; display:flex; align-items:center; gap:6px; }
.adc-dot { width:7px; height:7px; border-radius:50%; background:#8B5CF6; animation:pulseDot 1s infinite; }
@keyframes pulseDot { 0%,100%{opacity:.3} 50%{opacity:1} }
.adc-text { white-space:pre-line; line-height:1.75; color:#334155; font-size:14px; }
