/* ========== 全局重置与基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f2f2f2;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; }
ul, ol { list-style: none; }

/* ========== App 容器 ========== */
#app {
  width: 100%;
  height: 100%;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

/* ========== 页面容器 ========== */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-bottom: 55px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  -webkit-overflow-scrolling: touch;
}
.page.active { display: block; }

/* ========== 顶部状态栏 ========== */
.status-bar {
  height: 25px;
  background: linear-gradient(135deg, #0091ff, #00baff);
  width: 100%;
}

/* ========== 导航栏 ========== */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 15px;
  background: linear-gradient(135deg, #0091ff, #00baff);
  color: #fff;
  position: relative;
}

.nav-bar .nav-title {
  font-size: 18px;
  font-weight: 500;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-bar .nav-left,
.nav-bar .nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1;
}

.nav-bar .nav-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  cursor: pointer;
}

.nav-bar .nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* ========== 首页 - 整体 ========== */
.home-page {
  background: #eef7f3 !important;
  padding-bottom: 55px !important;
}

/* ========== 首页 - 用户信息区域 ========== */
.home-user-section {
  padding: 20px 18px 12px;
}

.home-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.home-user-text {
  display: flex;
  flex-direction: column;
}

.home-user-name {
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.home-user-school {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

/* ========== 首页 - 两张功能卡片 ========== */
.home-cards-row {
  display: flex;
  gap: 10px;
  padding: 8px 16px 12px;
}

.home-card {
  flex: 1;
  border-radius: 16px;
  padding: 18px 14px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.home-card:active {
  transform: scale(0.97);
}

.home-card-report {
  background: linear-gradient(135deg, #3ecfb4 0%, #6de8cc 50%, #a3f0de 100%);
}

.home-card-errorbook {
  background: linear-gradient(135deg, #56d4c8 0%, #7ae4da 50%, #b5f0ea 100%);
}

.home-card-text {
  position: relative;
  z-index: 1;
}

.home-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.home-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 1px;
}

.home-card-illust {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: -4px;
}

/* ========== 首页 - 五个功能图标 ========== */
.home-func-icons {
  display: flex;
  justify-content: space-around;
  padding: 8px 10px 16px;
  background: #fff;
  border-radius: 16px;
  margin: 0 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.home-func-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 6px 4px;
}

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

.home-func-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.home-func-icon.icon-daily {
  background: linear-gradient(135deg, #ff8a65, #ff6b4a);
  box-shadow: 0 4px 12px rgba(255,107,74,0.3);
}

.home-func-icon.icon-paper {
  background: linear-gradient(135deg, #66d9a8, #4bc8a8);
  box-shadow: 0 4px 12px rgba(75,200,168,0.3);
}

.home-func-icon.icon-lecture {
  background: linear-gradient(135deg, #ffb74d, #ffa726);
  box-shadow: 0 4px 12px rgba(255,167,38,0.3);
}

.home-func-icon.icon-homework {
  background: linear-gradient(135deg, #5ee3cb, #3ecfb4);
  box-shadow: 0 4px 12px rgba(62,207,180,0.3);
}

.home-func-icon.icon-correct {
  background: linear-gradient(135deg, #9fa8da, #7986cb);
  box-shadow: 0 4px 12px rgba(121,134,203,0.3);
}

.home-func-item span {
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}

/* ========== 首页 - 底部横幅 ========== */
.home-bottom-banner {
  margin: 14px 16px 16px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6c5ce7 0%, #a084dc 50%, #c4b0e8 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 4px 16px rgba(108,92,231,0.2);
}

.home-bottom-banner:active {
  transform: scale(0.97);
}

.banner-mascot {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.banner-slogan {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.slogan-brand {
  font-size: 18px;
  font-weight: 700;
  color: #5effc4;
}

.slogan-text {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

/* ========== 底部导航栏 ========== */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55px;
  background: #fff;
  display: flex;
  align-items: center;
  border-top: 1px solid #e7e9f1;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  padding-top: 5px;
}

.tab-icon-svg {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
  color: #999;
}

.tab-item.active .tab-icon-svg {
  color: #3ecfb4;
}

.tab-item span {
  font-size: 10px;
  color: #999;
}

.tab-item.active span {
  color: #3ecfb4;
  font-weight: 500;
}

/* ========== 首页 ========== */
.home-page .page-body {
  background: #eef7f3;
}

/* ========== 我的页面（新版匹配APP截图） ========== */
#page-mine {
  background: #f5f5f5; overflow-y: auto;
}
.mine-topbar {
  padding: 12px 16px 0; display: flex; justify-content: flex-end;
  background: linear-gradient(180deg, #e0f7f0 0%, #f5f5f5 100%);
}
.mine-topbar-icons {
  display: flex; gap: 18px; align-items: center;
}
.mine-topbar-icons svg { cursor: pointer; }

.mine-user-card {
  display: flex; align-items: center; padding: 18px 16px 28px;
  background: linear-gradient(180deg, #e0f7f0 0%, #f5f5f5 60%);
}
.mine-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(62,207,180,0.3); background: #e8faf5; flex-shrink: 0;
}
.mine-user-detail { flex: 1; margin-left: 14px; }
.mine-name { font-size: 20px; font-weight: 700; color: #222; }
.mine-school { font-size: 13px; color: #666; margin-top: 4px; }
.mine-class-id { font-size: 12px; color: #999; margin-top: 2px; }
.mine-sep { margin: 0 6px; color: #ddd; }
.mine-arrow { flex-shrink: 0; }

/* 菜单组 */
.mine-menu-group {
  background: #fff; border-radius: 12px; margin: 0 12px 12px; overflow: hidden;
}
.mine-menu-row {
  display: flex; align-items: center; padding: 16px 16px;
  cursor: pointer; transition: background .15s; border-bottom: 1px solid #f5f5f5;
}
.mine-menu-row:last-child { border-bottom: none; }
.mine-menu-row:active { background: #fafafa; }
.mine-menu-icon { flex-shrink: 0; margin-right: 14px; }
.mine-menu-text { flex: 1; font-size: 15px; color: #333; }
.mine-menu-arrow { flex-shrink: 0; }

/* 退出登录 */
.mine-logout-btn {
  margin: 12px 12px 30px; padding: 14px; text-align: center;
  background: #fff; border-radius: 12px; font-size: 15px; color: #e74c3c;
  cursor: pointer; transition: background .15s;
}
.mine-logout-btn:active { background: #fef0f0; }

/* --- 我的二维码页面 --- */
.qr-user-card {
  display: flex; align-items: center; background: #fff; border-radius: 14px;
  padding: 20px; width: calc(100% - 48px); margin: 0 auto; box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.qr-avatar {
  width: 50px; height: 50px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(62,207,180,0.3); background: #e8faf5; flex-shrink: 0;
}
.qr-user-info { margin-left: 14px; }
.qr-name { font-size: 18px; font-weight: 700; color: #222; }
.qr-school-class { font-size: 13px; color: #999; margin-top: 4px; }
.qr-code-area {
  margin: 30px auto; width: 220px; height: 220px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.qr-code-area canvas { width: 200px; height: 200px; }
.qr-center-logo {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid #fff; background: #e8faf5; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.qr-tips {
  width: calc(100% - 48px); margin: 20px auto 30px; font-size: 12px;
  color: #999; line-height: 2;
}
.qr-tips p { margin: 0; }

/* ========== 空状态 ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #bbb;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* (旧通知栏和学情卡片已移除) */

/* ========== Toast / 弹窗 ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* ========== 滚动条美化 ========== */
.page::-webkit-scrollbar {
  width: 0;
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.35s ease-out;
}

/* (旧快捷入口已移除) */

/* (旧统计区域已移除) */
