/* ================================================
   AI 简历筛选助手 — style.css
   ================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f1a;
  --bg-card: rgba(18, 18, 32, 0.85);
  --bg-card-hover: rgba(24, 24, 44, 0.95);
  --border: rgba(99, 102, 241, 0.18);
  --border-hover: rgba(99, 102, 241, 0.45);

  --primary: #6366f1;
  --primary-2: #818cf8;
  --purple: #a855f7;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;

  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  --header-h: 64px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- 粒子背景 ---------- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp var(--dur, 12s) var(--delay, 0s) ease-in-out infinite;
  background: radial-gradient(circle, var(--color, #6366f1) 0%, transparent 70%);
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(1);   opacity: 0; }
  15%  { opacity: 0.45; }
  80%  { opacity: 0.2; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 20, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.logo-icon {
  width: 36px; height: 36px;
  animation: spinSlow 12s linear infinite;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a855f7, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* 导航选项卡 */
.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-tab:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  border-color: var(--border);
}
.nav-tab.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
  border-color: var(--primary);
  color: var(--primary-2);
}
.tab-icon { font-size: 1rem; }

/* API 配置按钮 */
.api-config { min-width: 120px; display: flex; justify-content: flex-end; }
.api-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-2);
  font-size: 0.83rem;
  transition: all var(--transition);
}
.api-btn:hover {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(99, 102, 241, 0.15);
}
.api-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background var(--transition);
}
.api-dot.connected { background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- 主内容区 ---------- */
.main {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ---------- Tab 切换 ---------- */
.tab-content { display: none; animation: fadeSlideIn 0.35s ease both; }
.tab-content.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Section Header ---------- */
.section-header {
  margin-bottom: 24px;
}
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.gradient-purple { background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(168,85,247,0.3)); border: 1px solid rgba(168,85,247,0.3); }
.gradient-blue   { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(6,182,212,0.3)); border: 1px solid rgba(6,182,212,0.3); }
.gradient-green  { background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(6,182,212,0.3)); border: 1px solid rgba(16,185,129,0.3); }

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ---------- 两列布局 ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.mb-4 { margin-bottom: 20px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.card-footer {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* ---------- 文本输入 ---------- */
.textarea {
  width: 100%;
  min-height: 300px;
  max-height: 480px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.7;
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.textarea::placeholder { color: var(--text-3); }

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 44px 10px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.input-wrapper { position: relative; }
.toggle-pw {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-3); font-size: 1rem;
  transition: color var(--transition);
}
.toggle-pw:hover { color: var(--text); }

/* ---------- 结果区域 ---------- */
.result-area {
  min-height: 300px;
  max-height: 480px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  flex: 1;
}
.result-area-lg { min-height: 420px; max-height: 600px; }
.result-area::-webkit-scrollbar { width: 5px; }
.result-area::-webkit-scrollbar-track { background: transparent; }
.result-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 10px;
  color: var(--text-3);
  text-align: center;
}
.empty-icon { font-size: 2.5rem; filter: grayscale(0.3); }
.empty-state p { font-size: 0.9rem; }
.empty-sub { font-size: 0.8rem; color: var(--text-3); }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.4); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-primary.btn-full { width: 100%; }
.btn-primary.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 14px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(99,102,241,0.07);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: rgba(99,102,241,0.14);
}
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text-2); }

.btn-sm  { padding: 5px 14px; font-size: 0.82rem; }
.btn-xs  { padding: 3px 10px; font-size: 0.78rem; }
.btn-icon { font-size: 1rem; }
.flex-1  { flex: 1; }
.gap-2   { gap: 10px; }
.mt-2    { margin-top: 8px; }

/* 加载动画 */
.btn-loader {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ---------- 拖拽上传区 ---------- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(99,102,241,0.06);
}
.drop-icon { font-size: 2.2rem; }
.drop-title { font-size: 0.92rem; font-weight: 500; color: var(--text-2); }
.drop-sub   { font-size: 0.8rem; color: var(--text-3); }

/* 文件列表 */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  animation: fadeIn 0.2s ease both;
}
.file-item:hover { border-color: var(--border-hover); }
.file-icon { font-size: 1.1rem; flex-shrink: 0; }
.file-name {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { font-size: 0.78rem; color: var(--text-3); flex-shrink: 0; }
.file-del {
  background: none; border: none;
  color: var(--text-3); font-size: 0.9rem;
  cursor: pointer; padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.file-del:hover { color: var(--red); background: rgba(239,68,68,0.1); }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--primary-2);
}
.badge-pass   { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #34d399; }
.badge-fail   { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25); color: #f87171; }
.result-badges { display: flex; gap: 8px; }

/* ---------- JD 状态条 ---------- */
.jd-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease;
}
.jd-status-bar.success {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25);
}
.jd-status-content { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); }
.jd-status-icon { font-size: 1rem; }

/* ---------- 岗位选择器 ---------- */
.position-selector-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.position-selector-label {
  font-size: 0.85rem;
  color: var(--text-2);
  white-space: nowrap;
}
.position-selector-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.position-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 0.83rem;
  transition: all var(--transition);
}
.position-btn:hover {
  border-color: var(--primary);
  color: var(--primary-2);
  background: rgba(99,102,241,0.1);
}
.position-btn.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(168,85,247,0.2));
  border-color: var(--primary);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(99,102,241,0.2);
}
.position-btn-icon { font-size: 1rem; }

