/* ── 使用系统字体，避免 Google Fonts 网络请求失败 ── */
@font-face {
  font-family: 'Inter';
  src: local('Inter'), local('Helvetica Neue'), local('Arial');
  font-weight: 100 900;
}

:root {
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', 'Georgia', serif;
}

:root {
  --primary: #7B4FD4;
  --primary-light: #9D72E8;
  --primary-dark: #5A34A8;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --bg-dark: #0D0B1A;
  --bg-card: #1A1530;
  --bg-card2: #221B3A;
  --text-primary: #F0EBF8;
  --text-secondary: #9B8FBD;
  --text-muted: #5E5480;
  --success: #4ECDC4;
  --warning: #FFB347;
  --danger: #FF6B6B;
  --border: rgba(123,79,212,0.3);
  --border-gold: rgba(212,175,55,0.4);
  --glow: rgba(123,79,212,0.5);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(123,79,212,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Background Particles ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(123,79,212,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(212,175,55,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(78,205,196,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Step Progress Bar ── */
.step-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,11,26,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.step-progress .brand {
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--primary-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.step-dots { display: flex; align-items: center; gap: 8px; }
.step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-muted); transition: var(--transition);
}
.step-dot.active { background: var(--primary-light); box-shadow: 0 0 8px var(--primary); width: 28px; border-radius: 5px; }
.step-dot.done { background: var(--gold); }
.step-label { font-size: 0.8rem; color: var(--text-secondary); }
.progress-bar-track {
  position: fixed; top: 52px; left: 0; right: 0; height: 3px;
  background: rgba(123,79,212,0.15); z-index: 99;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.5s ease; box-shadow: 0 0 10px var(--primary);
}

/* ── Page Container ── */
.page-container {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: 80px 24px 60px;
  min-height: 100vh;
}
.page-container.wide { max-width: 1100px; }

/* ── Glass Card ── */
.glass-card {
  background: rgba(26,21,48,0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow), var(--shadow-glow);
  position: relative; overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), var(--gold), transparent);
  opacity: 0.6;
}
.glass-card-sm { padding: 24px; border-radius: var(--radius); }

/* ── Typography ── */
.title-gradient {
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 700; line-height: 1.3;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-light) 50%, var(--primary-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { font-size: 1rem; color: var(--text-secondary); margin-top: 8px; }
.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 20px;
}

/* ── Form Controls ── */
.form-group { margin-bottom: 24px; }
.form-label {
  display: block; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.02em;
}
.form-label .required { color: var(--gold); margin-left: 3px; }
.form-control {
  width: 100%;
  background: rgba(34,27,58,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(123,79,212,0.2);
  background: rgba(42,33,72,0.9);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control option { background: #1A1530; color: var(--text-primary); }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width:600px){ .form-row { grid-template-columns: 1fr; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; letter-spacing: 0.02em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(123,79,212,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123,79,212,0.6);
}
.btn-gold {
  background: linear-gradient(135deg, #B8940F, var(--gold), var(--gold-light));
  color: #0D0B1A; font-weight: 700;
  box-shadow: 0 4px 20px rgba(212,175,55,0.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(212,175,55,0.5); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--primary-light); color: var(--primary-light); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-icon { font-size: 1.1rem; }

/* ── Tags / Chips ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 7px 16px; border-radius: 50px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 0.85rem;
  cursor: pointer; transition: var(--transition);
}
.chip:hover { border-color: var(--primary-light); color: var(--primary-light); }
.chip.selected {
  background: rgba(123,79,212,0.2);
  border-color: var(--primary-light); color: var(--primary-light);
}

/* ── Range Slider ── */
.range-wrap { position: relative; }
input[type=range] {
  width: 100%; height: 6px; appearance: none; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary) var(--pct,50%), rgba(123,79,212,0.2) var(--pct,50%));
  outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--primary-light));
  box-shadow: 0 0 10px rgba(212,175,55,0.5); cursor: pointer;
}
.range-labels { display: flex; justify-content: space-between; margin-top: 6px; }
.range-labels span { font-size: 0.78rem; color: var(--text-muted); }
.range-value {
  text-align: center; font-size: 1.5rem; font-weight: 700;
  color: var(--gold); margin-bottom: 8px;
}

/* ── Blockchain Notice ── */
.blockchain-notice {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(78,205,196,0.08);
  border: 1px solid rgba(78,205,196,0.25);
  border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 32px;
}
.blockchain-notice .bc-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.blockchain-notice p { font-size: 0.85rem; color: #7EEDEA; line-height: 1.6; }
.blockchain-notice strong { color: var(--success); }
.hash-ticker {
  font-family: 'Courier New', monospace; font-size: 0.72rem;
  color: var(--success); opacity: 0.7; word-break: break-all;
  margin-top: 6px; display: none;
}
.hash-ticker.visible { display: block; }

/* ── Navigation Buttons ── */
.nav-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Divider ── */
.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 32px 0;
}

/* ── Alerts ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 0.875rem; line-height: 1.6; margin-bottom: 20px;
}
.alert-info { background: rgba(123,79,212,0.1); border: 1px solid rgba(123,79,212,0.3); color: var(--primary-light); }
.alert-success { background: rgba(78,205,196,0.1); border: 1px solid rgba(78,205,196,0.3); color: var(--success); }
.alert-warn { background: rgba(255,179,71,0.1); border: 1px solid rgba(255,179,71,0.3); color: var(--warning); }

/* ── Loading Spinner ── */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(123,79,212,0.2);
  border-top-color: var(--primary-light);
  animation: spin 0.8s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Glow Pulse ── */
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 20px rgba(123,79,212,0.3); }
  50% { box-shadow: 0 0 40px rgba(123,79,212,0.6), 0 0 60px rgba(212,175,55,0.2); }
}
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* ── Fade In ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }
.fade-in-delay-1 { animation: fadeInUp 0.5s 0.1s ease both; }
.fade-in-delay-2 { animation: fadeInUp 0.5s 0.2s ease both; }
.fade-in-delay-3 { animation: fadeInUp 0.5s 0.3s ease both; }

