/* ========== 手机端全局样式 ========== */
:root {
  --primary: #4A90D9;
  --primary-dark: #3A7BC8;
  --primary-light: rgba(74,144,217,0.1);
  --success: #52c41a;
  --success-light: rgba(82,196,26,0.1);
  --warning: #faad14;
  --warning-light: rgba(250,173,20,0.1);
  --danger: #ff4d4f;
  --danger-light: rgba(255,77,79,0.1);
  --orange: #ff9800;
  --orange-light: rgba(255,152,0,0.1);
  --text: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-light: #8e8ea0;
  --text-muted: #c0c0d0;
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --border: rgba(0,0,0,0.06);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --tabbar-height: 56px;
  --header-height: 48px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--header-height);
  padding-bottom: var(--tabbar-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; outline: none; cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ========== 顶部导航 ========== */
.m-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-height) + env(safe-area-inset-top));
}
.m-header .back-btn {
  position: absolute; left: 0; top: 0; bottom: 0; width: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 20px;
}
.m-header .header-left {
  position: absolute; left: 0; top: 0; bottom: 0; width: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 20px; text-decoration: none;
}
.m-header .header-title {
  font-size: 17px; font-weight: 600; color: var(--text);
}
.m-header .header-right {
  position: absolute; right: 16px; top: 0; bottom: 0;
  display: flex; align-items: center;
  color: var(--text); font-size: 14px;
}

/* ========== 底部 TabBar ========== */
.m-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--tabbar-height);
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex; align-items: center; justify-content: space-around;
  border-top: 0.5px solid rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
}
.m-tabbar .tab-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 10px;
  text-decoration: none;
  transition: color 0.2s, transform 0.15s;
  position: relative;
}
.m-tabbar .tab-item i {
  font-size: 22px; margin-bottom: 3px;
  transition: transform 0.2s;
}
.m-tabbar .tab-item span {
  font-weight: 500; letter-spacing: 0.3px;
}
.m-tabbar .tab-item.active {
  color: var(--primary);
}
.m-tabbar .tab-item.active i {
  transform: scale(1.1);
}
.m-tabbar .tab-item:active {
  transform: scale(0.92);
}

/* ========== 页面容器 ========== */
.m-page { padding: 0; min-height: calc(100vh - var(--header-height) - var(--tabbar-height)); }
.m-page.no-tabbar { padding-bottom: 0; min-height: calc(100vh - var(--header-height)); }
.m-page.no-header { padding-top: 0; }

/* ========== 卡片 ========== */
.m-card {
  background: var(--bg-card);
  border-radius: 16px;
  margin: 10px 12px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid rgba(0,0,0,0.04);
}
.m-card:active { transform: scale(0.99); }
.m-card-title {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text);
}
.m-card-title .more { font-size: 13px; color: var(--text-light); font-weight: 400; }

/* ========== Banner ========== */
.m-banner {
  width: 100%; overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}
.m-banner .swiper {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-banner .swiper::-webkit-scrollbar { display: none; }
.m-banner .swiper-slide {
  flex: 0 0 100%; scroll-snap-align: start;
}
.m-banner .swiper-slide img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: 16px;
}

/* ========== 快捷入口 ========== */
.m-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 12px;
  background: var(--bg-card);
  margin: 10px 12px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-grid-item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--text);
  transition: transform 0.15s;
}
.m-grid-item:active { transform: scale(0.92); }
.m-grid-item .icon-box {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: transform 0.2s;
}
.m-grid-item span { font-size: 11px; font-weight: 500; color: var(--text-secondary); }

/* ========== 列表 ========== */
.m-list { padding: 0 12px; }
.m-list-item {
  display: flex; align-items: center;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg-card);
  transition: background 0.15s;
}
.m-list-item:last-child { border-bottom: none; }
.m-list-item:active { background: rgba(0,0,0,0.02); }
.m-list-item .thumb {
  width: 72px; height: 54px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0; margin-right: 12px;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}