/* ---------- 简历筛选结果卡片 ---------- */
.resume-result-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  animation: fadeIn 0.25s ease both;
  transition: border-color var(--transition);
}
.resume-result-item:hover { border-color: var(--border-hover); }
.resume-result-item.pass { border-left: 3px solid var(--green); }
.resume-result-item.fail { border-left: 3px solid var(--red); }

.rr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rr-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rr-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.rr-status.pass    { background: rgba(16,185,129,0.18);  color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.rr-status.fail    { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.rr-status.pending { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

/* 待定卡片左边框 */
.resume-result-item.pending { border-left: 3px solid var(--amber); }

/* 基本信息行 */
.rr-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rr-meta-item {
  font-size: 0.8rem;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 10px;
}
.rr-level-badge {
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 100px;
  padding: 2px 12px;
  margin-left: auto;
}

/* 核心经历区块 */
.rr-section { display: flex; flex-direction: column; gap: 6px; }
.rr-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rr-exp-list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rr-exp-list li {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* 附加亮点 / 备注 */
.rr-bonus {
  font-size: 0.82rem;
  color: #fbbf24;
  padding: 5px 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
}
.rr-remarks {
  font-size: 0.82rem;
  color: var(--text-3);
  padding: 5px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.rr-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-3);
}
.score-bar {
  height: 5px;
  width: 100px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.score-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.score-fill.low  { background: linear-gradient(90deg, var(--red),   #fb923c); }
.score-fill.mid  { background: linear-gradient(90deg, var(--amber),  #fbbf24); }
.score-fill.high { background: linear-gradient(90deg, var(--green),  var(--cyan)); }

.rr-reason {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ---------- 已通过简历列表 ---------- */
.passed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  min-height: 80px;
}
.passed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeIn 0.2s ease both;
}
.passed-item:hover { border-color: var(--primary); background: rgba(99,102,241,0.08); }
.passed-item.selected {
  border-color: var(--primary);
  background: rgba(99,102,241,0.15);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.passed-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  transition: all var(--transition);
}
.passed-item.selected .passed-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.passed-name {
  font-size: 0.84rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 维度选择 ---------- */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.dimension-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.dimension-item:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
}
.dimension-item input[type="checkbox"] { display: none; }
.dimension-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(99,102,241,0.12);
}
.dim-icon { font-size: 1.2rem; }
.dim-label { font-size: 0.88rem; color: var(--text-2); font-weight: 500; }

/* ---------- 面试题库结果 ---------- */
.question-section {
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease both;
}
.question-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.question-list { display: flex; flex-direction: column; gap: 10px; }
.question-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
  animation: fadeIn 0.2s ease both;
}
.question-item:hover { border-color: var(--border-hover); }
.q-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}
.q-content { flex: 1; }
.q-text { font-size: 0.88rem; color: var(--text); line-height: 1.65; }
.q-intent { font-size: 0.78rem; color: var(--text-3); margin-top: 5px; }

/* ---------- JD 分析结果渲染 ---------- */
.jd-analysis { display: flex; flex-direction: column; gap: 16px; }
.jd-skill-group { animation: fadeIn 0.3s ease both; }
.jd-skill-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.jd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid;
  animation: fadeIn 0.2s ease both;
}
.jd-tag.must   { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.35); color: var(--primary-2); }
.jd-tag.plus   { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #34d399; }
.jd-tag.bonus  { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.jd-summary {
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.75;
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #13132a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  padding: 0;
  box-shadow: var(--shadow);
  transform: scale(0.95);
  transition: transform var(--transition);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none;
  color: var(--text-3); font-size: 1rem;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.input-label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.modal-hint { font-size: 0.8rem; color: var(--text-3); }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Toast 通知 ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #1e1e38;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease both;
  pointer-events: auto;
  max-width: 320px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.35); }
.toast.info    { border-color: rgba(99,102,241,0.35); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}
.toast.out { animation: slideOutRight 0.3s ease forwards; }

/* ---------- 进度条 ---------- */
.progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 999;
  background: rgba(99,102,241,0.15);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple), var(--cyan));
  transition: width 0.3s ease;
  width: 0%;
}

/* ---------- 流式打字效果光标 ---------- */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary);
  vertical-align: text-bottom;
  animation: blink 0.9s ease-in-out infinite;
  margin-left: 2px;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- 通用动画 ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

/* ---------- 高亮 markdown 风格文字 ---------- */
.md-bold    { font-weight: 700; color: var(--text); }
.md-code    {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--primary-2);
}
.md-h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-2);
  margin: 12px 0 6px;
}
.md-p { font-size: 0.87rem; color: var(--text-2); line-height: 1.7; margin-bottom: 6px; }
.md-ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.md-ul li { font-size: 0.86rem; color: var(--text-2); line-height: 1.6; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .header-inner { padding: 0 14px; gap: 10px; }
  .logo-text { display: none; }
  .nav-tab span:last-child { display: none; }
  .main { padding: 16px 14px 48px; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
}