/* ── Responsive ── */
@media(max-width:600px) {
  .glass-card { padding: 24px 18px; }
  .title-gradient { font-size: 1.5rem; }
  .page-container { padding: 72px 16px 40px; }
}

/* ── Douyin Floating Banner ── */
.douyin-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(90deg, #0D0B1A 0%, #1a1535 40%, #160e2a 60%, #0D0B1A 100%);
  border-bottom: 1px solid rgba(212,175,55,0.25);
  padding: 5px 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.76rem; color: var(--text-muted);
  backdrop-filter: blur(8px);
  animation: bannerSlide 0.4s ease;
}
@keyframes bannerSlide { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.douyin-banner .dy-icon { font-size: 0.9rem; }
.douyin-banner .dy-handle {
  color: var(--gold); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.01em;
}
.douyin-banner .dy-sep { color: var(--text-muted); opacity: 0.4; }
/* Push all fixed elements down by banner height */
.step-progress { top: 28px !important; }
.progress-bar-track { top: 80px !important; }
.page-container { padding-top: 100px !important; }

/* ── PWA Install Banner ── */
.pwa-install-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
  background: rgba(26,21,48,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-gold);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pwa-install-bar.hidden { display: none !important; }
.pwa-install-icon { font-size: 1.6rem; flex-shrink: 0; }
.pwa-install-text { flex: 1; font-size: 0.82rem; color: var(--text-secondary); }
.pwa-install-text strong { color: var(--text-primary); display: block; font-size: 0.9rem; }
.pwa-install-btn {
  padding: 8px 18px; background: linear-gradient(135deg,var(--gold),#B8940F);
  color: #0D0B1A; font-weight: 700; font-size: 0.82rem; border: none;
  border-radius: 50px; cursor: pointer; font-family: var(--font-sans);
  white-space: nowrap; flex-shrink: 0;
}
.pwa-dismiss { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; }

/* ── Mobile Enhancements ── */
@media(max-width:768px) {
  .page-container { padding-top: 96px !important; }
  .btn { min-height: 48px; } /* Touch-friendly tap target */
  .chip { min-height: 44px; display: flex; align-items: center; }
  .form-control { font-size: 16px; } /* Prevent iOS zoom on focus */
}

/* ── Auth Badge (全局登录状态) ── */
.auth-badge {
  position: fixed; top: 32px; right: 24px; z-index: 9998;
  display: flex; align-items: center; gap: 8px;
  background: rgba(26,21,48,0.9); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 50px;
  padding: 5px 14px 5px 5px; cursor: pointer;
  transition: var(--transition);
}
.auth-badge:hover { border-color: var(--primary-light); box-shadow: 0 4px 20px rgba(123,79,212,0.3); }
.auth-badge-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); object-fit: cover; }
.auth-badge-name { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-badge-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: rgba(26,21,48,0.95); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; min-width: 220px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.auth-badge-dropdown.visible { display: block; animation: fadeInUp 0.2s ease; }
.auth-dd-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.auth-dd-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); }
.auth-dd-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.auth-dd-method { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.auth-dd-divider { height: 1px; background: var(--border); margin: 10px 0; }
.auth-dd-item {
  padding: 8px 12px; border-radius: 8px; font-size: 0.82rem;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.auth-dd-item:hover { background: rgba(123,79,212,0.15); color: var(--danger); }

/* ── Auth Info Bar (form.html 已登录状态) ── */
.auth-info-bar {
  display: flex; align-items: center; gap: 14px;
  background: rgba(123,79,212,0.08); border: 1px solid rgba(123,79,212,0.25);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 24px;
}
.auth-info-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); flex-shrink: 0; }
.auth-info-content { flex: 1; }
.auth-info-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.auth-info-detail { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.auth-info-actions { display: flex; gap: 8px; }
.auth-switch-btn {
  font-size: 0.75rem; color: var(--text-muted); background: none;
  border: 1px solid rgba(123,79,212,0.2); border-radius: 50px;
  padding: 4px 12px; cursor: pointer; transition: var(--transition);
  font-family: var(--font-sans);
}
.auth-switch-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* ══════════════════════════════════════════════
   PREMIUM FEATURES — 双栏布局 + 付费墙 + 模块
   ══════════════════════════════════════════════ */

/* ── Report Dual-Column Layout ── */
.report-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  max-width: 1440px;
  margin: 0 auto;
  height: calc(100vh - 120px);
}
.report-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,79,212,0.3) transparent;
}
.report-main::-webkit-scrollbar { width: 4px; }
.report-main::-webkit-scrollbar-thumb { background: rgba(123,79,212,0.3); border-radius: 2px; }

