* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #4f46e5; --primary-light: #818cf8; --primary-bg: #eef2ff;
  --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
  --bg: #f5f7fa; --card: #fff; --text: #1e293b; --text2: #64748b; --text3: #94a3b8;
  --border: #e2e8f0; --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; overflow: hidden; }
#app { height: 100%; display: flex; flex-direction: column; }

/* 头部 */
.app-header {
  padding: 12px 16px; padding-top: calc(12px + var(--safe-top));
  background: white; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); z-index: 100; min-height: 52px;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-left h1 { font-size: 17px; font-weight: 700; }
.back-btn { background: none; border: none; font-size: 22px; color: var(--text); cursor: pointer; padding: 4px; }
.user-badge {
  width: 40px; height: 40px; border-radius: 13px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; position: relative;
  box-shadow: 0 3px 12px rgba(245,158,11,0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255,255,255,0.4);
}
.user-badge::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: linear-gradient(90deg, transparent, #fde68a, transparent);
  border-radius: 2px; opacity: 0.8;
}
.user-badge:hover {
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.5);
}
.user-badge:active { transform: scale(0.95); }
.user-badge .crown-icon {
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
  animation: crownFloat 3s ease-in-out infinite;
  line-height: 1;
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(-2deg); }
  75% { transform: translateY(-1px) rotate(2deg); }
}
/* 非会员状态 */
.user-badge.guest {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.user-badge.guest .crown-icon { animation: none; opacity: 0.5; }

/* 页面容器 */
.page-container { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.page { display: none; min-height: 100%; }
.page.active { display: block; }

/* Banner */
.banner {
  margin: 16px; border-radius: 16px; padding: 24px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
}
.banner::after { content: ''; position: absolute; top: -30%; right: -10%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%; }
.banner-content { position: relative; z-index: 1; }
.banner h2 { font-size: 22px; margin-bottom: 4px; }
.banner p { font-size: 13px; opacity: 0.9; }
.banner-brand {
  position: relative; z-index: 1; flex-shrink: 0;
  font-size: 30px; font-weight: 900; letter-spacing: 3px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 12px rgba(0,0,0,0.15), 0 0 40px rgba(255,255,255,0.15);
  margin-left: 16px; white-space: nowrap;
}
@media (max-width: 420px) {
  .banner-brand { font-size: 22px; letter-spacing: 2px; }
  .banner { padding: 20px 16px; }
}

/* Section */
.section { margin: 0 16px 20px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--primary); }

/* 模块网格 */
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.module-card {
  background: white; border-radius: 12px; padding: 16px 8px; text-align: center;
  cursor: pointer; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.module-card:active { transform: scale(0.95); }
.module-icon {
  width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center; color: white; font-size: 22px;
}
.module-card span { display: block; font-size: 13px; font-weight: 600; }
.module-card small { display: block; font-size: 11px; color: var(--text3); margin-top: 2px; }
.premium-tag { color: var(--warning) !important; font-weight: 600; }
.free-tag { color: var(--success) !important; font-weight: 600; }

/* 真题套卷列表 */
/* 双栏布局（真题套卷 + 资料公享）自适应 */
.dual-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .dual-column {
    grid-template-columns: 1fr;
  }
}

.paper-list { display: flex; flex-direction: column; gap: 8px; }
.paper-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: white; border-radius: 10px; cursor: pointer; transition: 0.2s;
  border: 1px solid var(--border);
  min-height: 52px;
}
.paper-item:active { transform: scale(0.98); background: var(--bg); }
.paper-icon { font-size: 24px; flex-shrink: 0; width: 28px; text-align: center; }
.paper-info { flex: 1; min-width: 0; }
.paper-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper-info p { font-size: 12px; color: var(--text2); }
.paper-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--primary-bg); color: var(--primary); font-weight: 600; flex-shrink: 0; }
.paper-arrow { color: var(--text3); font-size: 16px; flex-shrink: 0; }

