/* ===== 全局 ===== */
.app-view {
  background-color: #f5f6fa;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #2c3e50;
  box-sizing: border-box;
}

.container {
  padding: 12px;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.btn-primary {
  background: #e74c3c;
  color: #fff;
  border-radius: 24px;
  font-size: 16px;
  padding: 10px 24px;
  text-align: center;
  border: none;
}

.btn-primary::after {
  border: none;
}


/* ===== 视图: welcome ===== */

#view-welcome .page{
  min-height: 100vh;
  background: linear-gradient(180deg, #eef1f4 0%, #f5f6fa 30%, #f5f6fa 100%);
  padding: 0 16px;
  box-sizing: border-box;
}
#view-welcome .hero{
  padding: 35px 0 20px;
  text-align: center;
}
#view-welcome .hero-img{
  width: 170px;
  height: 170px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
#view-welcome .hero-title{
  font-size: 29px;
  font-weight: 700;
  color: #34495e;
  letter-spacing: 1px;
}
#view-welcome .hero-sub{
  font-size: 13px;
  color: rgba(44, 62, 80, 0.6);
  margin-top: 6px;
}
#view-welcome .quick-search{
  margin: 3px 0 2px;
}
#view-welcome .qs-box{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 22px;
  padding: 0 14px;
  height: 41px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#view-welcome .qs-icon{
  font-size: 14px;
  margin-right: 7px;
}
#view-welcome .qs-input{
  flex: 1;
  font-size: 13.5px;
  color: #2c3e50;
}
#view-welcome .qs-clear{
  font-size: 13px;
  color: #bdc3c7;
  padding: 5px;
}
#view-welcome .qs-results{
  padding: 7px 0 15px;
}
#view-welcome .qs-group-title{
  font-size: 12.5px;
  font-weight: 700;
  color: #7f8c8d;
  margin: 9px 4px 7px;
}
#view-welcome .qs-item{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-welcome .qs-item:active{
  background: #f0f3f5;
}
#view-welcome .qs-item-main{
  flex: 1;
  min-width: 0;
}
#view-welcome .qs-item-text{
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.5;
}
#view-welcome .qs-item-word{
  font-size: 14.5px;
  font-weight: 600;
  color: #2c3e50;
  display: block;
}
#view-welcome .qs-item-zh{
  font-size: 11px;
  color: #95a5a6;
  display: block;
  margin-top: 3px;
}
#view-welcome .qs-item-tag{
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 9px;
  color: #fff;
  flex-shrink: 0;
}
#view-welcome .tag-biology{ background: #27ae60; }
#view-welcome .tag-physics{ background: #3498db; }
#view-welcome .tag-chemistry{ background: #e74c3c; }
#view-welcome .qs-empty{
  text-align: center;
  color: #95a5a6;
  font-size: 12.5px;
  padding: 35px 0;
}
#view-welcome .entry-list{
  margin-top: 11px;
}
#view-welcome .entry-bar{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
#view-welcome .entry-bar:active{
  transform: scale(0.98);
}
#view-welcome .entry-icon{
  font-size: 30px;
  margin-right: 10px;
}
#view-welcome .entry-text{
  flex: 1;
}
#view-welcome .entry-name{
  font-size: 19px;
  font-weight: 700;
  color: #2c3e50;
}
#view-welcome .entry-desc{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 3px;
}
#view-welcome .entry-arrow{
  font-size: 24px;
  color: #ddd;
}
#view-welcome .footer{
  text-align: center;
  margin-top: 50px;
  padding-bottom: 20px;
}
#view-welcome .footer-line{
  display: block;
  font-size: 10px;
  color: #95a5a6;
  line-height: 1.8;
}

/* ===== 视图: subjects ===== */

#view-subjects .subjects-page{
  min-height: 100vh;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 35%, #f5f6fa 35%, #f5f6fa 100%);
  padding: 0 16px;
}
#view-subjects .header{
  padding: 30px 0 25px;
  text-align: center;
}
#view-subjects .header-img{
  width: 110px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
#view-subjects .header-title{
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
#view-subjects .header-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
}
#view-subjects .subject-list{
  margin-top: 15px;
}
#view-subjects .g-card{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
#view-subjects .g-card:active{
  transform: scale(0.98);
}
#view-subjects .bio-card{ border-left: 5px solid #27ae60; }
#view-subjects .chem-card{ border-left: 5px solid #e74c3c; }
#view-subjects .phys-card{ border-left: 5px solid #3498db; }
#view-subjects .g-icon{
  font-size: 30px;
  margin-right: 14px;
}
#view-subjects .g-info{ flex: 1; }
#view-subjects .g-name{
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
}
#view-subjects .g-count{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 3px;
}
#view-subjects .g-arrow{
  font-size: 24px;
  color: #ddd;
}
#view-subjects .quick-search{
  margin-top: 5px;
}
#view-subjects .qs-box{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 22px;
  padding: 0 14px;
  height: 41px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