.premium-sidebar {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,79,212,0.3) transparent;
  padding-right: 10px;
}
.premium-sidebar::-webkit-scrollbar { width: 4px; }
.premium-sidebar::-webkit-scrollbar-thumb { background: rgba(123,79,212,0.3); border-radius: 2px; }

@media(max-width: 1100px) {
  .report-layout { flex-direction: column; height: auto; }
  .report-main { height: auto; overflow-y: visible; padding-right: 0; }
  .premium-sidebar {
    width: 100%;
    height: auto;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* ── Premium Module Card ── */
.premium-module {
  background: rgba(26,21,48,0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.premium-module.collapsed .premium-module-body,
.premium-module.collapsed .pm-tabs {
  display: none;
}
.premium-module-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(123,79,212,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.premium-module.collapsed .premium-module-header {
  border-bottom: none;
  padding-bottom: 20px;
}
.pm-toggle-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.premium-module:not(.collapsed) .pm-toggle-icon {
  transform: rotate(180deg);
}
.premium-module-header .pm-icon { font-size: 1.3rem; }
.premium-module-header .pm-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.premium-module-header .pm-badge {
  font-size: 0.68rem;
  padding: 2px 10px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.premium-module-body {
  padding: 20px 24px 24px;
  position: relative;
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,79,212,0.6) transparent;
}
.premium-module-body::-webkit-scrollbar { width: 6px; }
.premium-module-body::-webkit-scrollbar-thumb { background: rgba(123,79,212,0.6); border-radius: 10px; }
.premium-module-body::-webkit-scrollbar-track { background: transparent; }

/* ── High-Intensity Paywall ── */
.premium-paywall {
  position: absolute;
  inset: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(0.3);
  background: rgba(13,11,26,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: inherit;
  user-select: none;
  cursor: default;
}
.premium-paywall * { pointer-events: auto; }
.paywall-lock-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4));
  animation: paywall-pulse 2.5s ease-in-out infinite;
}
@keyframes paywall-pulse {
  0%,100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
}
.paywall-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}
.paywall-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 260px;
  line-height: 1.6;
}
.paywall-btn {
  margin-top: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--gold), #B8940F);
  color: #0D0B1A;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}
.paywall-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,175,55,0.5);
}