.m-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-list-item .info { flex: 1; min-width: 0; }
.m-list-item .info .title {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.m-list-item .info .desc {
  font-size: 12px; color: var(--text-light); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-list-item .info .meta {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
  display: flex; gap: 10px;
}

/* ========== 按钮 ========== */
.m-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
  letter-spacing: 0.3px;
}
.m-btn:active { transform: scale(0.96); }
.m-btn-primary {
  background: linear-gradient(135deg, var(--primary), #5a7ddb);
  color: #fff;
  box-shadow: 0 3px 12px rgba(74,144,217,0.3);
}
.m-btn-primary:active { box-shadow: 0 2px 6px rgba(74,144,217,0.25); }
.m-btn-success {
  background: linear-gradient(135deg, var(--success), #389e0d);
  color: #fff;
  box-shadow: 0 3px 12px rgba(82,196,26,0.3);
}
.m-btn-warning {
  background: linear-gradient(135deg, var(--orange), #f57c00);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255,152,0,0.3);
}
.m-btn-danger {
  background: linear-gradient(135deg, var(--danger), #cf1322);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255,77,79,0.3);
}
.m-btn-outline {
  background: transparent; border: 1.5px solid var(--primary); color: var(--primary);
}
.m-btn-block { display: flex; width: 100%; border-radius: 12px; }
.m-btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 10px; }
.m-btn-lg { padding: 12px 24px; font-size: 15px; }

/* ========== 空状态 ========== */
.m-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 24px; color: var(--text-muted);
}
.m-empty i { font-size: 44px; margin-bottom: 12px; color: rgba(74,144,217,0.15); }
.m-empty p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ========== 加载更多 ========== */
.m-load-more {
  text-align: center; padding: 20px; color: var(--text-light); font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.m-loading {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid rgba(74,144,217,0.15); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 弹窗 ========== */
.m-modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.m-modal {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%; max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0.8; }
  to { transform: translateY(0); opacity: 1; }
}
.m-modal-header {
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
}
.m-modal-header h3 { font-size: 18px; font-weight: 600; color: var(--text); }
.m-modal-header .close-btn { font-size: 22px; color: var(--text-light); background: none; }
.m-modal-body { padding: 24px; }

/* ========== 表单 ========== */
.m-form-group {
  margin-bottom: 14px;
}
.m-form-group label {
  display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
  font-weight: 500;
}
.m-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid rgba(0,0,0,0.08); border-radius: 12px;
  font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: rgba(0,0,0,0.02);
}
.m-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74,144,217,0.1);
  background: #fff;
}
.m-input-group {
  display: flex; align-items: center;
  border: 1.5px solid rgba(0,0,0,0.08); border-radius: 12px; overflow: hidden;
  background: rgba(0,0,0,0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.m-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74,144,217,0.1);
  background: #fff;
}
.m-input-group .m-input { border: none; border-radius: 0; background: transparent; }
.m-input-group .m-input:focus { box-shadow: none; }
.m-input-group .suffix { padding: 0 12px; color: var(--text-light); font-size: 14px; flex-shrink: 0; }

/* ========== 标签 ========== */
.m-tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.m-tag-primary { background: rgba(74,144,217,0.12); color: var(--primary); }
.m-tag-success { background: rgba(82,196,26,0.12); color: var(--success); }
.m-tag-warning { background: rgba(250,173,20,0.12); color: var(--warning); }
.m-tag-danger { background: rgba(255,77,79,0.12); color: var(--danger); }

/* ========== 考试做题专用 ========== */
.exam-progress {
  position: fixed; top: var(--header-height); left: 0; right: 0; z-index: 50;
  height: 3px; background: rgba(255,255,255,0.3);
}
.exam-progress .bar {
  height: 100%; background: linear-gradient(90deg, var(--success), #73d13d); transition: width 0.3s;
}

.question-card {
  background: var(--bg-card); margin: 10px 12px; border-radius: 16px;
  padding: 18px 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.question-type {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), #5a7ddb); color: #fff;
  box-shadow: 0 2px 6px rgba(74,144,217,0.2);
}
.question-title { font-size: 15px; font-weight: 500; margin-bottom: 16px; line-height: 1.7; color: var(--text); }

.option-list { list-style: none; }
.option-item {
  display: flex; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1.5px solid rgba(0,0,0,0.06); border-radius: 12px;
  transition: all 0.2s;
  cursor: pointer;
  background: rgba(0,0,0,0.01);
}
.option-item:active { background: rgba(0,0,0,0.03); transform: scale(0.99); }
.option-item.selected { border-color: var(--primary); background: rgba(74,144,217,0.05); }
.option-item.correct { border-color: var(--success); background: rgba(82,196,26,0.05); }
.option-item.wrong { border-color: var(--danger); background: rgba(255,77,79,0.05); }
.option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.05); font-size: 13px; font-weight: 600;
  margin-right: 10px; flex-shrink: 0;
  transition: all 0.2s;
}
.option-item.selected .option-letter { background: linear-gradient(135deg, var(--primary), #5a7ddb); color: #fff; }
.option-item.correct .option-letter { background: linear-gradient(135deg, var(--success), #389e0d); color: #fff; }
.option-item.wrong .option-letter { background: linear-gradient(135deg, var(--danger), #cf1322); color: #fff; }
.option-text { flex: 1; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }

/* ========== 底部操作栏 ========== */
.m-bottom-bar {
  position: fixed; bottom: var(--tabbar-height); left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 0.5px solid rgba(0,0,0,0.06);
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
.m-bottom-bar.no-tabbar { bottom: 0; }

/* ========== 价格/会员卡片 ========== */
.price { color: var(--danger); font-weight: 600; }
.price::before { content: '¥'; font-size: 12px; }
.price-lg { font-size: 26px; }

.plan-cards { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.plan-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 18px; border: 2px solid transparent;
  box-shadow: var(--shadow); position: relative;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.plan-card:active { transform: scale(0.98); }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 4px 16px rgba(74,144,217,0.2); }
.plan-card .tag {
  position: absolute; top: -1px; right: 14px;
  background: linear-gradient(135deg, var(--orange), #ff5722);
  color: #fff; font-size: 11px; padding: 3px 12px;
  border-radius: 0 0 8px 8px; font-weight: 600;
}
.plan-card .name { font-size: 17px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.plan-card .desc { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.plan-card .price-row { display: flex; align-items: baseline; gap: 8px; }
.plan-card .price-row .price { font-size: 24px; }
.plan-card .price-row .original {
  font-size: 13px; color: var(--text-muted);
  text-decoration: line-through;
}

/* ========== 用户信息 ========== */
.user-card {
  background: linear-gradient(135deg, var(--primary), #5a7ddb);
  color: #fff; padding: 24px 18px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 6px 20px rgba(74,144,217,0.25);
}
.user-card .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  overflow: hidden; margin-right: 14px; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.user-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-card .user-info { flex: 1; }
.user-card .nickname { font-size: 18px; font-weight: 700; }
.user-card .member-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: 12px; background: rgba(255,255,255,0.2); margin-top: 8px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* ========== 功能菜单 ========== */
.menu-list { background: var(--bg-card); margin: 10px 12px; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.04); }
.menu-item {
  display: flex; align-items: center; padding: 14px;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: rgba(0,0,0,0.02); }
.menu-item i { width: 20px; text-align: center; margin-right: 12px; color: var(--primary); font-size: 16px; }
.menu-item .label { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.menu-item .value { font-size: 13px; color: var(--text-light); margin-right: 4px; }
.menu-item .arrow { color: var(--text-muted); font-size: 12px; }

/* ========== 分类筛选 ========== */
.filter-bar {
  display: flex; align-items: center; overflow-x: auto;
  padding: 10px 12px; gap: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: sticky; top: var(--header-height); z-index: 50;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-item {
  flex-shrink: 0; padding: 6px 14px;
  border-radius: 20px; font-size: 13px;
  background: rgba(0,0,0,0.04); color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-item.active {
  background: linear-gradient(135deg, var(--primary), #5a7ddb); color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(74,144,217,0.25);
}

/* ========== 会员状态栏 ========== */
.member-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg-card);
  margin: 10px 12px; border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.member-status .left { display: flex; align-items: center; gap: 10px; }
.member-status .left i { color: var(--orange); font-size: 20px; }
.member-status .left span { font-size: 14px; font-weight: 500; }
.member-status .right { font-size: 13px; color: var(--text-light); }

/* ========== 支付方式 ========== */
.pay-tabs {
  display: flex; border-bottom: 0.5px solid var(--border);
  background: var(--bg-card);
}
.pay-tab {
  flex: 1; padding: 16px; text-align: center; font-size: 14px;
  color: var(--text-light); position: relative;
  background: none; font-weight: 500;
  transition: color 0.2s;
}
.pay-tab.active { color: var(--primary); font-weight: 600; }
.pay-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 20%; right: 20%;
  height: 3px; background: linear-gradient(135deg, var(--primary), #5a7ddb); border-radius: 2px;
}

/* ========== 二维码支付 ========== */
.qr-section {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px; text-align: center;
}
.qr-section img { width: 200px; height: 200px; margin-bottom: 14px; border-radius: 12px; }
.qr-section .tip { font-size: 13px; color: var(--text-light); }

/* ========== 工具类 ========== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.hidden { display: none !important; }

/* ========== Toast ========== */
.m-toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 300; background: rgba(26,26,46,0.88); color: #fff;
  padding: 12px 24px; border-radius: 24px; font-size: 14px;
  max-width: 75%; text-align: center; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ========== 触摸优化 ========== */
* { -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-size: 16px !important; } /* 防止iOS自动缩放 */

/* ========== 会员卡片增强 ========== */
.plan-card {
  border-radius: 12px;
  transition: transform 0.15s, border-color 0.2s;
}
.plan-card:active { transform: scale(0.98); }
.plan-card.selected { box-shadow: 0 2px 12px rgba(74,144,217,0.2); }

/* ========== 搜索框增强 ========== */
.search-bar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: sticky; top: var(--header-height); z-index: 50;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
}

/* ========== 渐变背景增强 ========== */
.gradient-primary { background: linear-gradient(135deg, var(--primary), #5a7ddb); }
.gradient-success { background: linear-gradient(135deg, var(--success), #389e0d); }
.gradient-warning { background: linear-gradient(135deg, var(--warning), #d48806); }
.gradient-danger { background: linear-gradient(135deg, var(--danger), #cf1322); }
.gradient-orange { background: linear-gradient(135deg, var(--orange), #f57c00); }

/* ========== 骨架屏 ========== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
  width: 4px; height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
}

/* ================================================================
   UniApp 小程序风格组件库
   ================================================================ */

/* ========== Hero 渐变头部 ========== */
.m-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, #5B6ABF 40%, #764ba2 100%);
  padding: 40px 20px 28px; text-align: center; color: #fff;
}
.m-hero .m-deco-circle {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.m-hero .m-deco-circle.c1 { top: -60px; right: -50px; width: 200px; height: 200px; }
.m-hero .m-deco-circle.c2 { bottom: -80px; left: -30px; width: 240px; height: 240px; }
.m-hero .m-deco-circle.c3 { top: 30px; right: 30px; width: 60px; height: 60px; background: rgba(255,255,255,0.04); }
.m-hero-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 28px; position: relative;
}
.m-hero-title {
  font-size: 22px; font-weight: 700; margin: 0 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15); position: relative;
}
.m-hero-sub {
  font-size: 13px; opacity: 0.85; margin: 0; position: relative;
}
.m-hero .m-hero-num {
  font-size: 42px; font-weight: 800; line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15); position: relative;
}
.m-hero .m-hero-num-sm {
  font-size: 13px; opacity: 0.8; margin-top: 6px; position: relative;
}
/* Hero 内浮卡片 */
.m-hero-float {
  position: relative; z-index: 1;
  margin: -22px 12px 12px;
}
/* Hero 内徽章网格 */
.m-hero-badges {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 14px 16px;
  background: rgba(255,255,255,0.12); border-radius: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  margin: 16px auto 0; max-width: 360px; position: relative;
}
.m-hero-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #fff; opacity: 0.95;
}
.m-hero-badge i { font-size: 14px; color: #ffd700; width: 16px; text-align: center; flex-shrink: 0; }

/* ========== 统计行 ========== */
.m-stat-row {
  display: flex; background: var(--bg-card);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-stat-item {
  flex: 1; text-align: center; padding: 14px 8px;
  border-right: 0.5px solid var(--border);
}
.m-stat-item:last-child { border-right: none; }
.m-stat-num {
  font-size: 22px; font-weight: 800; color: var(--text);
  line-height: 1.2;
}
.m-stat-label {
  font-size: 11px; color: var(--text-light); margin-top: 4px;
}

/* ========== 单元格列表 (UniApp u-cell 风格) ========== */
.m-cell-group {
  background: var(--bg-card); border-radius: 14px;
  margin: 10px 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-cell {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.15s;
}
.m-cell:last-child { border-bottom: none; }
.m-cell:active { background: rgba(0,0,0,0.02); }
.m-cell-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px; flex-shrink: 0; font-size: 16px; color: #fff;
}
.m-cell-label { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.m-cell-value { font-size: 13px; color: var(--text-light); margin-right: 4px; }
.m-cell-arrow { color: var(--text-muted); font-size: 12px; }
.m-cell-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ========== 网格菜单 (4列图标网格) ========== */
.m-grid-menu {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card); border-radius: 14px;
  margin: 10px 12px; padding: 8px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-grid-menu-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 4px; text-decoration: none; color: var(--text);
  transition: transform 0.15s;
}
.m-grid-menu-item:active { transform: scale(0.92); }
.m-grid-menu-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.m-grid-menu-label {
  font-size: 11px; font-weight: 500; color: var(--text-secondary);
}

/* ========== 区块标题 ========== */
.m-section {
  margin: 16px 12px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.m-section-title {
  font-size: 16px; font-weight: 700; color: var(--text);
}
.m-section-more {
  font-size: 13px; color: var(--text-light);
}

/* ========== 进度条 ========== */
.m-progress {
  height: 6px; background: rgba(0,0,0,0.06);
  border-radius: 3px; overflow: hidden;
}
.m-progress-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), #5a7ddb);
  transition: width 0.4s ease;
}
.m-progress-bar.success { background: linear-gradient(90deg, var(--success), #73d13d); }
.m-progress-bar.warning { background: linear-gradient(90deg, var(--warning), #ffc53d); }
.m-progress-bar.danger { background: linear-gradient(90deg, var(--danger), #ff7875); }

/* ========== 头像 ========== */
.m-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.m-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-avatar-sm { width: 40px; height: 40px; }
.m-avatar-lg { width: 72px; height: 72px; }

/* ========== 排行榜专用 ========== */
.m-rank-item {
  display: flex; align-items: center;
  padding: 12px 14px; background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
}
.m-rank-item:last-child { border-bottom: none; }
.m-rank-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-right: 12px; flex-shrink: 0;
  background: rgba(0,0,0,0.05); color: var(--text-light);
}
.m-rank-num.top1 { background: linear-gradient(135deg, #ffd700, #ffb800); color: #fff; }
.m-rank-num.top2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.m-rank-num.top3 { background: linear-gradient(135deg, #cd7f32, #b8690e); color: #fff; }
.m-rank-info { flex: 1; min-width: 0; }
.m-rank-name { font-size: 14px; font-weight: 600; color: var(--text); }
.m-rank-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.m-rank-score { font-size: 16px; font-weight: 700; color: var(--primary); }

/* ========== 任务卡片 ========== */
.m-task-card {
  display: flex; align-items: center;
  background: var(--bg-card); border-radius: 14px;
  padding: 14px; margin: 0 12px 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-task-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.m-task-title { font-size: 14px; font-weight: 600; color: var(--text); }
.m-task-reward { font-size: 12px; color: var(--orange); font-weight: 600; }

/* ========== 通知/公告项 ========== */
.m-notice-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  transition: background 0.15s;
}
.m-notice-item:active { background: rgba(0,0,0,0.02); }
.m-notice-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); margin-top: 6px; flex-shrink: 0;
}
.m-notice-dot.read { background: var(--text-muted); }
.m-notice-content { flex: 1; min-width: 0; }
.m-notice-title { font-size: 14px; font-weight: 600; color: var(--text); }
.m-notice-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== 商品卡片 ========== */
.m-goods-card {
  background: var(--bg-card); border-radius: 14px;
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.15s;
}
.m-goods-card:active { transform: scale(0.98); }
.m-goods-img { width: 100%; height: 140px; object-fit: cover; }
.m-goods-info { padding: 12px 14px; }
.m-goods-name { font-size: 14px; font-weight: 600; color: var(--text); }
.m-goods-price { font-size: 18px; font-weight: 800; color: var(--danger); margin-top: 6px; }
.m-goods-price .unit { font-size: 12px; font-weight: 400; }

/* ========== 表单增强 ========== */
.m-form-card {
  background: var(--bg-card); border-radius: 14px;
  margin: 10px 12px; padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}
.m-option-group {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.m-option-tag {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 6px 12px;
  border: 1.5px solid rgba(0,0,0,0.08); border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
}
.m-option-tag:has(input:checked) {
  border-color: var(--primary); background: rgba(74,144,217,0.06);
}
.m-radio-group {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.m-radio-tag {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; cursor: pointer;
}
.m-subject-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.m-subject-item:last-child { border-bottom: none; }
.m-subject-item .name { font-size: 14px; }

/* ========== 结果/成绩展示 ========== */
.m-result-score {
  font-size: 56px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.m-result-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ========== Tab 增强 ========== */
.m-tabs {
  display: flex; background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: var(--header-height); z-index: 50;
}
.m-tab-item {
  flex: 1; padding: 14px 8px; text-align: center;
  font-size: 14px; color: var(--text-light); font-weight: 500;
  position: relative; background: none; border: none;
  transition: color 0.2s;
}
.m-tab-item.active { color: var(--primary); font-weight: 600; }
.m-tab-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 3px; background: var(--primary); border-radius: 2px;
}

/* ========== 浮动操作按钮 ========== */
.m-fab {
  position: fixed; bottom: calc(var(--tabbar-height) + 20px); right: 16px;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #5a7ddb);
  color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(74,144,217,0.4);
  z-index: 80; transition: transform 0.2s;
}
.m-fab:active { transform: scale(0.9); }

/* ========== 安全区工具 ========== */
.m-safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* ========== 渐变文字 ========== */
.m-gradient-text {
  background: linear-gradient(135deg, var(--primary), #764ba2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== 分割线 ========== */
.m-divider {
  height: 0.5px; background: var(--border); margin: 0 16px;
}

/* ========== 角标 ========== */
.m-badge-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid #fff;
}

/* ========== 搜索按钮 (input-group 内) ========== */
.m-input-group .suffix.m-btn {
  border-radius: 0 12px 12px 0;
  padding: 10px 16px;
}

/* ========== 头像预览 (个人资料) ========== */
.avatar-preview {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}

/* ========== 性别选择组 ========== */
.gender-group {
  display: flex; gap: 16px; padding: 4px 0;
}
.gender-option {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; cursor: pointer;
}

/* ========== 修改密码图标区 ========== */
.pwd-icon-wrap {
  text-align: center; margin-bottom: 24px;
}
.pwd-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #722ed1, #531dab);
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(114,46,209,0.3);
}
.pwd-icon i { font-size: 30px; color: #fff; }
.pwd-title {
  font-size: 20px; font-weight: 700; color: var(--text);
}
.pwd-subtitle {
  font-size: 14px; color: var(--text-light); margin-top: 6px;
}

/* ========== 题目内容 (搜索结果) ========== */
.question-content {
  font-size: 14px; line-height: 1.6;
}