#view-subjects .qs-icon{
  font-size: 14px;
  margin-right: 7px;
}
#view-subjects .qs-input{
  flex: 1;
  font-size: 13.5px;
  color: #2c3e50;
}
#view-subjects .qs-clear{
  font-size: 13px;
  color: #bdc3c7;
  padding: 5px;
}
#view-subjects .qs-results{
  padding: 10px 0 15px;
}
#view-subjects .qs-item{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
#view-subjects .qs-item:active{
  background: #f0f3f5;
}
#view-subjects .qs-item-main{
  flex: 1;
  min-width: 0;
}
#view-subjects .qs-item-text{
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.5;
}
#view-subjects .qs-item-tag{
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 9px;
  color: #fff;
  flex-shrink: 0;
}
#view-subjects .tag-biology{ background: #27ae60; }
#view-subjects .tag-physics{ background: #3498db; }
#view-subjects .tag-chemistry{ background: #e74c3c; }
#view-subjects .qs-empty{
  text-align: center;
  color: #95a5a6;
  font-size: 12.5px;
  padding: 35px 0;
}
#view-subjects .selftest-entry{
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 12px;
  padding: 16px 15px;
  margin-top: 6px;
  box-shadow: 0 3px 11px rgba(44,62,80,0.28);
}
#view-subjects .selftest-entry:active{
  transform: scale(0.98);
}
#view-subjects .se-icon{
  font-size: 28px;
  margin-right: 11px;
}
#view-subjects .se-body{ flex: 1; }
#view-subjects .se-name{
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
#view-subjects .se-desc{
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  line-height: 1.5;
}
#view-subjects .se-arrow{
  font-size: 24px;
  color: rgba(255,255,255,0.5);
}

/* ===== 视图: selftest ===== */

#view-selftest .selftest-page{
  min-height: 100vh;
  background: #f5f6fa;
  padding: 15px 14px 30px;
  box-sizing: border-box;
}
#view-selftest .setup-head{
  text-align: center;
  padding: 10px 0 15px;
}
#view-selftest .setup-title{
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
}
#view-selftest .setup-sub{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 6px;
}
#view-selftest .cfg-block{
  background: #fff;
  border-radius: 10px;
  padding: 14px 13px;
  margin-bottom: 13px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
#view-selftest .cfg-label{
  font-size: 13.5px;
  font-weight: 700;
  color: #34495e;
  margin-bottom: 11px;
}
#view-selftest .cfg-options{
  display: flex;
  flex-wrap: wrap;
}
#view-selftest .cfg-opt{
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  color: #555;
  padding: 11px 5px;
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  margin-right: 8px;
  background: #fafbfc;
  min-width: 75px;
}
#view-selftest .cfg-opt:last-child{ margin-right: 0; }
#view-selftest .cfg-opt.opt-on{
  color: #fff;
  border-color: transparent;
  background: #2c3e50;
  font-weight: 700;
}
#view-selftest .cfg-opt.opt-bio.opt-on{ background: #27ae60; }
#view-selftest .cfg-opt.opt-phy.opt-on{ background: #3498db; }
#view-selftest .cfg-opt.opt-chem.opt-on{ background: #e74c3c; }
#view-selftest .start-btn{
  margin-top: 7px;
  background: #2c3e50;
  color: #fff;
  font-size: 15.5px;
  border-radius: 22px;
  padding: 8px 0;
}
#view-selftest .start-btn[disabled]{
  background: #bdc3c7;
  color: #fff;
}
#view-selftest .quiz-info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 13px;
}
#view-selftest .quiz-tip{ font-size: 11.5px; font-weight: 400; opacity: 0.9; }
#view-selftest .q-block{
  background: #fff;
  border-radius: 9px;
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-selftest .q-head{
  display: flex;
  align-items: flex-start;
}
#view-selftest .q-no{
  font-size: 16px;
  font-weight: 700;
  margin-right: 8px;
  line-height: 1.3;
}
#view-selftest .q-text{
  flex: 1;
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.55;
  font-weight: 600;
}
#view-selftest .q-meta{
  font-size: 10px;
  color: #b2bec3;
  margin: 5px 0 7px 24px;
}
#view-selftest .q-input{
  width: 100%;
  box-sizing: border-box;
  background: #f7f8fa;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
  color: #2c3e50;
  min-height: 45px;
}
#view-selftest .submit-btn{
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
  border-radius: 22px;
  padding: 7.5px 0;
}
#view-selftest .score-card{
  background: #fff;
  border-radius: 11px;
  padding: 18px 15px 14px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 2px 9px rgba(0,0,0,0.07);
}
#view-selftest .score-label{
  font-size: 13px;
  color: #95a5a6;
}
#view-selftest .score-value{
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 3px 0 12px;
}
#view-selftest .score-unit{ font-size: 17px; font-weight: 500; }
#view-selftest .score-row{
  display: flex;
  border-top: 1px solid #f0f2f4;
  padding-top: 12px;
}
#view-selftest .score-cell{ flex: 1; }
#view-selftest .cell-num{
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
}
#view-selftest .cell-label{
  font-size: 11px;
  color: #95a5a6;
  margin-top: 4px;
}
#view-selftest .score-note{
  font-size: 10px;
  color: #c2c9d0;
  margin-top: 11px;
}
#view-selftest .r-block{
  background: #fff;
  border-radius: 9px;
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-selftest .r-line{
  margin-top: 9px;
  border-radius: 6px;
  padding: 9px 10px;
}
#view-selftest .r-yours{ background: #f5f7fa; }
#view-selftest .r-right{ background: #eafaf1; }
#view-selftest .r-tag{
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #7f8c8d;
  margin-bottom: 4px;
}
#view-selftest .tag-right{ color: #27ae60; }
#view-selftest .r-content{
  font-size: 12.5px;
  color: #444;
  line-height: 1.6;
}
#view-selftest .r-status{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 6px;
}
#view-selftest .status-good{ background: #eafaf1; color: #27ae60; }
#view-selftest .status-partial{ background: #fef5e7; color: #e67e22; }
#view-selftest .status-wrong{ background: #fdedec; color: #e74c3c; }
#view-selftest .result-actions{
  display: flex;
  margin-top: 6px;
}
#view-selftest .ra-btn{
  flex: 1;
  font-size: 14px;
  border-radius: 22px;
  padding: 7.5px 0;
  margin-right: 10px;
}
#view-selftest .ra-btn:last-child{ margin-right: 0; }
#view-selftest .ra-plain{
  background: #fff;
  color: #555;
  border: 1px solid #dfe4e8;
}
#view-selftest .ra-main{ color: #fff; }
#view-selftest .content-layer{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
#view-selftest .bottom-deco{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 310px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#view-selftest .bottom-deco-img{
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.18;
}

