/* =============================================
   人岗匹配度分析工具 - 样式
   蓝白商务科技风 | 响应式卡片布局
   ============================================= */

/* ========== CSS Variables ========== */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --primary-gradient: linear-gradient(135deg, #1a73e8, #0d47a1);
  --success: #34a853;
  --warning: #fbbc04;
  --warning-dark: #ea8600;
  --danger: #ea4335;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-hint: #9aa0a6;
  --bg-body: #f5f7fa;
  --bg-card: #ffffff;
  --bg-section: #f8f9ff;
  --border: #e0e3e7;
  --border-light: #f0f1f3;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========== Header ========== */
.app-header {
  background: var(--primary-gradient);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(26,115,232,0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}

/* ========== Mode Toggle ========== */
.mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(4px);
}

.mode-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}

.mode-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.mode-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mode-btn .mode-icon {
  margin-right: 6px;
}

/* ========== Main Container ========== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ========== Section Cards ========== */
.section-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  font-size: 18px;
}

/* ========== Hero Banner ========== */
.hero-section {
  text-align: center;
  padding: 40px 24px 32px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  border: 1px solid rgba(26,115,232,0.1);
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 20px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== Input Section ========== */
.input-section {
  position: relative;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label .label-hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-hint);
}

.form-textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px 16px;
  font-size: 14px;
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.form-textarea::placeholder {
  color: var(--text-hint);
}

.form-textarea-sm {
  min-height: 120px;
}

.form-textarea-lg {
  min-height: 300px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.char-count {
  font-size: 12px;
  color: var(--text-hint);
}

/* ========== Buttons ========== */
.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-primary {
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(26,115,232,0.3);
  flex: 1;
  justify-content: center;
  min-width: 160px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,115,232,0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-sm:hover {
  background: var(--primary-dark);
}

/* ========== Loading Spinner ========== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* ========== Result Area ========== */
#result-area {
  animation: fadeUp 0.5s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Result Header ========== */
.result-header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #f8f9ff, #eef1ff);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.score-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.score-ring {
  width: 100%;
  height: 100%;
}

.score-arc {
  transition: stroke-dashoffset 1s ease;
}

.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.score-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.rating-info {
  flex: 1;
  min-width: 180px;
}

.rating-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rating-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.rating-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.match-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ========== Dimension Table ========== */
.dimension-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dim-label {
  width: 110px;
  flex-shrink: 0;
}

.dim-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.dim-weight {
  font-size: 11px;
  color: var(--text-hint);
}

.dim-bar-wrap {
  flex: 1;
  height: 10px;
  background: #f0f1f3;
  border-radius: 5px;
  overflow: hidden;
}

.dim-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #4a90d9);
  border-radius: 5px;
  transition: width 1s ease;
}

.dim-score {
  width: 32px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ========== Radar Chart ========== */
.chart-container {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.radar-chart {
  max-width: 300px;
  width: 100%;
  height: auto;
}

/* ========== Tags ========== */
.tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}

.tag-strength {
  background: #e8f5e9;
  border-left: 3px solid var(--success);
}

.tag-weakness {
  background: #fff3e0;
  border-left: 3px solid var(--warning-dark);
}

.tag-dim {
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-primary);
  min-width: 70px;
}

.tag-text {
  color: var(--text-secondary);
}

/* ========== Suggestions ========== */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}

.suggestion-dim {
  font-weight: 600;
  white-space: nowrap;
  color: var(--primary);
  min-width: 70px;
}

.suggestion-text {
  color: var(--text-secondary);
}

/* ========== Keywords ========== */
.keyword-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kw-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kw-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  background: #f0f1f3;
  color: var(--text-secondary);
  border-radius: 4px;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.kw-matched {
  background: #e8f5e9;
  color: #2e7d32;
}

.kw-missing {
  background: #fce4ec;
  color: #c62828;
}

.kw-empty {
  font-size: 13px;
  color: var(--text-hint);
}

/* ========== Batch Summary ========== */
.batch-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}

.summary-stat {
  text-align: center;
  flex: 1;
  min-width: 80px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ========== Rank Table ========== */
.rank-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rank-table th {
  background: #f8f9ff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.rank-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.rank-row:hover {
  background: #fafbfc;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  background: #f0f1f3;
  color: var(--text-secondary);
}

.rank-top {
  background: var(--primary);
  color: #fff;
}

.score-highlight {
  font-size: 18px;
  font-weight: 700;
}

.rating-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.tier-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ========== Candidate Reports ========== */
.candidate-report {
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.report-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.report-candidate-name {
  font-size: 15px;
  font-weight: 600;
}

.report-score {
  font-size: 14px;
  color: var(--text-secondary);
}

.report-rating {
  font-size: 13px;
  font-weight: 500;
}

.report-tags {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

.report-weakness, .report-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.report-sug-text {
  color: var(--text-secondary);
}

.mini-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.mini-tag-warn {
  background: #fff3e0;
  color: #e65100;
}

.mini-tag-ok {
  background: #e8f5e9;
  color: #2e7d32;
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.modal-active {
  opacity: 1;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f0f1f3;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition);
}

.modal-close:hover {
  background: #e0e3e7;
}

.modal-body {
  padding: 24px;
}

.modal-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-big-score {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.modal-rating-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.modal-section {
  margin-top: 20px;
}

.modal-section h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

.modal-section ul {
  list-style: none;
  padding: 0;
}

.modal-section li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-section li strong {
  color: var(--text-primary);
}

/* ========== Toast ========== */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 380px;
  border-left: 4px solid var(--primary);
}

.toast-show {
  transform: translateX(0);
}

.toast-hide {
  transform: translateX(120%);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning-dark); }
.toast-info { border-left-color: var(--primary); }

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.toast-msg {
  flex: 1;
  color: var(--text-primary);
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text-hint);
  font-size: 14px;
}

/* ========== Footer ========== */
.app-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-hint);
  font-size: 13px;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