/* 政策列表 */
.policy-list { display: flex; flex-direction: column; gap: 10px; }
.policy-item {
  background: white; border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.policy-item:active { transform: scale(0.98); }
.policy-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.policy-info { flex: 1; }
.policy-info h3 { font-size: 15px; margin-bottom: 2px; }
.policy-info p { font-size: 12px; color: var(--text3); }
.policy-arrow { color: var(--text3); font-size: 18px; }

/* 计时器栏 */
.timer-bar {
  background: white; padding: 12px 16px; position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
}
.timer-info { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.timer-label { font-size: 14px; font-weight: 600; }
.timer-count { font-size: 16px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.3s; width: 0; }
.progress-text { font-size: 12px; color: var(--text3); margin-top: 4px; display: block; text-align: right; }

/* 题目卡片 */
.question-card {
  margin: 16px; padding: 20px; background: white; border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); min-height: 200px;
  padding-bottom: 80px;
}
.q-type-badge {
  display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px;
  font-weight: 600; margin-bottom: 12px;
}
.q-type-badge.single { background: #ede9fe; color: #7c3aed; }
.q-type-badge.multiple { background: #fce7f3; color: #db2777; }
.q-type-badge.judge { background: #dbeafe; color: #2563eb; }
.q-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.q-difficulty { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.q-difficulty.easy { background: #dcfce7; color: #166534; }
.q-difficulty.medium { background: #fef9c3; color: #854d0e; }
.q-difficulty.hard { background: #fee2e2; color: #991b1b; }
.q-title { font-size: 16px; line-height: 1.7; margin-bottom: 16px; font-weight: 500; }

/* 选项 */
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: 0.2s;
  user-select: none;
}
.option-item:active { transform: scale(0.98); }
.option-item.selected { border-color: var(--primary); background: var(--primary-bg); }
.option-item.correct { border-color: var(--success); background: #d1fae5; }
.option-item.wrong { border-color: var(--danger); background: #fee2e2; }
.option-item.disabled { pointer-events: none; }
.option-key {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  font-weight: 700; flex-shrink: 0; transition: 0.2s;
}
.option-item.selected .option-key { border-color: var(--primary); background: var(--primary); color: white; }
.option-item.correct .option-key { border-color: var(--success); background: var(--success); color: white; }
.option-item.wrong .option-key { border-color: var(--danger); background: var(--danger); color: white; }
.option-text { flex: 1; line-height: 1.6; font-size: 14px; padding-top: 3px; }

/* 判断题选项 */
.judge-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.judge-btn {
  padding: 20px; border: 2px solid var(--border); border-radius: 12px;
  background: white; cursor: pointer; text-align: center; font-size: 16px; font-weight: 600;
  transition: 0.2s;
}
.judge-btn:active { transform: scale(0.96); }
.judge-btn.selected { border-color: var(--primary); background: var(--primary-bg); }
.judge-btn.correct { border-color: var(--success); background: #d1fae5; }
.judge-btn.wrong { border-color: var(--danger); background: #fee2e2; }
.judge-btn i { display: block; font-size: 28px; margin-bottom: 6px; }

/* 解析 */
.explanation-box {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px;
  background: #f0fdf4; border-left: 4px solid var(--success);
  animation: slideDown 0.3s ease;
}
.explanation-box.wrong-box { background: #fef2f2; border-left-color: var(--danger); }
.explanation-box h4 { font-size: 13px; margin-bottom: 6px; }
.explanation-box p { font-size: 13px; line-height: 1.7; color: var(--text2); }
.explanation-lock {
  margin-top: 16px; padding: 16px; border-radius: 10px; background: #fffbeb;
  border: 1px dashed var(--warning); text-align: center; cursor: pointer;
}
.explanation-lock i { font-size: 24px; color: var(--warning); display: block; margin-bottom: 6px; }
.explanation-lock p { font-size: 13px; color: var(--text2); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* 操作栏 */
.action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: white; border-top: 1px solid var(--border);
  display: flex; gap: 10px; z-index: 100;
}
.action-btn {
  flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: 0.2s; display: flex;
  align-items: center; justify-content: center; gap: 6px;
}
.action-btn:active { transform: scale(0.97); }
.action-btn.primary { background: var(--primary); color: white; }
.action-btn.secondary { background: var(--bg); color: var(--text); }
.action-btn.danger { background: var(--danger); color: white; }
.action-btn[disabled] { opacity: 0.5; pointer-events: none; }

/* 结果页 */
.result-card { margin: 16px; text-align: center; }
.result-card .score-ring {
  width: 160px; height: 160px; border-radius: 50%; margin: 20px auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; position: relative;
}
.result-card .score-ring::before {
  content: ''; position: absolute; inset: 6px; border-radius: 50%; background: white;
}
.result-card .score-ring span { position: relative; z-index: 1; }
.result-card .score-ring small { position: relative; z-index: 1; font-size: 14px; font-weight: 500; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.result-stat { background: white; border-radius: 12px; padding: 16px; }
.result-stat h3 { font-size: 24px; font-weight: 700; }
.result-stat p { font-size: 12px; color: var(--text3); }
.result-actions { display: flex; gap: 12px; margin-top: 20px; }
.result-actions button { flex: 1; }

/* 个人中心 */
.profile-card { padding: 16px; }
.profile-header { text-align: center; padding: 24px; background: white; border-radius: 16px; margin-bottom: 16px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-bg); color: var(--primary); font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; margin-top: 8px; }
.profile-tag.premium { background: linear-gradient(135deg,#f59e0b,#ef4444); color: white; }
.profile-tag.normal { background: var(--border); color: var(--text2); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.profile-stat { background: white; border-radius: 12px; padding: 16px; text-align: center; }
.profile-stat h3 { font-size: 22px; font-weight: 700; color: var(--primary); }
.profile-stat p { font-size: 12px; color: var(--text3); }
.profile-menu { background: white; border-radius: 16px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: 0.2s;
}
.menu-item:last-child { border: none; }
.menu-item:active { background: var(--bg); }
.menu-item i { font-size: 20px; color: var(--text2); width: 24px; text-align: center; }
.menu-item span { flex: 1; font-size: 14px; }
.menu-item .arrow { color: var(--text3); }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: white; border-radius: 20px 20px 0 0; padding: 24px; width: 100%;
  max-width: 500px; max-height: 80vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--text3); cursor: pointer; }

/* Tab */
.activate-tabs { display: flex; gap: 0; margin-bottom: 16px; background: var(--bg); border-radius: 10px; padding: 4px; }
.tab-btn {
  flex: 1; padding: 10px; border: none; background: transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s; color: var(--text2);
}
.tab-btn.active { background: white; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 激活相关 */
.tip { color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.input-group { margin-bottom: 16px; }
.input-group input { width: 100%; padding: 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 15px; outline: none; }
.input-group input:focus { border-color: var(--primary); }
.btn-primary {
  width: 100%; padding: 14px; background: var(--primary); color: white; border: none;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.free-steps { margin: 16px 0; }
.step { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.step p { font-size: 14px; }
.qr-placeholder {
  text-align: center; padding: 24px; background: var(--bg); border-radius: 12px; margin-top: 16px;
}
.qr-placeholder p { margin-top: 8px; font-size: 14px; color: var(--text2); }

/* 加载 */
.loading { text-align: center; padding: 40px; color: var(--text3); }
.loading i { font-size: 32px; animation: spin 1s linear infinite; display: block; margin-bottom: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 分页加载 */
.load-more { text-align: center; padding: 16px; }
.load-more button { padding: 10px 24px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 14px; }

/* AI分析 */
.analysis-result { font-size: 14px; line-height: 1.8; white-space: pre-wrap; }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text3); }
.empty i { font-size: 48px; display: block; margin-bottom: 12px; }

/* ========== 底部导航 ========== */
.bottom-nav {
  display: flex; background: white; border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom); z-index: 100;
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 8px 0; cursor: pointer; color: var(--text3);
  font-size: 11px; transition: 0.2s; gap: 2px;
}
.nav-tab i { font-size: 22px; }
.nav-tab.active { color: var(--primary); }
.bottom-nav.hidden { display: none; }

/* ========== 公告栏 ========== */
.announcement-bar {
  margin: 12px 16px; padding: 10px 14px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #92400e; overflow: hidden;
}
.announcement-bar i { color: var(--warning); flex-shrink: 0; }
.announcement-bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 登录/注册 (v2) ========== */
.auth-container {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 0; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
.auth-container::before {
  content: ''; position: absolute; top: -40%; left: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%; animation: authFloat 8s ease-in-out infinite;
}
.auth-container::after {
  content: ''; position: absolute; bottom: -30%; right: -15%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%; animation: authFloat 10s ease-in-out infinite reverse;
}
@keyframes authFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}

.auth-box {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  margin: 16px; animation: authSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶部品牌区 */
.auth-logo {
  text-align: center; margin-bottom: 28px; color: white;
}
.auth-avatar {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.auth-logo h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; text-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.auth-logo p { font-size: 14px; opacity: 0.85; }

/* 表单卡片 */
.auth-form {
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2);
}

/* Tab切换 */
.auth-tabs {
  display: flex; background: #f1f5f9; border-radius: 12px; padding: 4px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center; border: none; background: transparent;
  border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-tab.active {
  background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 输入框 */
.auth-form .input-group { margin-bottom: 16px; position: relative; }
.auth-form .input-group .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text3); pointer-events: none; transition: color 0.2s;
}
.auth-form .input-group input {
  width: 100%; padding: 14px 14px 14px 44px;
  border: 2px solid #e2e8f0; border-radius: 12px;
  font-size: 15px; outline: none; transition: all 0.25s;
  background: #f8fafc;
}
.auth-form .input-group input:focus {
  border-color: var(--primary); background: white;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}
.auth-form .input-group input:focus + .input-icon,
.auth-form .input-group input:focus ~ .input-icon { color: var(--primary); }
.auth-form .input-group input::placeholder { color: #94a3b8; }

/* 密码可见切换 */
.auth-form .input-group .pwd-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 18px; color: var(--text3);
  cursor: pointer; padding: 4px; transition: color 0.2s;
}
.auth-form .input-group .pwd-toggle:hover { color: var(--primary); }

/* 登录按钮 */
.auth-form .btn-primary {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white; margin-top: 4px; transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
  position: relative; overflow: hidden;
}
.auth-form .btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.auth-form .btn-primary:hover::after { opacity: 1; }
.auth-form .btn-primary:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(102,126,234,0.3); }

/* 辅助链接 */
.auth-links {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--text2);
}
.auth-links a {
  color: var(--primary); cursor: pointer; font-weight: 600; text-decoration: none;
  transition: color 0.2s;
}
.auth-links a:hover { color: #4338ca; }

/* 会员码提示 */
.auth-invite-info {
  margin-top: 16px; padding: 14px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 12px; font-size: 13px; color: #92400e; text-align: center;
  border: 1px solid #fcd34d;
}

/* 购买会员码按钮 */
.auth-buy-btn {
  display: block; margin-top: 14px; padding: 13px; text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}
.auth-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.4); }

/* 自适应 */
@media (max-width: 380px) {
  .auth-box { margin: 10px; }
  .auth-form { padding: 22px 18px; }
  .auth-logo h2 { font-size: 22px; }
  .auth-avatar { width: 60px; height: 60px; font-size: 30px; border-radius: 18px; }
}
@media (min-width: 768px) {
  .auth-box { max-width: 440px; }
  .auth-form { padding: 36px 32px; }
  .auth-logo h2 { font-size: 28px; }
}

/* ========== AI批改页面 ========== */
.review-container { padding: 16px; }
.review-header {
  background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 16px;
  padding: 24px 20px; color: white; margin-bottom: 16px;
}
.review-header h2 { font-size: 20px; margin-bottom: 4px; }
.review-header p { font-size: 13px; opacity: 0.85; }
.review-credits {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 8px 12px; background: rgba(255,255,255,0.15); border-radius: 8px;
  font-size: 13px;
}
.review-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }






.review-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.review-form textarea {
  width: 100%; min-height: 100px; padding: 14px; border: 2px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: inherit; resize: vertical;
  outline: none; transition: 0.2s; margin-bottom: 16px;
}
.review-form textarea:focus { border-color: var(--primary); }
.review-tip {
  padding: 12px; background: #fffbeb; border-radius: 10px; margin-bottom: 16px;
  font-size: 13px; color: #92400e; line-height: 1.6;
}
.review-history { margin-top: 16px; }
.review-history h3 { font-size: 16px; margin-bottom: 12px; }
.review-item {
  background: white; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s;
}
.review-item:active { background: var(--bg); }
.review-item .type-badge {
  padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.review-item .type-badge.official { background: #dbeafe; color: #2563eb; }
.review-item .type-badge.essay { background: #ede9fe; color: #7c3aed; }
.review-item .info { flex: 1; }
.review-item .info .date { font-size: 12px; color: var(--text3); }
.review-item .score { font-size: 18px; font-weight: 700; color: var(--primary); }
.review-item .status-pending { color: var(--warning); font-size: 13px; }
.review-detail { background: white; border-radius: 16px; padding: 20px; }
.review-detail .score-big {
  text-align: center; font-size: 48px; font-weight: 800; color: var(--primary);
  margin: 16px 0;
}
.review-detail .score-big small { font-size: 16px; color: var(--text3); font-weight: 400; }
.review-detail .review-text { font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.review-purchase {
  text-align: center; padding: 20px; background: white; border-radius: 16px; margin-top: 16px;
}
.review-purchase .price { font-size: 32px; font-weight: 800; color: var(--primary); }
.review-purchase .price small { font-size: 14px; color: var(--text3); font-weight: 400; }
.btn-secondary {
  width: 100%; padding: 14px; background: var(--bg); color: var(--text); border: none;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px;
}

/* ========== PK对战 ========== */
.pk-container { padding: 16px; }
.pk-battle-card {
  background: white; border-radius: 16px; padding: 20px; margin-bottom: 12px;
}
.pk-battle-card .vs { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0; }
.pk-battle-card .player { text-align: center; }
.pk-battle-card .player .name { font-size: 14px; font-weight: 600; }
.pk-battle-card .player .score { font-size: 28px; font-weight: 800; color: var(--primary); }
.pk-battle-card .vs-text { font-size: 20px; font-weight: 800; color: var(--danger); }
.pk-timer { text-align: center; font-size: 24px; font-weight: 700; color: var(--primary); margin: 12px 0; }
.pk-status { text-align: center; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.pk-status.waiting { background: #fffbeb; color: #92400e; }
.pk-status.playing { background: #dbeafe; color: #1e40af; }
.pk-status.finished { background: #d1fae5; color: #065f46; }

/* ========== 排行榜 ========== */
.leaderboard-container { padding: 16px; }
.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.leaderboard-tabs button {
  flex: 1; padding: 10px; border: none; background: var(--bg); border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s; color: var(--text2);
}
.leaderboard-tabs button.active { background: var(--primary); color: white; }
.leaderboard-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: white; border-radius: 12px; margin-bottom: 8px;
}
.leaderboard-item .rank {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  background: var(--bg); color: var(--text2);
}
.leaderboard-item .rank.top1 { background: #fef3c7; color: #92400e; }
.leaderboard-item .rank.top2 { background: #e2e8f0; color: #475569; }
.leaderboard-item .rank.top3 { background: #fed7aa; color: #9a3412; }
.leaderboard-item .name { flex: 1; font-size: 14px; font-weight: 600; }
.leaderboard-item .stat { font-size: 14px; color: var(--primary); font-weight: 700; }

/* ========== 好友 ========== */
.friend-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: white; border-radius: 12px; margin-bottom: 8px;
}
.friend-item .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary-bg);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.friend-item .info { flex: 1; }
.friend-item .info .name { font-size: 14px; font-weight: 600; }
.friend-item .info .status { font-size: 12px; color: var(--text3); }
.friend-item .actions { display: flex; gap: 8px; }
.friend-item .actions button {
  padding: 6px 14px; border: none; border-radius: 8px; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.friend-item .actions .btn-accept { background: var(--primary); color: white; }
.friend-item .actions .btn-pk { background: var(--success); color: white; }
.friend-item .actions .btn-remove { background: var(--bg); color: var(--text2); }

/* ========== 高级版功能列表 ========== */
.premium-features { margin-bottom: 20px; }
.feature-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  font-size: 14px; color: var(--text);
}
.feature-item i { color: var(--success); font-size: 18px; }

/* ========== 邀请区域 ========== */
.invite-section {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.invite-section h4 { font-size: 15px; margin-bottom: 8px; }
.invite-progress {
  background: var(--bg); border-radius: 10px; padding: 12px; margin: 12px 0;
}
.invite-progress span { font-size: 13px; color: var(--text2); }
.invite-progress strong { color: var(--primary); }

/* ========== 购买卡片 ========== */
.buy-card {
  text-align: center; padding: 24px; background: var(--bg); border-radius: 16px;
}
.buy-price {
  font-size: 40px; font-weight: 800; color: var(--primary); margin-bottom: 4px;
}
.buy-price small { font-size: 14px; color: var(--text3); font-weight: 400; }
.buy-card p { font-size: 14px; color: var(--text2); margin-bottom: 16px; }

/* ========== 分享按钮 ========== */
#btn-share { flex: 0.5; }

/* 资料公享卡片 */
.share-card:active { transform: scale(0.96); }

/* 推题模式设置 */
.push-mode-card:active {
  transform: scale(0.98);
}

/* 推题模式快捷开关 */
.push-toggle {
  display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px;
  border: 2px solid var(--border); border-radius: 8px;
  background: white; cursor: pointer; transition: all 0.2s;
}
.push-toggle:active { transform: scale(0.9); }
.push-toggle.active {
  border-color: var(--primary); background: var(--primary-bg);
  box-shadow: 0 0 0 1px var(--primary);
}
.push-icon { font-size: 14px; line-height: 1; }
.push-label { font-size: 11px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.push-toggle.active .push-label { color: var(--primary); }

/* 解析遮挡 */
.explanation-box {
  border-radius: 12px;
  overflow: hidden;
}

.explanation-header:hover {
  opacity: 0.9;
}

/* 好友搜索框大屏适配 */
@media (min-width: 768px) {
  #add-friend-input {
    font-size: 16px !important;
    padding: 16px 20px !important;
  }
}

/* AI批改页面样式 */
.review-credits {
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}





/* 系统题目卡片 */
.system-q-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

/* 学习分析历史 */
.analysis-history-item {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 12px;
}

/* PK结果消息动画 */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.05); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}


/* v2.1: 题目编号徽章 */
.q-no-badge {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: 'SF Mono', 'Menlo', monospace;
  letter-spacing: 0.5px;
}

/* v2.1: 反馈按钮 */
.feedback-btn {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 10px;
  border: 1.5px solid #fca5a5;
  border-radius: 16px;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  white-space: nowrap;
}
.feedback-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  transform: scale(1.05);
}
.feedback-btn:active {
  transform: scale(0.95);
}

/* v2.1: 结束按钮 */
.action-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
}
.action-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ========== AI批改页面交互反馈 ========== */

/* 系统题目卡片 */
.sq-item {
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.sq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.12);
  transform: translateY(-1px);
}
.sq-item:active {
  transform: scale(0.98);
  background: var(--bg);
}

/* 筛选按钮 */





/* 批改类型卡片 */





/* 批改历史项 */
.review-history-item {
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.review-history-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.08);
}
.review-history-item:active {
  transform: scale(0.98);
  background: var(--bg);
}

/* 提交按钮 */
.btn-submit-review {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-submit-review:hover {
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  transform: translateY(-1px);
}
.btn-submit-review:active {
  transform: scale(0.98);
}
.btn-submit-review:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========== 批改类型卡片（统一） ========== */
.review-type-card {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
}
.review-type-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.12);
}
.review-type-card.active {
  border-color: var(--primary);
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.15);
}
.review-type-card:active {
  transform: scale(0.96);
}
.review-type-card h4 { font-size: 15px; margin-bottom: 4px; }
.review-type-card p { font-size: 12px; color: var(--text3); }

/* ========== 筛选按钮（统一） ========== */
.filter-btn {
  padding: 6px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.filter-btn:active {
  transform: scale(0.95);
}