/* ===== 视图: index ===== */

#view-index .page{
  padding-bottom: 20px;
}
#view-index .hero{
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  padding: 30px 20px 25px;
  border-radius: 0 0 20px 20px;
  color: #fff;
}
#view-index .hero-title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}
#view-index .hero-subtitle{
  font-size: 14px;
  opacity: 0.85;
  margin-top: 5px;
}
#view-index .hero-stats{
  display: flex;
  align-items: center;
  margin-top: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 0;
}
#view-index .stat-item{
  flex: 1;
  text-align: center;
}
#view-index .stat-num{
  display: block;
  font-size: 22px;
  font-weight: 700;
}
#view-index .stat-label{
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}
#view-index .stat-divider{
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.3);
}
#view-index .search-bar{
  padding: 10px 12px 0;
}
#view-index .search-input-wrap{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-index .search-icon{
  font-size: 14px;
  margin-right: 8px;
}
#view-index .search-input{
  flex: 1;
  font-size: 14px;
  color: #2c3e50;
}
#view-index .search-clear{
  font-size: 14px;
  color: #bdc3c7;
  padding: 0 5px;
}
#view-index .fav-entry{
  display: flex;
  align-items: center;
  margin: 10px 12px 0;
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border-radius: 10px;
  padding: 14px 12px;
  box-shadow: 0 2px 7.5px rgba(243,156,18,0.3);
}
#view-index .fav-icon{
  font-size: 22px;
  margin-right: 10px;
}
#view-index .fav-info{
  flex: 1;
}
#view-index .fav-title{
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
#view-index .fav-desc{
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}
#view-index .fav-arrow{
  font-size: 22px;
  color: rgba(255,255,255,0.7);
}
#view-index .search-results{
  padding: 10px 12px 0;
}
#view-index .section-label{
  font-size: 13px;
  color: #7f8c8d;
  font-weight: 600;
  margin-bottom: 8px;
}
#view-index .no-result{
  text-align: center;
  padding: 30px 0;
  color: #bdc3c7;
  font-size: 14px;
}
#view-index .search-item{
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
#view-index .search-item-tag{
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}
#view-index .search-item-q{
  flex: 1;
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.5;
}
#view-index .chapter-list{
  padding: 10px 12px 0;
}
#view-index .chapter-card{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-index .chapter-card.completed{
  border-left: 4px solid #27ae60;
}
#view-index .chapter-left{
  margin-right: 12px;
}
#view-index .chapter-badge{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
#view-index .badge-done{
  background: #27ae60;
}
#view-index .chapter-mid{
  flex: 1;
}
#view-index .chapter-title{
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
}
#view-index .chapter-subtitle{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 2px;
}
#view-index .chapter-meta{
  font-size: 11px;
  color: #bdc3c7;
  margin-top: 4px;
}
#view-index .progress-bar{
  height: 4px;
  background: #ecf0f1;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