/* ── Resume Module Styles ── */
.resume-form-section { margin-bottom: 20px; }
.resume-form-section .section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.exp-entry {
  background: rgba(34,27,58,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}
.exp-entry .exp-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,107,107,0.15);
  border: 1px solid rgba(255,107,107,0.3);
  color: var(--danger);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.exp-entry .exp-remove:hover { background: rgba(255,107,107,0.3); }
.exp-entry .form-row { margin-bottom: 10px; }
.exp-entry .form-control { font-size: 0.85rem; padding: 8px 12px; }
.add-exp-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(123,79,212,0.08);
  border: 1px dashed rgba(123,79,212,0.3);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: var(--transition);
  font-family: var(--font-sans);
}
.add-exp-btn:hover { background: rgba(123,79,212,0.15); border-color: var(--primary-light); }
.skill-tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(34,27,58,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 44px;
  align-items: center;
  cursor: text;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(123,79,212,0.2);
  border: 1px solid rgba(123,79,212,0.3);
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--primary-light);
}
.skill-tag .remove {
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0.6;
  transition: var(--transition);
}
.skill-tag .remove:hover { opacity: 1; color: var(--danger); }
.skill-tags-input input {
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  min-width: 80px;
  flex: 1;
  font-family: var(--font-sans);
}

/* ── Resume Template (White + Deep Blue) ── */
.resume-preview-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  overflow: hidden;
  margin: 16px 0;
  max-height: 600px;
  overflow-y: auto;
}
.resume-template {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 800px;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: #333;
}
.resume-left {
  background: #1a3a5c;
  color: #fff;
  padding: 28px 18px;
}
.resume-left .resume-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.resume-left .resume-target {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.resume-left .rl-section {
  margin-bottom: 18px;
}
.resume-left .rl-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.resume-left .rl-item {
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.resume-left .rl-item .rl-icon { flex-shrink: 0; font-size: 10px; opacity: 0.7; margin-top: 2px; }
.resume-left .skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.resume-left .skill-pill {
  padding: 2px 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  font-size: 10px;
  color: rgba(255,255,255,0.9);
}
.resume-right {
  padding: 28px 24px;
  background: #fff;
}
.resume-right .rr-section {
  margin-bottom: 18px;
}
.resume-right .rr-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #1a3a5c;
  letter-spacing: 0.08em;
}
.resume-right .rr-summary {
  font-size: 12px;
  color: #444;
  line-height: 1.8;
}
.resume-right .rr-exp-item {
  margin-bottom: 14px;
}
.resume-right .rr-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.resume-right .rr-exp-company {
  font-size: 12px;
  font-weight: 700;
  color: #1a3a5c;
}
.resume-right .rr-exp-period {
  font-size: 10px;
  color: #888;
}
.resume-right .rr-exp-position {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}
.resume-right .rr-exp-highlights {
  list-style: none;
  padding: 0;
}
.resume-right .rr-exp-highlights li {
  font-size: 11px;
  color: #444;
  padding-left: 12px;
  position: relative;
  margin-bottom: 3px;
  line-height: 1.6;
}
.resume-right .rr-exp-highlights li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: #1a3a5c;
  font-size: 8px;
  top: 2px;
}
.resume-right .rr-eval {
  font-size: 11px;
  color: #555;
  line-height: 1.8;
  padding: 10px 14px;
  background: #f5f7fa;
  border-left: 3px solid #1a3a5c;
  border-radius: 0 6px 6px 0;
}
/* Editable highlights */
.resume-template [contenteditable="true"] {
  outline: none;
  transition: background 0.2s;
}
.resume-template [contenteditable="true"]:hover {
  background: rgba(26,58,92,0.05);
}
.resume-template [contenteditable="true"]:focus {
  background: rgba(26,58,92,0.08);
  box-shadow: 0 0 0 1px rgba(26,58,92,0.2);
}