/* ========== JD Panel ========== */
.jd-panel {
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, #f8f9ff, #fff);
}

.jd-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jd-meta-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.jd-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

.jd-tag-hard {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

.jd-tag-skill {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(26,115,232,0.15);
  font-family: 'SF Mono', 'Consolas', monospace;
}

.jd-tag-soft {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.jd-empty {
  font-size: 13px;
  color: var(--text-hint);
}

/* ========== Keyword Matrix ========== */
.kw-matrix-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.kw-matrix-stat {
  text-align: center;
  flex: 1;
  min-width: 70px;
  padding: 12px 8px;
  background: #f8f9ff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.kw-matrix-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.kw-matrix-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.kw-matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kw-matrix-col {
  padding: 12px;
  border-radius: var(--radius-sm);
  min-height: 60px;
}

.kw-matrix-col:first-child {
  background: #e8f5e9;
}

.kw-matrix-col:last-child {
  background: #fce4ec;
}

.kw-matrix-col-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.kw-matrix-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-family: 'SF Mono', 'Consolas', monospace;
  border-radius: 3px;
  margin: 2px;
}

.kw-matrix-hit {
  background: #c8e6c9;
  color: #1b5e20;
}

.kw-matrix-miss {
  background: #ffcdd2;
  color: #b71c1c;
}

.kw-full {
  display: block;
  text-align: center;
  padding: 16px;
  font-weight: 600;
  color: #2e7d32;
}

/* ========== JD-Bound Analysis Items ========== */
.jd-bound-item {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
}

.jd-bound-strength {
  background: #e8f5e9;
  border-left: 3px solid var(--success);
}

.jd-bound-weakness {
  background: #fff3e0;
  border-left: 3px solid var(--warning-dark);
}

.jd-bound-suggestion {
  background: #f0f5ff;
  border-left: 3px solid var(--primary);
}

.jd-bound-tip {
  background: #f3e5f5;
  border-left: 3px solid #7b1fa2;
}

.bound-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bound-dim {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.bound-score {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  color: var(--text-secondary);
}

.bound-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ========== HR Evaluation ========== */
.hr-summary {
  padding: 10px 14px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.hr-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.hr-summary-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hr-conclusion {
  padding: 10px 14px;
  background: #fff8e1;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.hr-conclusion-label {
  font-size: 12px;
  font-weight: 600;
  color: #e65100;
  margin-bottom: 4px;
}

.hr-conclusion-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hr-improvements {
  margin-top: 12px;
}

.hr-improve-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.hr-improve-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 13px;
  line-height: 1.6;
}

.hr-improve-item:last-child {
  margin-bottom: 0;
}

.improve-condition {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.improve-issue {
  color: var(--danger);
  margin-bottom: 2px;
}

.improve-suggestion {
  color: var(--success);
}

.rank-kw {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .logo {
    justify-content: center;
  }

  .mode-toggle {
    justify-content: center;
    width: 100%;
  }

  .mode-btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 8px 12px;
  }

  .main-container {
    padding: 12px;
  }

  .hero-section {
    padding: 24px 16px 20px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-num {
    font-size: 20px;
  }

  .section-card {
    padding: 16px;
  }

  .result-header {
    padding: 20px 16px;
    gap: 20px;
    justify-content: center;
    text-align: center;
  }

  .score-ring-wrap {
    width: 100px;
    height: 100px;
  }

  .score-number {
    font-size: 26px;
  }

  .rating-info {
    text-align: center;
  }

  .dim-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .dim-label {
    width: 80px;
  }

  .dim-name {
    font-size: 13px;
  }

  .dim-score {
    font-size: 14px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-primary {
    min-width: auto;
  }

  .batch-summary {
    gap: 12px;
  }

  .summary-stat {
    min-width: 60px;
    padding: 8px;
  }

  .stat-number {
    font-size: 22px;
  }

  .rank-table {
    font-size: 13px;
  }

  .rank-table th, .rank-table td {
    padding: 8px 10px;
  }

  .tier-chip {
    font-size: 11px;
    padding: 1px 6px;
  }

  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .candidate-report {
    padding: 12px;
  }

  .modal-content {
    max-height: 90vh;
    margin: 10px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-big-score {
    font-size: 36px;
  }

  #toast-container {
    left: 12px;
    right: 12px;
    top: 70px;
  }

  .toast {
    max-width: 100%;
  }

  .tag-item {
    flex-direction: column;
    gap: 4px;
  }

  .suggestion-item {
    flex-direction: column;
    gap: 4px;
  }

  .kw-matrix-grid {
    grid-template-columns: 1fr;
  }

  .kw-matrix-summary {
    gap: 8px;
  }

  .kw-matrix-stat {
    min-width: 50px;
    padding: 8px 4px;
  }

  .kw-matrix-num {
    font-size: 20px;
  }

  .jd-bound-item {
    padding: 12px;
  }

  .jd-meta-grid {
    gap: 10px;
  }

  .hr-improve-item {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 20px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .mode-btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  .mode-btn .mode-icon {
    margin-right: 4px;
  }

  .section-title {
    font-size: 15px;
  }

  .form-textarea {
    min-height: 140px;
    font-size: 13px;
    padding: 10px 12px;
  }

  .rating-badge {
    font-size: 16px;
  }

  .rating-title {
    font-size: 18px;
  }
}

/* ========== Print Styles ========== */
@media print {
  .app-header, .mode-toggle, .btn-group, .app-footer, #toast-container {
    display: none !important;
  }

  .main-container {
    padding: 0;
  }

  .section-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  #result-area {
    animation: none;
  }
}