#view-index .progress-fill{
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #f39c12);
  border-radius: 2px;
  transition: width 0.3s;
}
#view-index .chapter-right{
  margin-left: 8px;
  text-align: center;
}
#view-index .progress-text{
  font-size: 13px;
  font-weight: 700;
  color: #e74c3c;
}
#view-index .arrow{
  font-size: 20px;
  color: #ccc;
  margin-top: 2px;
}
#view-index .footer-tip{
  text-align: center;
  font-size: 11px;
  color: #bdc3c7;
  margin-top: 15px;
}

/* ===== 视图: quiz ===== */

#view-quiz .quiz-page{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f6fa;
  padding: 0 12px;
}
#view-quiz .quiz-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 8px;
}
#view-quiz .chapter-info{
  display: flex;
  align-items: center;
}
#view-quiz .chapter-tag{
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
}
#view-quiz .chapter-name{
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}
#view-quiz .counter{
  font-size: 15px;
  font-weight: 700;
  color: #e74c3c;
}
#view-quiz .mode-switch{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
#view-quiz .mode-btn{
  flex: 1;
  text-align: center;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 20px;
  background: #ecf0f1;
  color: #7f8c8d;
  font-weight: 600;
}
#view-quiz .mode-active{
  color: #fff;
}
#view-quiz .fav-btn{
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
#view-quiz .fav-icon{
  font-size: 18px;
  color: #bdc3c7;
}
#view-quiz .fav-active{
  color: #f39c12;
}
#view-quiz .top-progress{
  height: 4px;
  background: #ecf0f1;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
#view-quiz .top-progress-fill{
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #f39c12);
  border-radius: 2px;
}
#view-quiz .flashcard-area{
  display: flex;
  align-items: center;
  justify-content: center;
}
#view-quiz .card-face{
  width: 100%;
  min-height: 250px;
  background: #fff;
  border-radius: 15px;
  padding: 25px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}
#view-quiz .answer-face{
  background: linear-gradient(180deg, #fff 0%, #fdf2f0 100%);
  border: 1px solid #e74c3c;
}
#view-quiz .card-label{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
#view-quiz .question-label{
  color: #95a5a6;
}
#view-quiz .answer-label{
  color: #e74c3c;
}
#view-quiz .card-number{
  font-size: 13px;
  color: #bdc3c7;
  margin-top: 5px;
}
#view-quiz .card-text{
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 21px;
  line-height: 1.7;
  margin: 20px 0;
}
#view-quiz .question-text{
  color: #2c3e50;
  font-weight: 600;
}
#view-quiz .answer-text{
  color: #e74c3c;
  font-size: 19px;
}
#view-quiz .tap-hint{
  text-align: center;
  font-size: 12px;
  color: #bdc3c7;
}
#view-quiz .input-card{
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
#view-quiz .input-question{
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.6;
  margin: 15px 0;
}
#view-quiz .answer-input-area{
  margin-top: 10px;
}
#view-quiz .answer-input{
  width: 100%;
  min-height: 80px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #2c3e50;
  box-sizing: border-box;
}
#view-quiz .show-answer-btn{
  margin-top: 12px;
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  padding: 10px 0;
  border: none;
}
#view-quiz .show-answer-btn::after{
  border: none;
}
#view-quiz .answer-reveal{
  margin-top: 10px;
}
#view-quiz .your-answer{
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
#view-quiz .your-answer-label{
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 600;
  margin-bottom: 4px;
}
#view-quiz .your-answer-text{
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.6;
}
#view-quiz .correct-answer{
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 12px;
  background: #fff5f5;
}
#view-quiz .correct-label{
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
#view-quiz .correct-text{
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.6;
}
#view-quiz .continue-btn{
  margin-top: 12px;
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  padding: 10px 0;
  border: none;
}
#view-quiz .continue-btn::after{
  border: none;
}
#view-quiz .action-bar{
  display: flex;
  gap: 8px;
  padding: 15px 0 25px;
}
#view-quiz .action-btn{
  flex: 1;
  font-size: 14px;
  border-radius: 24px;
  padding: 11px 0;
  text-align: center;
  border: none;
  line-height: 1.4;
}
#view-quiz .action-btn::after{
  border: none;
}
#view-quiz .btn-prev{
  background: #ecf0f1;
  color: #7f8c8d;
}
#view-quiz .btn-prev[disabled]{
  opacity: 0.4;
}
#view-quiz .btn-mark{
  background: #fff;
  color: #f39c12;
  border: 1px solid #f39c12;
}
#view-quiz .btn-mastered{
  background: #27ae60;
  color: #fff;
}
#view-quiz .btn-next{
  background: #e74c3c;
  color: #fff;
}
#view-quiz .done-banner{
  text-align: center;
  padding: 10px;
  background: #fef9e7;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #f39c12;
}
#view-quiz .content-layer{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}
#view-quiz .bottom-deco{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 310px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#view-quiz .bottom-deco-img{
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.18;
}