/* ── Job Matching Styles ── */
.job-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.job-card {
  background: rgba(34,27,58,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
}
.job-card:hover { border-color: rgba(123,79,212,0.5); }
.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.job-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}
.job-match-badge {
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(78,205,196,0.15);
  border: 1px solid rgba(78,205,196,0.3);
  color: var(--success);
  white-space: nowrap;
}
.job-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.job-card-meta .salary {
  color: var(--gold);
  font-weight: 600;
}
.job-card-reqs {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.job-card-growth {
  font-size: 0.78rem;
  color: var(--primary-light);
  margin-bottom: 10px;
}
.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.job-card-tag {
  padding: 2px 8px;
  background: rgba(123,79,212,0.08);
  border: 1px solid rgba(123,79,212,0.2);
  border-radius: 50px;
  font-size: 0.7rem;
  color: var(--primary-light);
}
.job-platform-row {
  display: flex;
  gap: 8px;
}
.job-platform-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--font-sans);
}
.job-platform-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.job-platform-btn.linkedin { background: rgba(0,119,181,0.15); border: 1px solid rgba(0,119,181,0.3); color: #0077B5; }
.job-platform-btn.boss { background: rgba(0,191,165,0.12); border: 1px solid rgba(0,191,165,0.25); color: #00BFA5; }
.job-platform-btn.liepin { background: rgba(255,107,0,0.12); border: 1px solid rgba(255,107,0,0.25); color: #FF6B00; }

/* ── Interview ChatBot Styles ── */
.interview-setup {
  text-align: center;
  padding: 20px 0;
}
.interview-setup .form-control { margin-bottom: 14px; }
.interview-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(34,27,58,0.6);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.interview-progress .progress-text { font-weight: 600; color: var(--primary-light); }
.interview-progress .timer { color: var(--gold); }
.chat-container {
  height: 380px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,79,212,0.2) transparent;
}
.chat-container::-webkit-scrollbar { width: 4px; }
.chat-container::-webkit-scrollbar-thumb { background: rgba(123,79,212,0.2); border-radius: 2px; }
.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: fadeInUp 0.3s ease;
}
.chat-msg.interviewer { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.chat-msg.interviewer .chat-avatar {
  background: linear-gradient(135deg, #1a3a5c, #2a5a8c);
}
.chat-msg.user .chat-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.7;
  position: relative;
}
.chat-msg.interviewer .chat-bubble {
  background: rgba(26,58,92,0.2);
  border: 1px solid rgba(26,58,92,0.3);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: rgba(123,79,212,0.15);
  border: 1px solid rgba(123,79,212,0.25);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}
.chat-bubble .sender-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(13,11,26,0.5);
}
.chat-input-area textarea {
  flex: 1;
  background: rgba(34,27,58,0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 10px 14px;
  outline: none;
  resize: none;
  max-height: 80px;
  line-height: 1.5;
}
.chat-input-area textarea:focus {
  border-color: var(--primary-light);
}
.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  align-self: flex-end;
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(123,79,212,0.5); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Interview Score Display ── */
.score-report {
  padding: 20px 0;
}
.score-total {
  text-align: center;
  margin-bottom: 20px;
}
.score-total-num {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.score-total-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.score-total-verdict {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}
.verdict-strong { background: rgba(78,205,196,0.15); border: 1px solid rgba(78,205,196,0.3); color: var(--success); }
.verdict-hire { background: rgba(123,79,212,0.15); border: 1px solid rgba(123,79,212,0.3); color: var(--primary-light); }
.verdict-hesitant { background: rgba(255,179,71,0.15); border: 1px solid rgba(255,179,71,0.3); color: var(--warning); }
.verdict-no { background: rgba(255,107,107,0.15); border: 1px solid rgba(255,107,107,0.3); color: var(--danger); }
.score-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.score-dim {
  background: rgba(34,27,58,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.score-dim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.score-dim-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.score-dim-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}
.score-dim-comment {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.score-chart-wrap {
  max-width: 260px;
  margin: 0 auto 16px;
}
.score-feedback {
  background: rgba(123,79,212,0.06);
  border: 1px solid rgba(123,79,212,0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
  border-left: 3px solid var(--primary-light);
}
.score-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.score-actions .btn { flex: 1; min-width: 0; font-size: 0.82rem; padding: 10px 14px; }

/* ── Module tab navigation ── */
.pm-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(13,11,26,0.3);
}
.pm-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
}
.pm-tab:hover { color: var(--text-secondary); }
.pm-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  background: rgba(123,79,212,0.05);
}
.pm-tab-panel { display: none; }
.pm-tab-panel.active { display: block; }

/* ── Generate / Action Buttons in modules ── */
.module-action-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.module-action-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(123,79,212,0.3);
}
.module-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(123,79,212,0.5);
}
.module-action-btn.gold {
  background: linear-gradient(135deg, #B8940F, var(--gold));
  color: #0D0B1A;
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}
.module-action-btn.gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212,175,55,0.5);
}
.module-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Module loading state ── */
.module-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

