/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #1677ff; text-decoration: none; }
a:hover { color: #0958d9; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ===== 布局 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: #1677ff; color: #fff; }
.btn-primary:hover { background: #0958d9; color: #fff; }
.btn-primary:active { background: #0040c0; }
.btn-outline { background: transparent; color: #1677ff; border: 1.5px solid #1677ff; }
.btn-outline:hover { background: #e6f4ff; }
.btn-text { background: transparent; color: #666; border: none; }
.btn-text:hover { color: #333; background: #f5f5f5; }
.btn-block { width: 100%; padding: 13px; font-size: 16px; border-radius: 10px; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #d9363e; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #389e0d; }
.btn-lg { padding: 13px 36px; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 5px 14px; font-size: 13px; border-radius: 6px; }

/* ===== 导航栏 ===== */
.header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  color: #1677ff;
  flex-shrink: 0;
}
.logo img {
  height: 34px;
  width: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.nav {
  display: flex;
  gap: 20px;
  flex: 1;
}
.nav a {
  color: #555;
  font-size: 15px;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: #1677ff; border-bottom-color: #1677ff; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-name { color: #333; font-size: 14px; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 移动端汉堡菜单 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 199;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
}
.mobile-nav.show { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 20px;
  color: #333;
  font-size: 16px;
  border-bottom: 1px solid #f5f5f5;
  font-weight: 500;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:active { background: #f5f7ff; }

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #1a2d5a 40%, #0d3d6e 100%);
  padding: 60px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(22,119,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hero h1 span { color: #36cfc9; }
.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 28px; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ===== 分类标签 ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 20px 0 16px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
}
.tab-btn:hover { border-color: #1677ff; color: #1677ff; background: #f0f7ff; }
.tab-btn.active { background: #1677ff; color: #fff; border-color: #1677ff; }

/* ===== 职业列表 ===== */
.main-content { padding-bottom: 60px; }
.category-section { margin-bottom: 36px; }
.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}
.category-count {
  font-size: 13px;
  color: #aaa;
  font-weight: 400;
  margin-left: 4px;
}
.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.profession-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1.5px solid #f0f0f0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.profession-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22,119,255,0.14);
  border-color: #91caff;
}
.profession-card:active { transform: translateY(-1px); }
.card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-icon { font-size: 34px; flex-shrink: 0; line-height: 1; }
.card-info { flex: 1; min-width: 0; }
.card-name { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.card-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-meta span { display: flex; align-items: center; gap: 3px; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.start-btn { padding: 7px 18px; font-size: 13px; border-radius: 8px; }
.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.badge-hot { background: #fff1f0; color: #ff4d4f; }
.badge-new { background: #f6ffed; color: #52c41a; }
.badge-pay { background: #fff7e6; color: #fa8c16; }

/* ===== 搜索区域 ===== */
.search-bar {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  gap: 10px;
}
.search-input-wrap { flex: 1; position: relative; }
.search-input-wrap input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background: #fafafa;
}
.search-input-wrap input:focus { border-color: #1677ff; background: #fff; }
.search-input-wrap::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* ===== 考试页 ===== */
.exam-container { max-width: 900px; margin: 0 auto; padding: 24px 20px 80px; }
.exam-header {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.exam-title { font-size: 20px; font-weight: 700; }
.exam-meta { display: flex; gap: 20px; font-size: 14px; color: #666; }
.timer { font-size: 18px; font-weight: 700; color: #ff4d4f; }
.timer.warning { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.progress-bar { background: #f0f0f0; border-radius: 4px; height: 6px; margin-top: 12px; }
.progress-fill { background: linear-gradient(90deg, #1677ff, #36cfc9); height: 100%; border-radius: 4px; transition: width 0.4s ease; }

/* 题目卡片 */
.question-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  animation: fadeSlideIn 0.3s ease;
}
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.question-num { font-size: 13px; color: #1677ff; font-weight: 700; margin-bottom: 8px; }
.question-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
}
.type-single { background: #e6f4ff; color: #1677ff; }
.type-multi { background: #fff7e6; color: #fa8c16; }
.question-content {
  font-size: 16px;
  color: #1a1a2e;
  margin-bottom: 20px;
  line-height: 1.8;
  font-weight: 500;
  word-break: break-word;
}
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.option-item:hover { border-color: #91caff; background: #f0f7ff; }
.option-item:active { transform: scale(0.99); }
.option-item.selected { border-color: #1677ff; background: #e6f4ff; }
.option-item.correct { border-color: #52c41a; background: #f6ffed; }
.option-item.wrong { border-color: #ff4d4f; background: #fff1f0; }
.option-key {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #d0d0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.option-item.selected .option-key { background: #1677ff; border-color: #1677ff; color: #fff; }
.option-item.correct .option-key { background: #52c41a; border-color: #52c41a; color: #fff; }
.option-item.wrong .option-key { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.option-text { flex: 1; font-size: 15px; color: #333; line-height: 1.6; word-break: break-word; padding-top: 2px; }

.exam-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  z-index: 100;
}

/* ===== 结果页 ===== */
.result-container { max-width: 800px; margin: 0 auto; padding: 24px 20px 80px; }
.score-card {
  background: linear-gradient(135deg, #1677ff 0%, #0040c0 100%);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(22,119,255,0.3);
}
.score-number {
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.score-label { font-size: 15px; opacity: 0.85; margin-top: 8px; }
.score-status { margin-top: 16px; }
.pass-badge {
  display: inline-block;
  padding: 7px 24px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 700;
}
.pass-badge.passed { background: rgba(82,196,26,0.25); color: #fff; border: 2px solid rgba(82,196,26,0.5); }
.pass-badge.failed { background: rgba(255,77,79,0.25); color: #fff; border: 2px solid rgba(255,77,79,0.5); }
.score-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.stat-item {
  text-align: center;
  flex: 1;
  padding: 0 8px;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 12px; opacity: 0.75; margin-top: 4px; }

.result-section {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f5f5f5;
}
.ai-analysis { font-size: 15px; line-height: 1.85; color: #444; }
.ai-analysis h2 { font-size: 16px; color: #1677ff; margin: 16px 0 8px; font-weight: 700; }
.ai-analysis h3 { font-size: 15px; color: #333; margin: 12px 0 6px; font-weight: 700; }
.ai-analysis strong { color: #1a1a2e; }
.ai-analysis p { margin-bottom: 10px; }
.ai-analysis ul { padding-left: 20px; margin-bottom: 10px; }
.ai-analysis li { margin-bottom: 5px; line-height: 1.7; }
.ai-loading { text-align: center; padding: 32px 20px; color: #888; }
.ai-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.wrong-item {
  border: 1.5px solid #f0f0f0;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.wrong-item:hover { border-color: #ffd591; }
.wrong-item .question-num { font-size: 13px; color: #888; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.wrong-item .question-content { font-size: 15px; margin-bottom: 14px; line-height: 1.7; color: #1a1a2e; font-weight: 500; }
.answer-row { display: flex; gap: 16px; font-size: 14px; margin-top: 10px; flex-wrap: wrap; }
.answer-correct { color: #52c41a; font-weight: 700; }
.answer-wrong { color: #ff4d4f; font-weight: 700; }
.explanation {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  border-left: 3px solid #1677ff;
  line-height: 1.7;
}
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* 付费遮罩 */
.pay-mask {
  background: #fff;
  border-radius: 14px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.pay-mask h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.pay-mask p { color: #666; margin-bottom: 28px; font-size: 15px; }
.pay-options { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.pay-option {
  border: 2px solid #f0f0f0;
  border-radius: 14px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-width: 150px;
}
.pay-option:hover { border-color: #1677ff; transform: translateY(-2px); }
.pay-option.selected { border-color: #1677ff; background: #e6f4ff; }
.pay-option .price { font-size: 28px; font-weight: 800; color: #ff4d4f; }
.pay-option .price span { font-size: 16px; }
.pay-option .price-label { font-size: 13px; color: #555; margin-top: 6px; font-weight: 600; }
.pay-option .price-desc { font-size: 12px; color: #aaa; margin-top: 3px; }

/* 课程推广卡片 */
.course-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  border: 2px solid #fff7e6;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffbe6, #fff7e6);
  cursor: pointer;
  transition: all 0.2s;
}
.course-card:hover { border-color: #fa8c16; box-shadow: 0 6px 20px rgba(250,140,22,0.15); }
.course-img { width: 100px; height: 100px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.course-info { flex: 1; min-width: 0; }
.course-title { font-size: 17px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.course-desc { font-size: 14px; color: #666; margin-bottom: 14px; line-height: 1.6; }
.course-price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.course-price { font-size: 24px; font-weight: 800; color: #ff4d4f; }
.course-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, #fa8c16, #d46b08);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

/* ===== 用户中心 ===== */
.user-center { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px 0 60px; }
.user-sidebar {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  height: fit-content;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 80px;
}
.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
  margin: 0 auto 12px;
}
.user-info-name { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.user-info-vip { text-align: center; font-size: 13px; color: #fa8c16; margin-bottom: 20px; }
.sidebar-menu { display: flex; flex-direction: column; gap: 4px; }
.sidebar-item {
  padding: 11px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  color: #555;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-item:hover { background: #f0f7ff; color: #1677ff; }
.sidebar-item.active { background: #e6f4ff; color: #1677ff; font-weight: 700; }
.user-main { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; color: #555; margin-bottom: 7px; font-weight: 600; }
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d9d9d9;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
  background: #fff;
  color: #333;
}
.form-input:focus { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,0.1); }
.form-input.error { border-color: #ff4d4f; }
.form-input::placeholder { color: #bbb; }

/* ===== 弹窗 ===== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 420px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
.modal-close:hover { color: #333; background: #f5f5f5; }
.modal-body { padding: 24px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 500px; }
th {
  background: #fafafa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #555;
  border-bottom: 2px solid #f0f0f0;
  white-space: nowrap;
}
td { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; color: #333; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.tag-success { background: #f6ffed; color: #52c41a; }
.tag-warning { background: #fff7e6; color: #fa8c16; }
.tag-error { background: #fff1f0; color: #ff4d4f; }
.tag-info { background: #e6f4ff; color: #1677ff; }
.tag-vip { background: linear-gradient(135deg, #ffd700, #ffa500); color: #fff; font-weight: 700; }

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.loading { text-align: center; padding: 60px 20px; color: #aaa; font-size: 16px; }
.empty { text-align: center; padding: 60px 20px; color: #aaa; }
.empty-icon { font-size: 52px; margin-bottom: 16px; }

/* Toast提示 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 11px 28px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.success { background: rgba(82,196,26,0.92); }
.toast.error { background: rgba(255,77,79,0.92); }
.toast.warning { background: rgba(250,140,22,0.92); }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #d9d9d9;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 500;
}
.page-btn:hover { border-color: #1677ff; color: #1677ff; }
.page-btn.active { background: #1677ff; border-color: #1677ff; color: #fff; }

/* ===== 页脚 ===== */
.footer {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 28px 0;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}
.footer p { margin: 5px 0; }

/* ===== VIP页 ===== */
.vip-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.vip-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 2px solid #f0f0f0;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}
.vip-card:hover { border-color: #1677ff; transform: translateY(-4px); box-shadow: 0 10px 28px rgba(22,119,255,0.15); }
.vip-card.featured { border-color: #fa8c16; background: linear-gradient(135deg, #fffbe6, #fff); }
.vip-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -1px;
  right: 20px;
  background: #fa8c16;
  color: #fff;
  padding: 4px 14px;
  border-radius: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 700;
}
.vip-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.vip-price { font-size: 44px; font-weight: 900; color: #ff4d4f; margin: 16px 0; }
.vip-price span { font-size: 18px; }
.vip-duration { color: #888; font-size: 14px; margin-bottom: 16px; }
.vip-features { text-align: left; margin-bottom: 24px; }
.vip-feature { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #555; padding: 5px 0; }
.vip-feature::before { content: '✓'; color: #52c41a; font-weight: 700; }

/* ===== 自动账号提示 ===== */
.auto-account {
  background: linear-gradient(135deg, #fff7e6, #fffbe6);
  border: 2px solid #fa8c16;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.auto-account h4 { color: #fa8c16; font-size: 16px; margin-bottom: 12px; }
.account-info { display: flex; gap: 24px; flex-wrap: wrap; }
.account-item { font-size: 15px; }
.account-item span { font-weight: 700; color: #1a1a2e; }

/* ===== Markdown内容 ===== */
.markdown-content h2 { font-size: 17px; color: #1677ff; margin: 16px 0 8px; font-weight: 700; }
.markdown-content h3 { font-size: 15px; color: #333; margin: 12px 0 6px; font-weight: 700; }
.markdown-content p { margin-bottom: 8px; line-height: 1.8; }
.markdown-content strong { color: #1a1a2e; }
.markdown-content ul { padding-left: 20px; margin-bottom: 8px; }
.markdown-content li { margin-bottom: 4px; line-height: 1.7; }

/* ===== 移动端提示横幅 ===== */
.mobile-app-banner {
  display: none;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  position: relative;
}
.mobile-app-banner a { color: #fff; font-weight: 700; text-decoration: underline; }
.mobile-app-banner .close-banner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 900px) {
  .profession-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  /* 导航 */
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  /* 移动端导航栏：隐藏登录/注册按钮和个人中心按钮，改用汉堡菜单 */
  .header-actions #btn-login,
  .header-actions #btn-register { display: none !important; }
  /* 已登录时的用户菜单：只保留用户名和退出按钮，隐藏个人中心按钮 */
  .header-actions #user-menu .btn-outline { display: none; }
  .header-actions #user-menu { gap: 6px; }
  .header-actions .btn-primary { padding: 7px 14px; font-size: 13px; }
  .header-inner { height: 54px; }
  .logo { font-size: 17px; }
  .logo img { height: 30px; width: 30px; }

  /* Hero */
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 22px; }

  /* 职业列表 */
  .profession-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .profession-card { padding: 16px; }
  .card-icon { font-size: 28px; }
  .card-name { font-size: 15px; }

  /* 用户中心 */
  .user-center { grid-template-columns: 1fr; }
  .user-sidebar { position: static; }

  /* VIP套餐卡片 */
  .vip-plans { grid-template-columns: 1fr; gap: 14px; }
  .vip-card { padding: 24px 20px; }
  .vip-price { font-size: 36px; margin: 12px 0; }
  .vip-name { font-size: 18px; }

  /* 自动账号提示 */
  .auto-account { padding: 16px; }
  .auto-account h4 { font-size: 14px; }
  .account-info { flex-direction: column; gap: 8px; }
  .account-item { font-size: 14px; }

  /* 结果页 */
  .score-card { padding: 28px 20px; }
  .score-number { font-size: 64px; }
  .score-stats { gap: 0; }
  .stat-num { font-size: 22px; }

  /* 支付 */
  .pay-options { flex-direction: column; align-items: center; }
  .pay-option { width: 100%; max-width: 280px; }

  /* 课程卡片 */
  .course-card { flex-direction: column; gap: 14px; }
  .course-img { width: 100%; height: 180px; }

  /* 移动端横幅 */
  .mobile-app-banner { display: block; }

  /* 容器 */
  .container { padding: 0 14px; }
}

@media (max-width: 480px) {
  /* 职业列表 */
  .profession-grid { grid-template-columns: 1fr; }
  .category-title { font-size: 17px; }

  /* VIP套餐 */
  .vip-price { font-size: 32px; }
  .vip-name { font-size: 16px; }

  /* 用户名截断 */
  .user-name { max-width: 60px; }

  /* 按钮 */
  .btn-lg { padding: 12px 24px; font-size: 15px; }
  .result-actions { flex-direction: column; align-items: center; }
  .result-actions .btn { width: 100%; max-width: 280px; }

  /* 结果页 */
  .score-card { padding: 24px 16px; border-radius: 16px; }
  .score-number { font-size: 56px; }
  .stat-num { font-size: 20px; }
  .stat-label { font-size: 11px; }

  /* 错题 */
  .wrong-item { padding: 14px; }
  .answer-row { flex-direction: column; gap: 6px; }

  /* 弹窗 */
  .modal { padding: 12px; }
  .modal-content { border-radius: 14px; }
  .modal-body { padding: 18px; }

  /* 容器 */
  .container { padding: 0 12px; }
}

/* ===== 安全区域（iPhone刘海屏） ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .exam-nav { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}