/* ===== 视图: favorites ===== */

#view-favorites .fav-page{
  min-height: 100vh;
  background: #f5f6fa;
  padding: 12px;
}
#view-favorites .empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
}
#view-favorites .empty-icon{
  font-size: 50px;
  margin-bottom: 15px;
}
#view-favorites .empty-text{
  font-size: 16px;
  color: #2c3e50;
  font-weight: 600;
}
#view-favorites .empty-hint{
  font-size: 12px;
  color: #bdc3c7;
  margin-top: 8px;
}
#view-favorites .list-header{
  margin-bottom: 10px;
}
#view-favorites .list-count{
  font-size: 13px;
  color: #7f8c8d;
  font-weight: 600;
}
#view-favorites .fav-card{
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-favorites .fav-card-header{
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
#view-favorites .fav-ch-tag{
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 6px;
}
#view-favorites .fav-ch-name{
  flex: 1;
  font-size: 12px;
  color: #95a5a6;
}
#view-favorites .fav-delete{
  font-size: 16px;
  padding: 0 5px;
}
#view-favorites .fav-q{
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.5;
  margin-bottom: 8px;
}
#view-favorites .fav-a{
  font-size: 14px;
  color: #e74c3c;
  line-height: 1.6;
  background: #fff5f5;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
#view-favorites .fav-toggle{
  font-size: 12px;
  color: #3498db;
  text-align: center;
  padding: 5px 0;
}

/* ===== 视图: glossary ===== */

#view-glossary .glossary-page{
  min-height: 100vh;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 35%, #f5f6fa 35%, #f5f6fa 100%);
  padding: 0 16px;
}
#view-glossary .header{
  padding: 30px 0 25px;
  text-align: center;
}
#view-glossary .header-img{
  width: 110px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
#view-glossary .header-title{
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
#view-glossary .header-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
}
#view-glossary .subject-list{
  margin-top: 15px;
}
#view-glossary .g-card{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
#view-glossary .g-card:active{
  transform: scale(0.98);
}
#view-glossary .bio-card{ border-left: 5px solid #27ae60; }
#view-glossary .chem-card{ border-left: 5px solid #e74c3c; }
#view-glossary .phys-card{ border-left: 5px solid #3498db; }
#view-glossary .g-icon{
  font-size: 30px;
  margin-right: 14px;
}
#view-glossary .g-info{ flex: 1; }
#view-glossary .g-name{
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
}
#view-glossary .g-count{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 3px;
}
#view-glossary .g-arrow{
  font-size: 24px;
  color: #ddd;
}
#view-glossary .quick-search{
  margin-top: 5px;
}
#view-glossary .qs-box{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 22px;
  padding: 0 14px;
  height: 41px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
#view-glossary .qs-icon{
  font-size: 14px;
  margin-right: 7px;
}
#view-glossary .qs-input{
  flex: 1;
  font-size: 13.5px;
  color: #2c3e50;
}
#view-glossary .qs-clear{
  font-size: 13px;
  color: #bdc3c7;
  padding: 5px;
}
#view-glossary .qs-results{
  padding: 10px 0 15px;
}
#view-glossary .qs-item{
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
#view-glossary .qs-item:active{
  background: #f0f3f5;
}
#view-glossary .qs-item-main{
  flex: 1;
  min-width: 0;
}
#view-glossary .qs-item-word{
  font-size: 14.5px;
  font-weight: 600;
  color: #2c3e50;
  display: block;
}
#view-glossary .qs-item-zh{
  font-size: 11px;
  color: #95a5a6;
  display: block;
  margin-top: 3px;
}
#view-glossary .qs-item-tag{
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 9px;
  color: #fff;
  flex-shrink: 0;
}
#view-glossary .tag-biology{ background: #27ae60; }
#view-glossary .tag-physics{ background: #3498db; }
#view-glossary .tag-chemistry{ background: #e74c3c; }
#view-glossary .qs-empty{
  text-align: center;
  color: #95a5a6;
  font-size: 12.5px;
  padding: 35px 0;
}
#view-glossary .wordtest-entry{
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 12px;
  padding: 16px 15px;
  margin-top: 6px;
  box-shadow: 0 3px 11px rgba(44,62,80,0.28);
}
#view-glossary .wordtest-entry:active{
  transform: scale(0.98);
}
#view-glossary .wt-icon{
  font-size: 28px;
  margin-right: 11px;
}
#view-glossary .wt-body{ flex: 1; }
#view-glossary .wt-name{
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
#view-glossary .wt-desc{
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  line-height: 1.5;
}
#view-glossary .wt-arrow{
  font-size: 24px;
  color: rgba(255,255,255,0.5);
}

/* ===== 视图: glossary-learn ===== */

#view-glossary-learn .learn-page{
  min-height: 100vh;
  background: #f5f6fa;
}
#view-glossary-learn .top-bar{
  padding: 10px 16px 12px;
}
#view-glossary-learn .top-info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
#view-glossary-learn .top-title{
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
#view-glossary-learn .top-progress{
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
#view-glossary-learn .action-row{
  display: flex;
  gap: 10px;
  padding: 10px 16px 4px;
}
#view-glossary-learn .action-btn{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  position: relative;
}
#view-glossary-learn .action-btn.active{
  background: #fff8e1;
  box-shadow: 0 1px 6px rgba(243,156,18,0.25);
}
#view-glossary-learn .action-icon{
  font-size: 16px;
}
#view-glossary-learn .action-text{
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}
#view-glossary-learn .action-badge{
  position: absolute;
  top: -4px;
  right: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
}
#view-glossary-learn .action-badge.badge-green{
  background: #27ae60;
}
#view-glossary-learn .search-bar{
  padding: 8px 16px;
  background: #fff;
}
#view-glossary-learn .search-input{
  background: #f0f1f5;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}
#view-glossary-learn .word-list{
  padding: 8px 16px;
  max-height: 70vh;
  overflow-y: auto;
}
#view-glossary-learn .list-title{
  font-size: 13px;
  font-weight: 700;
  color: #7f8c8d;
  margin-bottom: 8px;
  padding-left: 4px;
}
#view-glossary-learn .word-entry{
  background: #fff;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 7px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.04);
  border-left: 3px solid #eee;
}
#view-glossary-learn .word-entry.current{
  border-left-color: #f39c12;
  background: #fffbe6;
}
#view-glossary-learn .entry-word-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
#view-glossary-learn .entry-word{
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
}
#view-glossary-learn .entry-star{
  font-size: 16px;
  color: #f39c12;
  padding: 0 4px;
}
#view-glossary-learn .entry-check{
  font-size: 16px;
  color: #27ae60;
  font-weight: 700;
  padding: 0 4px;
}
#view-glossary-learn .entry-def{
  display: block;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}
#view-glossary-learn .list-empty{
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  font-size: 14px;
}
#view-glossary-learn .list-empty-sub{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #bbb;
}
#view-glossary-learn .fav-btn{
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 20px;
  color: #ddd;
  z-index: 10;
}
#view-glossary-learn .fav-btn.faved{
  color: #f39c12;
}
#view-glossary-learn .mode-switch{
  display: flex;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 3px;
}
#view-glossary-learn .mode-btn{
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  border-radius: 6px;
}
#view-glossary-learn .mode-btn.active{
  background: #fff;
  color: #2c3e50;
  font-weight: 700;
}
#view-glossary-learn .progress-bar{
  height: 3px;
  background: #e0e0e0;
}
#view-glossary-learn .progress-fill{
  height: 100%;
  transition: width 0.3s;
}
#view-glossary-learn .card-area{
  padding: 12px 16px;
}
#view-glossary-learn .mastered-btn{
  margin-top: 10px;
  text-align: center;
  padding: 11px 0;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
#view-glossary-learn .flash-card{
  position: relative;
  height: 190px;
  perspective: 500px;
}
#view-glossary-learn .card-face{
  position: absolute;
  width: 93%;
  height: 82%;
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  backface-visibility: hidden;
  transition: transform 0.4s;
}
#view-glossary-learn .card-front{
  border-top: 4px solid #2c3e50;
}
#view-glossary-learn .card-back{
  border-top: 4px solid #27ae60;
  transform: rotateY(180deg);
}
#view-glossary-learn .flash-card.flipped .card-front{
  transform: rotateY(180deg);
}
#view-glossary-learn .flash-card.flipped .card-back{
  transform: rotateY(360deg);
}
#view-glossary-learn .card-word{
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
}
#view-glossary-learn .card-word-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#view-glossary-learn .speak-btn{
  font-size: 22px;
  padding: 4px 2px;
  line-height: 1;
}
#view-glossary-learn .speak-btn:active{
  transform: scale(0.85);
}
#view-glossary-learn .card-word-sm{
  font-size: 14px;
  font-weight: 700;
  color: #27ae60;
  margin-bottom: 6px;
}
#view-glossary-learn .card-zh{
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}
#view-glossary-learn .card-def{
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  text-align: center;
}
#view-glossary-learn .card-hint{
  margin-top: 14px;
  font-size: 12px;
  color: #bdc3c7;
}
#view-glossary-learn .spell-area{
  padding: 12px 16px;
}
#view-glossary-learn .spell-def-box{
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#view-glossary-learn .spell-label{
  font-size: 12px;
  color: #95a5a6;
  margin-bottom: 6px;
}
#view-glossary-learn .spell-def{
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.6;
}
#view-glossary-learn .spell-input-box{
  margin-bottom: 12px;
}
#view-glossary-learn .spell-input{
  width: 92%;
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  font-size: 16px;
  border: 1px solid #e0e0e0;
}
#view-glossary-learn .spell-result{
  margin-bottom: 12px;
}
#view-glossary-learn .spell-correct{
  font-size: 16px;
  color: #27ae60;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  background: #eafaf1;
  border-radius: 6px;
}
#view-glossary-learn .spell-wrong{
  font-size: 14px;
  color: #e74c3c;
  text-align: center;
  padding: 10px;
  background: #fdedec;
  border-radius: 6px;
}
#view-glossary-learn .spell-check-btn{
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
}
#view-glossary-learn .bottom-nav{
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 15px 16px 30px;
}
#view-glossary-learn .nav-btn{
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #7f8c8d;
  box-shadow: 0 1px 5px rgba(0,0,0,0.06);
}
#view-glossary-learn .nav-main{
  color: #fff;
  font-weight: 600;
}
#view-glossary-learn .guide-tip{
  padding: 0 24px 25px;
  text-align: center;
}
#view-glossary-learn .guide-line{
  display: block;
  font-size: 14px;
  color: #1a1b1b;
  line-height: 1.8;
}
#view-glossary-learn .content-layer{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
#view-glossary-learn .bottom-deco{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 310px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#view-glossary-learn .bottom-deco-img{
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.18;
}

/* ===== 视图: wordtest ===== */

#view-wordtest .wordtest-page{
  min-height: 100vh;
  background: #f5f6fa;
  padding: 15px 14px 30px;
  box-sizing: border-box;
}
#view-wordtest .setup-head{
  text-align: center;
  padding: 10px 0 15px;
}
#view-wordtest .setup-title{
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
}
#view-wordtest .setup-sub{
  font-size: 12px;
  color: #95a5a6;
  margin-top: 6px;
}
#view-wordtest .cfg-block{
  background: #fff;
  border-radius: 10px;
  padding: 14px 13px;
  margin-bottom: 13px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
#view-wordtest .cfg-label{
  font-size: 13.5px;
  font-weight: 700;
  color: #34495e;
  margin-bottom: 11px;
}
#view-wordtest .cfg-options{
  display: flex;
  flex-wrap: wrap;
}
#view-wordtest .cfg-opt{
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  color: #555;
  padding: 11px 5px;
  border: 1px solid #e0e4e8;
  border-radius: 7px;
  margin-right: 8px;
  background: #fafbfc;
  min-width: 75px;
}
#view-wordtest .cfg-opt:last-child{ margin-right: 0; }
#view-wordtest .cfg-opt.opt-on{
  color: #fff;
  border-color: transparent;
  background: #2c3e50;
  font-weight: 700;
}
#view-wordtest .cfg-opt.opt-bio.opt-on{ background: #27ae60; }
#view-wordtest .cfg-opt.opt-phy.opt-on{ background: #3498db; }
#view-wordtest .cfg-opt.opt-chem.opt-on{ background: #e74c3c; }
#view-wordtest .start-btn{
  margin-top: 7px;
  background: #2c3e50;
  color: #fff;
  font-size: 15.5px;
  border-radius: 22px;
  padding: 8px 0;
}
#view-wordtest .start-btn[disabled]{
  background: #bdc3c7;
  color: #fff;
}
#view-wordtest .quiz-info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 13px;
}
#view-wordtest .quiz-tip{ font-size: 11.5px; font-weight: 400; opacity: 0.9; }
#view-wordtest .q-block{
  background: #fff;
  border-radius: 9px;
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-wordtest .q-head{
  display: flex;
  align-items: flex-start;
}
#view-wordtest .q-no{
  font-size: 16px;
  font-weight: 700;
  margin-right: 8px;
  line-height: 1.3;
}
#view-wordtest .q-body{ flex: 1; }
#view-wordtest .q-def{
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.6;
  font-weight: 600;
}
#view-wordtest .q-def-r{ flex: 1; font-size: 13px; color: #2c3e50; line-height: 1.6; }
#view-wordtest .q-input{
  width: 100%;
  box-sizing: border-box;
  background: #f7f8fa;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
  color: #2c3e50;
  min-height: 45px;
}
#view-wordtest .q-word-input{
  font-size: 13px;
  font-weight: 200;
}
#view-wordtest .submit-btn{
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
  border-radius: 22px;
  padding: 7.5px 0;
}
#view-wordtest .score-card{
  background: #fff;
  border-radius: 11px;
  padding: 18px 15px 14px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 2px 9px rgba(0,0,0,0.07);
}
#view-wordtest .score-label{ font-size: 13px; color: #95a5a6; }
#view-wordtest .score-value{
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 3px 0 12px;
}
#view-wordtest .score-unit{ font-size: 17px; font-weight: 500; }
#view-wordtest .score-row{
  display: flex;
  border-top: 1px solid #f0f2f4;
  padding-top: 12px;
}
#view-wordtest .score-cell{ flex: 1; }
#view-wordtest .cell-num{
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
}
#view-wordtest .cell-label{
  font-size: 11px;
  color: #95a5a6;
  margin-top: 4px;
}
#view-wordtest .score-note{
  font-size: 10px;
  color: #c2c9d0;
  margin-top: 11px;
}
#view-wordtest .r-block{
  background: #fff;
  border-radius: 9px;
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
#view-wordtest .r-line{
  margin-top: 9px;
  border-radius: 6px;
  padding: 9px 10px;
}
#view-wordtest .r-yours{ background: #f5f7fa; }
#view-wordtest .r-right{ background: #eafaf1; }
#view-wordtest .r-tag{
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #7f8c8d;
  margin-bottom: 4px;
}
#view-wordtest .tag-right{ color: #27ae60; }
#view-wordtest .r-content{
  font-size: 12.5px;
  color: #444;
  line-height: 1.6;
}
#view-wordtest .r-word{
  font-size: 16px;
  font-weight: 700;
  color: #27ae60;
}
#view-wordtest .r-zh{
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}
#view-wordtest .r-status{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 6px;
}
#view-wordtest .status-good{ background: #eafaf1; color: #27ae60; }
#view-wordtest .status-partial{ background: #fef5e7; color: #e67e22; }
#view-wordtest .status-wrong{ background: #fdedec; color: #e74c3c; }
#view-wordtest .result-actions{
  display: flex;
  margin-top: 6px;
}
#view-wordtest .ra-btn{
  flex: 1;
  font-size: 14px;
  border-radius: 22px;
  padding: 7.5px 0;
  margin-right: 10px;
}
#view-wordtest .ra-btn:last-child{ margin-right: 0; }
#view-wordtest .ra-plain{
  background: #fff;
  color: #555;
  border: 1px solid #dfe4e8;
}
#view-wordtest .ra-main{ color: #fff; }
#view-wordtest .content-layer{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
#view-wordtest .bottom-deco{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 310px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#view-wordtest .bottom-deco-img{
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.18;
}

/* ============================================================
   网页外壳（Web shell）
   ============================================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #dfe4ea;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: #2c3e50;
}
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f6fa;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 46px;
  flex-shrink: 0;
  background: #2c3e50;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.nav-back {
  font-size: 30px;
  line-height: 1;
  width: 34px;
  text-align: center;
  padding-bottom: 5px;
  color: #fff;
  cursor: pointer;
  visibility: hidden;
}
.nav-back.show { visibility: visible; }
.nav-title {
  flex: 1;
  margin-right: 34px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.app-view { flex: 1; position: relative; }

/* 视图进入动画 */
.view-root { animation: viewIn .28s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

/* 各视图根高度（扣除导航栏） */
#view-welcome.page, #view-subjects.subjects-page, #view-index.page,
#view-selftest.selftest-page, #view-quiz.quiz-page,
#view-favorites.fav-page, #view-glossary.glossary-page,
#view-glossary-learn.learn-page, #view-wordtest.wordtest-page {
  min-height: calc(100vh - 46px);
}

/* subjects / glossary 深色渐变头部（同元素，补回背景与左右内边距，白字才可见） */
#view-subjects.subjects-page,
#view-glossary.glossary-page {
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 35%, #f5f6fa 35%, #f5f6fa 100%);
  padding: 0 16px;
  box-sizing: border-box;
}

/* 固定底层装饰：桌面宽屏下限制在 480px 容器内居中 */
#view-quiz .bottom-deco, #view-glossary-learn .bottom-deco,
#view-selftest .bottom-deco, #view-wordtest .bottom-deco {
  max-width: 480px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* toast 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(44,62,80,.94);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 999;
  max-width: 78%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 表单元素统一 */
.app-view input, .app-view textarea {
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.app-view textarea { resize: none; }
.app-view button { font-family: inherit; border: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
/* 欢迎页 / 两个学科选择页 顶部图片居中 */
#view-welcome .hero-img,
#view-subjects .header-img,
#view-glossary .header-img {
  margin-left: auto;
  margin-right: auto;
}
/* 去掉所有搜索条输入框的默认黑色边框（含聚焦态） */
.app-view .qs-input,
.app-view .search-input,
.app-view .qs-input:focus,
.app-view .search-input:focus {
  border: none;
  outline: none;
  box-shadow: none;
}
::-webkit-scrollbar { width: 0; height: 0; }
