:root {
  --bg-primary: #0a0a0a; --bg-secondary: #141414; --bg-card: #1e1e1e; --bg-hover: #252525;
  --accent-red: #dc2626; --accent-red-light: #ef4444; --accent-red-glow: rgba(220, 38, 38, 0.4);
  --text-primary: #f5f5f5; --text-secondary: #a3a3a3; --text-muted: #737373;
  --border-color: #2a2a2a; --border-light: #3a3a3a;
  --success-color: #22c55e; --error-color: #ef4444; --warning-color: #f59e0b;
  --sidebar-width: 220px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary); color: var(--text-primary);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
a { color: var(--accent-red-light); text-decoration: none; }

/* ===== Auth Page ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1a0a0a 0%, var(--bg-primary) 70%); }
.auth-container { width: 100%; max-width: 420px; padding: 20px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 40px 32px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; background: var(--bg-secondary); border-radius: 10px; padding: 4px; }
.auth-tab { flex: 1; padding: 10px; text-align: center; border-radius: 8px; cursor: pointer; color: var(--text-muted); font-size: 15px; font-weight: 500; border: none; background: none; transition: all 0.2s; }
.auth-tab.active { background: var(--accent-red); color: #fff; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); }
.form-input { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 15px; outline: none; transition: border-color 0.2s; font-family: inherit; }
.form-input:focus { border-color: var(--accent-red); }
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 15px; outline: none; }
.btn { padding: 12px 20px; background: linear-gradient(135deg, var(--accent-red) 0%, #991b1b 100%); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.btn:hover { box-shadow: 0 0 20px var(--accent-red-glow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { width: 100%; padding: 10px; background: transparent; border: 1px solid var(--border-light); border-radius: 8px; color: var(--text-secondary); font-size: 14px; cursor: pointer; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--accent-red); color: var(--text-primary); box-shadow: 0 0 10px var(--accent-red-glow); }
.btn-secondary { padding: 8px 16px; background: transparent; border: 1px solid var(--border-light); border-radius: 8px; color: var(--text-secondary); font-size: 14px; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { border-color: var(--accent-red); color: var(--text-primary); box-shadow: 0 0 8px var(--accent-red-glow); }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: rgba(220,38,38,0.2); color: var(--error-color); border: 1px solid rgba(220,38,38,0.3); }
.btn-danger:hover { background: rgba(220,38,38,0.4); box-shadow: 0 0 12px rgba(220,38,38,0.3); }
.auth-error { background: rgba(220,38,38,0.15); color: var(--error-color); padding: 10px 14px; border-radius: 8px; font-size: 14px; display: none; margin-bottom: 16px; }
.auth-error.show { display: block; }
.file-upload-area { position: relative; }
.file-upload-label { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-secondary); border: 1px dashed var(--border-color); border-radius: 8px; color: var(--text-muted); font-size: 14px; cursor: pointer; transition: border-color 0.2s; }
.file-upload-label:hover { border-color: var(--border-light); }
.file-upload-label.has-file { border-color: var(--success-color); color: var(--success-color); }
.file-upload-input { display: none; }

/* ===== Animations ===== */
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 5px var(--accent-red-glow); } 50% { box-shadow: 0 0 20px var(--accent-red-glow); } }
@keyframes bounce { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
@keyframes chatMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fade-in 0.3s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* ===== App Layout (SPA) ===== */
.app-container { display: grid; grid-template-rows: 60px 1fr; grid-template-columns: var(--sidebar-width) 1fr; height: 100vh; overflow: hidden; transition: grid-template-columns 0.3s ease; }
.header { grid-column: 1 / -1; background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 100; position: relative; }
.header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-red), transparent); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 22px solid var(--accent-red); filter: drop-shadow(0 0 8px rgba(220,38,38,0.45)); }
.brand-text { font-size: 24px; font-weight: 900; background: linear-gradient(90deg, var(--text-primary), var(--accent-red-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-btn { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.header-btn:hover { border-color: var(--accent-red); color: var(--text-primary); box-shadow: 0 0 10px var(--accent-red-glow); }
.profile-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-red); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0; }

/* ===== Profile Modal ===== */
.profile-resume-card {
  background: rgba(220,38,38,0.05); border: 1px solid rgba(220,38,38,0.25);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
  transition: border-color 0.2s;
}
.profile-resume-card:hover { border-color: rgba(220,38,38,0.5); }
.profile-checkin-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 12px;
}
.profile-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 10px;
}
.profile-section-title svg { color: var(--accent-red-light); }
.profile-resume-body {
  display: flex; align-items: center; justify-content: space-between;
}
.profile-resume-name {
  font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-resume-actions { display: flex; gap: 8px; flex-shrink: 0; }
.profile-resume-upload-btn {
  background: #3a3a3a; color: #fff;
  border: 1px solid #555; border-radius: 6px;
  padding: 6px 14px; font-size: 12px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.profile-resume-upload-btn:hover { background: #4a4a4a; }
.profile-delete-btn { border-radius: 6px !important; }
.profile-checkin-body { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.profile-checkin-thumbs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.profile-checkin-thumbs .checkin-thumb {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border-color); cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.profile-checkin-thumbs .checkin-thumb:hover {
  border-color: var(--accent-red); transform: scale(1.05);
}
.checkin-thumb-wrap {
  position: relative; display: inline-block;
}
.checkin-thumb-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(220,38,38,0.9); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  transition: background 0.2s;
}
.checkin-thumb-del:hover { background: #dc2626; }
.profile-checkin-thumbs .checkin-thumb:hover {
  border-color: var(--accent-red); transform: scale(1.05);
}
.btn-outline-checkin {
  padding: 6px 14px; background: transparent;
  border: 1px dashed var(--border-light); border-radius: 8px;
  color: var(--text-muted); font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-checkin:hover {
  border-color: var(--accent-red); color: var(--accent-red-light);
  box-shadow: 0 0 8px var(--accent-red-glow);
}

/* Sidebar */
.sidebar { background: var(--bg-secondary); border-right: 1px solid var(--border-color); padding: 16px 12px; overflow-y: auto; transition: all 0.3s ease; }
.nav-section { margin-bottom: 24px; }
.nav-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 0 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.nav-section-title::before { content: ''; width: 4px; height: 4px; background: var(--accent-red); border-radius: 50%; box-shadow: 0 0 6px var(--accent-red-glow); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s; margin-bottom: 4px; color: var(--text-secondary); position: relative; overflow: hidden; font-size: 14px; border: none; background: none; width: 100%; text-align: left; font-family: inherit; }
.nav-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-red); transform: scaleY(0); transition: transform 0.2s; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: linear-gradient(90deg, rgba(220,38,38,0.15) 0%, transparent 100%); color: var(--text-primary); }
.nav-item.active::before { transform: scaleY(1); }
.nav-item.active .nav-icon { color: var(--accent-red-light); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-muted); }

/* Mobile nav */
.icon-nav { display: none; flex-direction: column; width: 56px; background: var(--bg-secondary); border-right: 1px solid var(--border-color); padding: 8px 0; gap: 4px; overflow-y: auto; }
.icon-nav-item { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; position: relative; }
.icon-nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.icon-nav-item.active { color: var(--accent-red-light); background: rgba(229,57,53,0.15); }
.icon-nav-item.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--accent-red); border-radius: 0 2px 2px 0; }
.mobile-menu-btn { display: none; width: 40px; height: 40px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); cursor: pointer; align-items: center; justify-content: center; transition: all 0.2s; }
.mobile-menu-btn:hover { border-color: var(--accent-red); color: var(--accent-red-light); }

/* Bottom nav (mobile) */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: var(--bg-secondary); border-top: 1px solid var(--border-color); z-index: 100; justify-content: space-around; align-items: center; padding: 0 4px; }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--text-muted); transition: all 0.2s; font-size: 10px; flex: 1; max-width: 70px; background: none; border: none; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--accent-red-light); }
.bottom-nav-item svg { width: 22px; height: 22px; }

/* Sidebar overlay (mobile) */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; }
.sidebar-overlay.active { display: block; }

/* More modules overlay (mobile) */
.more-modules-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1100; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
.more-modules-overlay.active { opacity: 1; visibility: visible; }
.more-modules-modal { position: fixed; bottom: 80px; left: 16px; right: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px; z-index: 1200; transform: translateY(20px); transition: transform 0.25s ease; }
.more-modules-overlay.active .more-modules-modal { transform: translateY(0); }
.more-modules-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.more-modules-header span { font-weight: 600; font-size: 16px; }
.more-modules-close { background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; padding: 0 4px; }
.more-modules-list { display: flex; flex-direction: column; gap: 4px; }
.more-modules-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; cursor: pointer; color: var(--text-secondary); transition: all 0.2s; background: none; border: none; font-size: 14px; font-family: inherit; width: 100%; text-align: left; }
.more-modules-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: rgba(34,197,94,0.2); color: var(--success-color); }

/* Main content */
.main-content { background: var(--bg-primary); overflow: hidden; display: flex; flex-direction: column; }
.module-container { display: none; height: 100%; overflow: hidden; }
.module-container.active { display: flex; flex-direction: column; animation: fade-in 0.3s ease-out; position: relative; }
.module-container.active::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
  opacity: 0.3;
  pointer-events: none;
}

/* ===== Chat Module ===== */
.chat-overlay-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 20px; gap: 16px; position: relative; }
.chat-overlay-wrapper::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 50% 0%, rgba(220,38,38,0.06) 0%, transparent 60%); pointer-events: none; }
.chat-main-title { font-size: 42px; font-weight: 900; background: linear-gradient(135deg, #f5f5f5 0%, #fca5a5 15%, #ef4444 40%, #dc2626 70%, #b91c1c 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 40px rgba(220,38,38,0.5)); font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif; letter-spacing: 5px; text-align: center; flex-shrink: 0; line-height: 1; position: relative; padding-bottom: 4px; transition: filter 0.3s ease, transform 0.3s ease; }
.chat-main-title:hover { filter: drop-shadow(0 0 60px rgba(220,38,38,0.8)); transform: scale(1.02); }
.chat-main-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background: linear-gradient(90deg, transparent, #dc2626, transparent); border-radius: 2px; box-shadow: 0 0 12px rgba(220,38,38,0.6); }
.chat-main-title-sub { font-size: 42px; font-weight: 700; background: linear-gradient(135deg, #ffffff 0%, #ff3333 35%, #dc2626 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 4px; margin-left: 12px; display: inline; filter: drop-shadow(0 0 40px rgba(220,38,38,0.65)); }
.title-icon-lock,
.title-icon-sniper { display: inline; vertical-align: middle; margin: 0 6px; filter: drop-shadow(0 0 10px rgba(255,255,255,0.9)) drop-shadow(0 0 24px rgba(255,255,255,0.5)); }
.chat-box { width: 80%; height: 80%; background: linear-gradient(180deg, var(--bg-card) 0%, #1a1a1a 100%); border-radius: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: 0 0 60px rgba(0,0,0,0.6), 0 0 30px var(--accent-red-glow); }
.chat-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-red), transparent); opacity: 0.6; }
.chat-box::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(220,38,38,0.3), transparent); opacity: 0.4; }
.chat-box-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; background: rgba(0,0,0,0.3); position: relative; }
.chat-box-header::after { content: ''; position: absolute; bottom: 0; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, transparent, rgba(220,38,38,0.2), transparent); }
.chat-box-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.title-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red-glow); display: inline-block; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; min-height: 0; background: radial-gradient(ellipse at 20% 20%, rgba(220,38,38,0.03) 0%, transparent 50%); }
.chat-message {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 16px;
  line-height: 1.7;
  animation: chatMsgIn 0.25s ease-out;
  font-size: 15px;
  word-break: break-word;
  position: relative;
}
.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(220,38,38,0.35) 0%, rgba(153,27,27,0.25) 100%);
  border: 1px solid rgba(220,38,38,0.3);
  color: var(--text-primary);
}
.chat-message.assistant {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--bg-card) 0%, #1a1515 100%);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-red);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.chat-message.system { align-self: center; background: var(--bg-secondary); border: 1px solid var(--border-color); max-width: 90%; text-align: center; }

/* ===== Enhanced Markdown Content Styling ===== */
.markdown-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}
.markdown-content p { margin-bottom: 10px; }
.markdown-content p:last-child { margin-bottom: 0; }

/* ---- Inline Code ---- */
.markdown-content code {
  background: rgba(220,38,38,0.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: #fca5a5;
  border: 1px solid rgba(220,38,38,0.15);
}
.markdown-content pre {
  background: linear-gradient(135deg, #1a1111 0%, var(--bg-secondary) 100%);
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  border: 1px solid rgba(220,38,38,0.12);
  border-left: 3px solid var(--accent-red);
}
.markdown-content pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
  border: none;
}

/* ---- Headings ----
   Hierarchical depth with increasing red intensity
*/
.markdown-content h1 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 24px 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--accent-red), transparent) 1;
  letter-spacing: 1px;
}
.markdown-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 20px 0 10px;
  padding: 8px 0 8px 14px;
  border-left: 4px solid var(--accent-red);
  background: linear-gradient(90deg, rgba(220,38,38,0.1) 0%, transparent 100%);
  border-radius: 0 6px 6px 0;
}
.markdown-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-red-light);
  margin: 16px 0 8px;
  padding-left: 12px;
  position: relative;
}
.markdown-content h3::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-red);
  font-size: 14px;
}
.markdown-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fca5a5;
  margin: 12px 0 6px;
}
.markdown-content h5, .markdown-content h6 {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-red-light);
  margin: 10px 0 6px;
}

/* ---- Lists ----
   Layered hierarchy (mind map style for nested lists)
*/
.markdown-content ul {
  margin: 8px 0;
  padding-left: 24px;
  list-style: none;
}
.markdown-content ul > li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 8px;
  transition: all 0.15s;
}
.markdown-content ul > li::before {
  content: '●';
  position: absolute;
  left: -18px;
  color: var(--accent-red);
  font-size: 10px;
  top: 4px;
}
/* Level 2 - sub-list */
.markdown-content ul ul { margin: 4px 0 4px 14px; }
.markdown-content ul ul > li::before {
  content: '○';
  font-size: 8px;
  color: #fca5a5;
}
/* Level 3 */
.markdown-content ul ul ul { margin: 3px 0 3px 12px; }
.markdown-content ul ul ul > li::before {
  content: '▪';
  font-size: 10px;
  color: rgba(220,38,38,0.5);
}
/* Level 4+ */
.markdown-content ul ul ul ul > li::before {
  content: '▸';
  font-size: 10px;
  color: rgba(220,38,38,0.3);
}
/* List item hover effect */
.markdown-content li:hover { color: var(--text-primary); }

/* ---- Ordered Lists ---- */
.markdown-content ol {
  margin: 8px 0;
  padding-left: 28px;
}
.markdown-content ol > li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 4px;
  padding: 4px 0 4px 4px;
  transition: all 0.15s;
}
.markdown-content ol > li::marker {
  color: var(--accent-red);
  font-weight: 600;
}
.markdown-content ol ol { margin: 4px 0 4px 16px; }
.markdown-content li { margin-bottom: 4px; }
.markdown-content li > ul, .markdown-content li > ol { margin: 4px 0 4px 10px; }
/* Mixin: inline tag at end of list item */
.markdown-content li .tag {
  display: inline-block; padding: 0 8px;
  background: rgba(220,38,38,0.12);
  border-radius: 4px; font-size: 11px;
  color: var(--accent-red-light); margin-left: 4px;
}

/* ---- Tables ---- */
.markdown-content table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 14px 0;
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}
.markdown-content thead {
  background: linear-gradient(135deg, rgba(220,38,38,0.25) 0%, rgba(153,27,27,0.15) 100%);
}
.markdown-content th {
  padding: 12px 16px;
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  border-bottom: 2px solid var(--accent-red);
  text-align: left;
  letter-spacing: 0.5px;
}
.markdown-content td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}
.markdown-content tbody tr {
  transition: background 0.15s;
}
.markdown-content tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}
.markdown-content tbody tr:hover {
  background: rgba(220,38,38,0.06);
}
.markdown-content tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Blockquotes ---- */
.markdown-content blockquote {
  margin: 12px 0;
  padding: 12px 16px 12px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  position: relative;
}
/* Default blockquote */
.markdown-content blockquote {
  background: linear-gradient(90deg, rgba(220,38,38,0.06) 0%, transparent 100%);
  border-left: 4px solid var(--accent-red);
}
/* Blockquote starts with ℹ️ → info style */
.markdown-content blockquote:first-child { }
.markdown-content blockquote p { margin-bottom: 4px; }
.markdown-content blockquote p:last-child { margin-bottom: 0; }

/* ---- Horizontal Rules ---- */
.markdown-content hr {
  border: none;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, transparent, var(--accent-red), rgba(220,38,38,0.3), var(--accent-red), transparent);
  opacity: 0.6;
}

/* ---- Strong / Bold ---- */
.markdown-content strong {
  color: #fca5a5;
  font-weight: 700;
}

/* ---- Emoji-Enhanced Sections ---- */
/* Style paragraphs that start with emoji icons as card-like sections */
.markdown-content p:has(> strong:only-child) {
  background: rgba(220,38,38,0.05);
  border: 1px solid rgba(220,38,38,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
}

/* Nested section styling for structured outputs */
.markdown-content .section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
  transition: border-color 0.2s;
}
.markdown-content .section-card:hover {
  border-color: rgba(220,38,38,0.2);
}

/* ---- Link styling ---- */
.markdown-content a {
  color: #fca5a5;
  text-decoration: none;
  border-bottom: 1px dashed rgba(220,38,38,0.3);
  transition: all 0.2s;
}
.markdown-content a:hover {
  color: var(--accent-red-light);
  border-bottom-color: var(--accent-red);
}

/* ---- Compact spacing for nested content ---- */
.markdown-content .compact p { margin-bottom: 4px; }
.markdown-content .compact ul, .markdown-content .compact ol { margin: 4px 0; }

/* ---- Two-column structure for comparison ---- */
.markdown-content .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0;
}
.markdown-content .two-col > div {
  background: rgba(220,38,38,0.04);
  border: 1px solid rgba(220,38,38,0.1);
  border-radius: 8px;
  padding: 14px;
}

/* ---- Tag-like inline badges ---- */
.markdown-content .badge-red {
  display: inline-block;
  padding: 1px 10px;
  background: rgba(220,38,38,0.15);
  color: #fca5a5;
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin: 0 2px;
}

/* ---- Keyword highlight ---- */
.keyword-highlight {
  background: rgba(220,38,38,0.2);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(220,38,38,0.15);
}

/* ---- Analysis score box ---- */
.markdown-content .score-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(220,38,38,0.15), rgba(153,27,27,0.08));
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 10px;
  padding: 12px 20px;
  margin: 8px 0;
}
.markdown-content .score-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-red-light);
}
.markdown-content .score-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Step/Process visualization ---- */
.markdown-content ol.process-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}
.markdown-content ol.process-steps > li {
  counter-increment: step-counter;
  padding: 14px 14px 14px 48px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(220,38,38,0.04) 0%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(220,38,38,0.08);
  border-radius: 10px;
  position: relative;
  transition: all 0.2s;
}
.markdown-content ol.process-steps > li:hover {
  border-color: rgba(220,38,38,0.2);
  background: linear-gradient(135deg, rgba(220,38,38,0.07) 0%, rgba(0,0,0,0.2) 100%);
  transform: translateX(4px);
}
.markdown-content ol.process-steps > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: var(--accent-red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 10px var(--accent-red-glow);
}
/* Connecting line between steps */
.markdown-content ol.process-steps > li:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 24px;
  width: 1px;
  height: 10px;
  background: linear-gradient(180deg, var(--accent-red), transparent);
  opacity: 0.3;
}

/* ---- Info/Tip/Warning callout boxes ---- */
.markdown-content .callout {
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.7;
}
.markdown-content .callout-info {
  background: rgba(59,130,246,0.08);
  border-left-color: #3b82f6;
}
.markdown-content .callout-warning {
  background: rgba(245,158,11,0.08);
  border-left-color: #f59e0b;
}
.markdown-content .callout-success {
  background: rgba(34,197,94,0.08);
  border-left-color: #22c55e;
}
.markdown-content .callout-danger {
  background: rgba(220,38,38,0.08);
  border-left-color: var(--accent-red);
}

/* ---- Data highlight row (for analysis tables) ---- */
.markdown-content .data-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin: 4px 0;
  background: rgba(220,38,38,0.03);
  border-radius: 6px;
  border: 1px solid rgba(220,38,38,0.06);
}
.markdown-content .data-label {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 100px;
  flex-shrink: 0;
}
.markdown-content .data-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Error & retry */
.error-container { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.error-text { color: var(--error-color); font-size: 14px; }
.retry-btn { padding: 8px 16px; background: transparent; border: 1px solid var(--accent-red); color: var(--accent-red-light); border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 13px; }
.retry-btn:hover { background: var(--accent-red); color: #fff; }
.resume-reminder-btn { padding: 10px 24px; background: var(--accent-red); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }

/* Loading */
.loading-container { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 20px; background: rgba(220,38,38,0.03); border: 1px solid rgba(220,38,38,0.08); border-radius: 10px; margin: 10px 0; }
.loading-text { color: var(--text-muted); font-size: 14px; letter-spacing: 0.5px; }
.loading-dots { display: flex; gap: 8px; }
.loading-dot { width: 10px; height: 10px; background: var(--accent-red); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out; box-shadow: 0 0 6px var(--accent-red-glow); }
.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
.typewriter-cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--accent-red-light); margin-left: 2px; vertical-align: text-bottom; animation: blink 1s infinite; }

/* ===== Uploaded Files ===== */
.chat-uploaded-files { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0 0; }
.file-uploaded { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; font-size: 13px; color: var(--text-secondary); }
.file-uploaded-icon { color: var(--text-muted); flex-shrink: 0; }
.file-uploaded-info { min-width: 0; }
.file-uploaded-name { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.file-uploaded-size { font-size: 11px; color: var(--text-muted); }
.file-uploaded-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px; border-radius: 4px; flex-shrink: 0; }
.file-uploaded-remove:hover { color: var(--error-color); background: rgba(220,38,38,0.15); }

/* ===== Platform links ===== */
.platform-links { display: flex; gap: 8px; padding: 0 20px 12px; flex-wrap: wrap; justify-content: center; }
.platform-link { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
.platform-link:hover { transform: translateY(-2px); }

/* ===== Module Layout (JD, Resume, etc.) ===== */
.module-layout { display: grid; grid-template-columns: 320px 1fr; height: 100%; overflow: hidden; }
.module-sidebar { border-right: 1px solid var(--border-color); padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.module-main { overflow-y: auto; padding: 24px; }
.output-panel { background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 2px 20px rgba(0,0,0,0.3); overflow: hidden; }
.output-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border-color); background: linear-gradient(90deg, rgba(220,38,38,0.08) 0%, transparent 100%); }
.output-header-actions { display: flex; align-items: center; gap: 6px; }
.output-title { font-size: 16px; font-weight: 600; color: var(--accent-red-light); position: relative; padding-left: 12px; }
.output-title::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; background: var(--accent-red); border-radius: 2px; }
.output-content { padding: 20px; min-height: 200px; }
/* Output panel markdown inherits from enhanced markdown styles above */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text-muted); gap: 12px; text-align: center; }
.empty-state-icon { width: 48px; height: 48px; color: var(--border-light); }
.empty-state-title { font-size: 16px; font-weight: 600; }
.empty-state-text { font-size: 14px; }

/* ===== Job Cards ===== */
.job-recommend-page { padding: 16px 24px 24px; flex: 1; overflow-y: auto; }
.job-recommend-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.job-recommend-title { font-size: 20px; font-weight: 600; margin: 0; }
.job-recommend-subtitle { margin-top: 6px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.job-count { color: var(--text-muted); font-size: 14px; white-space: nowrap; margin-top: 4px; }
.job-ai-search-panel {
  background: linear-gradient(180deg, rgba(220,38,38,0.10) 0%, rgba(255,255,255,0.025) 100%);
  border: 1px solid rgba(220,38,38,0.24);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 0 22px rgba(220,38,38,0.08);
}
.job-ai-input-row {
  display: flex; align-items: flex-end; gap: 10px;
  background: rgba(14,14,14,0.86);
  border: 1px solid rgba(248,113,113,0.22);
  border-radius: 14px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 10px 24px rgba(0,0,0,0.18);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.job-ai-input-row:focus-within {
  border-color: rgba(248,113,113,0.65);
  box-shadow: inset 0 0 0 1px rgba(248,113,113,0.12), 0 0 22px rgba(220,38,38,0.16);
}
.job-ai-input {
  flex: 1; min-height: 54px; max-height: 120px; resize: vertical;
  padding: 4px 4px 4px 6px; border-radius: 10px;
  background: transparent; border: none;
  color: var(--text-primary); outline: none; font-size: 14px; line-height: 1.5;
  font-family: inherit;
}
.job-ai-input::placeholder { color: var(--text-muted); }
.job-ai-send-btn {
  width: 46px; height: 46px; min-height: 46px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(220,38,38,0.32); transition: transform 0.2s, box-shadow 0.2s;
}
.job-ai-send-btn:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(220,38,38,0.45); }
.job-ai-send-btn:active { transform: scale(0.96); }
.job-ai-send-btn:disabled { opacity: 0.72; cursor: wait; transform: none; }
.job-platform-links { justify-content: flex-start; padding: 12px 0 0; }
.job-platform-links .platform-link {
  background: rgba(255,50,50,0.22);
  border: 1.5px solid rgba(255,50,50,0.62);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(220,38,38,0.08);
}
.job-platform-links .platform-link:hover {
  background: rgba(255,50,50,0.34);
  border-color: rgba(255,50,50,0.88);
  color: #fecaca;
}
.job-ai-summary {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.18);
  color: #86efac; font-size: 12px; line-height: 1.45;
}
.job-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.job-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.2s; }
.job-card:hover { border-color: var(--accent-red); box-shadow: 0 0 15px var(--accent-red-glow); transform: translateY(-2px); }
.job-match-badge {
  display: inline-flex; align-items: center; padding: 3px 8px; margin-bottom: 10px;
  border-radius: 999px; background: rgba(220,38,38,0.14); border: 1px solid rgba(220,38,38,0.28);
  color: var(--accent-red-light); font-size: 12px; font-weight: 700;
}
.job-card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.job-card-salary { color: var(--accent-red-light); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.job-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.job-tag { font-size: 12px; padding: 2px 8px; background: rgba(255,255,255,0.06); border-radius: 4px; color: var(--text-muted); }
.job-card-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.job-matched-kws { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.job-matched-kws span {
  font-size: 11px; color: #fca5a5; background: rgba(248,113,113,0.09);
  border: 1px solid rgba(248,113,113,0.18); border-radius: 999px; padding: 2px 7px;
}

/* Job detail modal */
.detail-salary-bar { margin: 12px 0; }
.detail-salary-text { font-size: 24px; font-weight: 700; color: var(--accent-red-light); }
.job-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-tag-item { font-size: 13px; padding: 4px 10px; background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.2); border-radius: 6px; color: var(--text-secondary); }
.detail-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.detail-card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--accent-red-light); }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-info-item { }
.detail-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.detail-info-value { font-size: 14px; color: var(--text-primary); }
.detail-text-block { font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.detail-structured-list { display: flex; flex-direction: column; gap: 4px; }
.detail-list-item { font-size: 14px; line-height: 1.6; padding-left: 8px; }


/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 9999; display: none; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 0; animation: fade-in 0.2s ease; width: 50%; min-width: 420px; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 22px; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; justify-content: flex-end; }

/* ===== File upload zone ===== */
.file-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: var(--bg-secondary); border: 2px dashed var(--border-color); border-radius: 10px; cursor: pointer; transition: all 0.2s; }
.file-upload:hover { border-color: var(--accent-red); }
.file-upload.dragover { border-color: var(--accent-red); background: rgba(220,38,38,0.08); }
.file-upload-icon { width: 32px; height: 32px; color: var(--text-muted); }
.file-upload-text { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.file-upload-hint { font-size: 12px; color: var(--text-muted); }

/* ===== Pagination ===== */
.pagination-container { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 16px 0; }
.pagination-btn { padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-secondary); cursor: pointer; font-size: 14px; }
.pagination-btn:hover:not(:disabled) { border-color: var(--accent-red); color: var(--text-primary); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { color: var(--text-muted); font-size: 14px; }

/* ===== Mock Interview ===== */
.mock-summary-item { padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.mock-summary-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.mock-summary-value { font-size: 14px; line-height: 1.6; }
.mock-question-box { padding: 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; }
.mock-question-content { }
.mock-question-main { font-size: 16px; font-weight: 600; line-height: 1.6; }
.mock-question-focus { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.mock-log-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.mock-log-role { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.mock-log-role.user { color: var(--accent-red-light); }
.mock-log-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

/* ===== Interview Assist ===== */
.three-column-layout { display: grid; grid-template-columns: 260px 1fr 280px; height: 100%; overflow: hidden; }
.assist-chat-bubble { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.assist-chat-bubble.interviewer { background: var(--bg-card); border: 1px solid var(--border-color); margin-right: auto; }
.assist-chat-bubble.user { background: linear-gradient(135deg, rgba(220,38,38,0.3), rgba(153,27,27,0.2)); border: 1px solid rgba(220,38,38,0.3); margin-left: auto; }

/* ===== JD Score Area ===== */
.jd-score-wrap { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--accent-red) 0%, #991b1b 100%); border-radius: 12px; padding: 20px 24px; margin: 0 2.5% 16px; color: #fff; box-shadow: 0 4px 20px rgba(220,38,38,0.3); position: relative; overflow: hidden; transition: all 0.5s ease; }
.jd-score-wrap::before { content: ''; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.jd-score-wrap.score-hit { background: linear-gradient(135deg, #059669 0%, #047857 100%); box-shadow: 0 4px 20px rgba(5,150,105,0.35); }
.jd-score-wrap.score-hit::after { content: ''; position: absolute; top: -60%; right: -10%; width: 260px; height: 260px; background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.jd-score-wrap.score-miss { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); box-shadow: 0 4px 20px rgba(220,38,38,0.3); }
.jd-score-main { display: flex; align-items: center; gap: 16px; flex: 0 0 90%; position: relative; z-index: 1; }
.jd-score-number { font-size: 42px; font-weight: 800; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,0.3); display: flex; align-items: baseline; gap: 2px; }
.jd-score-percent { font-size: 20px; font-weight: 400; opacity: 0.8; }
.jd-score-level { font-size: 42px; font-weight: 800; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.jd-score-label { font-size: 13px; opacity: 0.85; font-weight: 500; }
.jd-score-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }
.jd-score-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); padding: 6px 14px 6px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; position: relative; z-index: 1; margin-left: auto; border: 1px solid rgba(255,255,255,0.15); flex: 0 0 auto; }
.jd-score-badge-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.jd-score-wrap.score-hit .jd-score-badge-icon { background: rgba(255,255,255,0.25); }
.jd-score-wrap.score-miss .jd-score-badge-icon { background: rgba(255,255,255,0.2); }
.jd-score-wrap.score-hit .jd-score-level { margin-left: 0; }

/* Score ring decoration */
.jd-score-ring { width: 80px; height: 80px; border-radius: 50%; background: conic-gradient(#fff 0deg, rgba(255,255,255,0.1) 0deg); display: flex; align-items: center; justify-content: center; position: relative; }
.jd-score-ring-inner { width: 62px; height: 62px; border-radius: 50%; background: var(--accent-red); display: flex; align-items: center; justify-content: center; flex-direction: column; }

/* JD image OCR button — hidden when textarea has content */
.jd-ocr-actions { display: none; }
.jd-ocr-actions.show { display: block; }
.jd-img-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; background: rgba(220,38,38,0.08);
  border: 1px dashed rgba(220,38,38,0.3); border-radius: 8px;
  color: var(--accent-red-light); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.3s; white-space: nowrap; margin-top: 8px;
}
.jd-img-btn:hover { background: rgba(220,38,38,0.15); border-color: var(--accent-red); border-style: solid; }
.jd-img-btn.ocr-processing { opacity: 0.5; pointer-events: none; }
.jd-img-btn.ocr-processing::after { content: '识别中...'; }
.ocr-paste-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; opacity: 0.6; }

/* ===== Strategy edit icon ===== */
.strategy-edit-icon { display: inline-flex; align-items: center; margin-left: 2px; opacity: 0.5; }
.strategy-btn:hover .strategy-edit-icon { opacity: 1; }

/* ===== Chat fullscreen ===== */
.chat-box-fullscreen-btn { width: 32px; height: 32px; border-radius: 6px; background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.chat-box-fullscreen-btn:hover { border-color: var(--accent-red); color: var(--accent-red-light); }
.chat-box.fullscreen { position: fixed; top: 2.5vh; left: 2.5vw; width: 95vw; height: 95vh; z-index: 99999; background: #1a1a1a !important; border-color: var(--accent-red); box-shadow: 0 0 60px rgba(220,38,38,0.3); border-radius: 16px; }
.fullscreen-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 99998; display: none; }
.fullscreen-backdrop.active { display: block; }

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .sidebar.mobile-open {
    display: block;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 240px;
    z-index: 300;
    animation: slide-in 0.3s ease-out;
  }
}

/* ===== Strategy Output — enhanced red accent markdown ===== */
.strategy-output {
  border-color: rgba(220,38,38,0.5) !important;
  border-width: 1px 1px 1px 4px !important;
  box-shadow: 0 0 40px rgba(220,38,38,0.12), 0 4px 24px rgba(0,0,0,0.5) !important;
  position: relative;
}
.strategy-output::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-red), rgba(220,38,38,0.3), var(--accent-red), transparent);
  opacity: 0.8;
}
/* ===== Headers — big & bold with red ===== */
.strategy-output .markdown-content h1 {
  font-size: 26px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-red-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 0 12px 4px;
  margin: 32px 0 20px;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, var(--accent-red), var(--accent-red-light), transparent) 1;
  letter-spacing: 1px;
  font-weight: 900;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(220,38,38,0.3));
}
.strategy-output .markdown-content h2 {
  font-size: 20px; font-weight: 800; color: #fff;
  margin: 28px 0 16px; padding: 12px 20px 12px 20px;
  border-left: none;
  background: linear-gradient(90deg, rgba(220,38,38,0.25) 0%, rgba(220,38,38,0.08) 50%, transparent 100%);
  border-radius: 10px;
  position: relative;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(220,38,38,0.08);
}
.strategy-output .markdown-content h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20px; right: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), transparent);
  border-radius: 2px;
}
.strategy-output .markdown-content h3 {
  font-size: 17px; font-weight: 700; color: #fca5a5;
  margin: 20px 0 12px; padding: 8px 0 8px 16px;
  border-left: 4px solid var(--accent-red-light);
  background: linear-gradient(90deg, rgba(220,38,38,0.06) 0%, transparent 100%);
  border-radius: 0 6px 6px 0;
}
.strategy-output .markdown-content h3::before { display: none; }
.strategy-output .markdown-content h4 {
  color: var(--accent-red-light); font-size: 16px; font-weight: 600;
  margin: 16px 0 10px; padding-left: 0;
  border-bottom: 1px solid rgba(220,38,38,0.15);
  padding-bottom: 6px;
}
/* ===== Paragraphs & Text — brighter ===== */
.strategy-output .markdown-content p {
  color: rgba(245,245,245,0.95); margin-bottom: 12px;
  line-height: 1.85; font-size: 15px;
}
.strategy-output .markdown-content p code {
  background: rgba(220,38,38,0.3);
  color: #fca5a5; padding: 3px 12px; border-radius: 6px;
  font-weight: 600; border: 1px solid rgba(220,38,38,0.25);
}
/* Strong/bold — glowing red */
.strategy-output .markdown-content strong {
  color: #f87171; font-weight: 800;
  text-shadow: 0 0 12px rgba(220,38,38,0.3);
}
/* ===== Lists ===== */
.strategy-output .markdown-content ul {
  margin: 10px 0; padding-left: 24px;
}
.strategy-output .markdown-content ul > li {
  margin-bottom: 8px; padding: 8px 10px 8px 8px;
  border-radius: 8px; transition: all 0.2s;
  color: rgba(245,245,245,0.92);
  border-left: 2px solid transparent;
}
.strategy-output .markdown-content ul > li:hover {
  background: rgba(220,38,38,0.08);
  border-left-color: rgba(220,38,38,0.3);
}
.strategy-output .markdown-content ul > li::before {
  color: #f87171; font-size: 12px;
}
.strategy-output .markdown-content ul ul > li::before {
  color: rgba(220,38,38,0.6);
}
.strategy-output .markdown-content ul ul > li {
  padding: 4px 6px 4px 6px;
  border-left: none;
}
.strategy-output .markdown-content ul ul > li:hover {
  border-left: none;
}
/* Ordered lists */
.strategy-output .markdown-content ol:not(.process-steps) {
  padding-left: 28px; margin: 10px 0;
}
.strategy-output .markdown-content ol:not(.process-steps) > li {
  margin-bottom: 8px; padding: 6px 0 6px 6px;
  color: rgba(245,245,245,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.strategy-output .markdown-content ol:not(.process-steps) > li::marker {
  color: #f87171; font-weight: 800; font-size: 16px;
}
/* Process steps — more dramatic */
.strategy-output .markdown-content ol.process-steps {
  counter-reset: step-counter;
  list-style: none; padding-left: 0;
}
.strategy-output .markdown-content ol.process-steps > li {
  counter-increment: step-counter;
  padding: 18px 18px 18px 56px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(220,38,38,0.1) 0%, rgba(0,0,0,0.3) 100%);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 12px;
  position: relative;
  transition: all 0.25s;
}
.strategy-output .markdown-content ol.process-steps > li:hover {
  border-color: rgba(220,38,38,0.4);
  background: linear-gradient(135deg, rgba(220,38,38,0.15) 0%, rgba(0,0,0,0.3) 100%);
  transform: translateX(8px);
  box-shadow: 0 0 20px rgba(220,38,38,0.1);
}
.strategy-output .markdown-content ol.process-steps > li::before {
  content: counter(step-counter);
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #f87171, #991b1b);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 0 16px rgba(220,38,38,0.5);
}
.strategy-output .markdown-content ol.process-steps > li:not(:last-child)::after {
  content: '';
  position: absolute; bottom: -14px; left: 28px;
  width: 2px; height: 14px;
  background: linear-gradient(180deg, #f87171, transparent);
  opacity: 0.6;
}
/* ===== Tables — more red ===== */
.strategy-output .markdown-content table {
  border-color: rgba(220,38,38,0.35);
  box-shadow: 0 0 20px rgba(220,38,38,0.1);
  border-radius: 12px;
  margin: 18px 0;
  overflow: hidden;
}
.strategy-output .markdown-content thead {
  background: linear-gradient(135deg, rgba(220,38,38,0.5) 0%, rgba(153,27,27,0.35) 100%);
}
.strategy-output .markdown-content th {
  color: #fff; font-weight: 800; font-size: 14px;
  border-bottom: 2px solid #f87171;
  padding: 14px 18px; letter-spacing: 0.5px;
}
.strategy-output .markdown-content td {
  color: var(--text-primary); padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.strategy-output .markdown-content tbody tr:last-child td { border-bottom: none; }
.strategy-output .markdown-content tbody tr:nth-child(even) {
  background: rgba(220,38,38,0.04);
}
.strategy-output .markdown-content tbody tr:hover {
  background: rgba(220,38,38,0.12);
}
/* ===== Blockquotes / Callouts ===== */
.strategy-output .markdown-content blockquote {
  background: linear-gradient(90deg, rgba(220,38,38,0.12) 0%, rgba(220,38,38,0.02) 100%);
  border-left: 4px solid #f87171;
  color: var(--text-primary);
  padding: 16px 20px 16px 24px;
  margin: 16px 0;
  border-radius: 0 10px 10px 0;
}
.strategy-output .markdown-content blockquote p {
  color: rgba(245,245,245,0.95);
  margin-bottom: 4px;
}
.strategy-output .markdown-content blockquote strong {
  color: #f87171;
}
/* ===== Code ===== */
.strategy-output .markdown-content code {
  background: rgba(220,38,38,0.25);
  color: #fca5a5; padding: 3px 12px; border-radius: 6px;
  font-weight: 600; border: 1px solid rgba(220,38,38,0.2);
  font-size: 13px;
}
.strategy-output .markdown-content pre {
  border-color: rgba(220,38,38,0.3);
  background: linear-gradient(135deg, #1a0a0a 0%, var(--bg-secondary) 100%);
  border-radius: 12px; padding: 18px 22px;
  margin: 16px 0;
}
.strategy-output .markdown-content pre code {
  background: none; border: none; padding: 0; color: var(--text-primary);
  box-shadow: none;
}
/* ===== Horizontal Rules ===== */
.strategy-output .markdown-content hr {
  background: linear-gradient(90deg, transparent, #f87171, rgba(220,38,38,0.5), #f87171, transparent);
  height: 2px; margin: 28px 0; border-radius: 2px; opacity: 0.8;
}
/* ===== List item strong emphasis ===== */
.strategy-output .markdown-content li strong {
  color: #f87171; font-weight: 800;
}
/* Strategy recommendation header */
.strategy-rec-header {
  font-size: 20px;
  background: linear-gradient(90deg, rgba(220,38,38,0.15) 0%, transparent 100%);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 3px solid #f87171;
  margin-bottom: 14px;
  font-weight: 700;
}

/* ===== Chat header actions ===== */
.chat-box-header-actions {
  display: flex; align-items: center; gap: 6px;
}
.chat-box-header-btn {
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.chat-box-header-btn:hover {
  color: var(--accent-red-light);
  border-color: rgba(220,38,38,0.3);
  background: rgba(220,38,38,0.1);
}

.output-action-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border-color);
  color: var(--text-muted); cursor: pointer;
  font-size: 12px; font-family: inherit;
  transition: all 0.2s; white-space: nowrap;
}
.output-action-btn:hover {
  color: var(--accent-red-light);
  border-color: var(--accent-red);
  background: rgba(220,38,38,0.1);
}
.output-action-btn svg { flex-shrink: 0; }
.output-action-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.loading-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Enhanced chat input area ===== */
.chat-input-area {
  padding: 10px 20px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}
.chat-input-wrapper {
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input-box {
  flex: 1; display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: 14px; padding: 4px 6px;
  transition: all 0.25s;
}
.chat-input-box:focus-within {
  border-color: var(--accent-red);
  box-shadow: 0 0 16px var(--accent-red-glow), inset 0 0 8px rgba(220,38,38,0.05);
  background: rgba(255,255,255,0.06);
}
.chat-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-size: 15px; resize: none;
  max-height: 120px; line-height: 1.5; padding: 8px 6px;
  font-family: inherit;
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-action-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: none;
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.chat-action-btn:hover {
  background: rgba(220,38,38,0.1);
  color: var(--accent-red-light);
}
.chat-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Strategy buttons — more prominent */
.strategy-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: rgba(255,255,255,0.4);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; white-space: nowrap; flex-shrink: 0;
  letter-spacing: 0.3px;
}
.strategy-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
}
.strategy-btn.active {
  background: rgba(220,38,38,0.35);
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 0 24px var(--accent-red-glow), inset 0 0 12px rgba(220,38,38,0.1);
  transform: scale(1.02);
}
.strategy-btn svg { transition: transform 0.3s; }
.strategy-btn.active svg { transform: rotate(90deg); }

.send-btn {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-red) 0%, #991b1b 100%);
  border: none; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(220,38,38,0.2);
}
.send-btn:hover {
  box-shadow: 0 0 24px var(--accent-red-glow);
  transform: scale(1.05);
}
.send-btn:active { transform: scale(0.95); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

@media (min-width: 768px) and (max-width: 1023px) {
  .app-container { grid-template-columns: 56px 1fr; grid-template-rows: 60px 1fr; }
  .sidebar { display: none !important; }
  .icon-nav { display: flex !important; }
  .mobile-menu-btn { display: none !important; }
  .bottom-nav { display: none !important; }
  .module-layout { grid-template-columns: 1fr; }
  .module-sidebar { max-height: 300px; border-right: none; border-bottom: 1px solid var(--border-color); }
  .three-column-layout { grid-template-columns: 1fr; }
  .comparison-view { grid-template-columns: 1fr; }
  .header-btn span { display: none; }
  .header-btn { padding: 8px 12px; }
  /* Tablet: strategy buttons icon-only to save space */
  .chat-main-title { font-size: 32px; }
  .chat-main-title-sub { font-size: 28px; }
  .strategy-btn { padding: 6px 8px; font-size: 0; gap: 0; }
  .strategy-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
}

@media (max-width: 767px) {
  .app-container { grid-template-columns: 1fr; grid-template-rows: 60px 1fr; }
  .sidebar { display: none; }
  .icon-nav { display: none !important; }
  .mobile-menu-btn { display: flex; }
  .bottom-nav { display: flex; }
  .main-content { margin-bottom: 64px; }
  .chat-main-title { font-size: 24px; }
  .chat-main-title-sub { font-size: 18px; margin-left: 6px; }
  .chat-main-title-sub svg { width: 24px; height: 24px; }
  .chat-box { width: 100%; height: 100%; border-radius: 0; border: none; flex: 1; min-height: 0; }
  .module-layout { grid-template-columns: 1fr; }
  .module-sidebar { max-height: 250px; border-right: none; border-bottom: 1px solid var(--border-color); padding: 16px; }
  .three-column-layout { grid-template-columns: 1fr; }
  .comparison-view { grid-template-columns: 1fr; }
  .job-recommend-page { padding: 14px 14px 80px; }
  .job-recommend-header { flex-direction: column; gap: 8px; margin-bottom: 12px; }
  .job-count { margin-top: 0; }
  .job-ai-search-panel { padding: 12px; margin-bottom: 14px; }
  .job-ai-input-row { gap: 8px; }
  .job-ai-input { min-height: 54px; font-size: 13px; }
  .job-ai-send-btn { width: 44px; height: 44px; min-height: 44px; border-radius: 10px; flex-shrink: 0; }
  .job-platform-links { padding-top: 10px; }
  .job-cards-grid { grid-template-columns: 1fr; }
  .strategy-rec-grid { grid-template-columns: 1fr; }
  .chat-message { max-width: 90%; }
  .header-btn span { display: none; }
  .header-btn { padding: 8px 10px; }
  .header-actions { gap: 8px; }
  /* Mobile: make chat input area always visible */
  .chat-overlay-wrapper { justify-content: flex-start; padding: 0; }
  .chat-input-box { flex-wrap: wrap; gap: 6px; padding: 8px; }
  .chat-input { min-width: 100%; order: 10; padding: 6px 2px; }
  /* Show strategy buttons as icon-only on mobile */
  .strategy-btn { padding: 6px; gap: 0; font-size: 0; }
  .strategy-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
  /* Reduce send button slightly */
  .send-btn { width: 40px; height: 40px; border-radius: 12px; }
  .chat-input-area { padding: 8px 10px 10px; }
  .chat-messages { padding: 12px 14px; }
  /* Platform links scrollable on mobile */
  .platform-links { gap: 6px; padding: 0 10px 10px; overflow-x: auto; flex-wrap: nowrap; }
  .platform-link { flex-shrink: 0; font-size: 12px; padding: 4px 10px; }
  /* Fullscreen backdrop hidden on mobile (already fullscreen) */
  .fullscreen-backdrop { display: none !important; }
}

@media (min-width: 1024px) {
  /* desktop: sidebar + main content */
  .mobile-menu-btn { display: none !important; }
  .icon-nav { display: none !important; }
  .bottom-nav { display: none !important; }
}

/* ===== Strategy Output Panel Style (JD Analysis panel style) ===== */
.chat-message.assistant.strategy-output {
  max-width: 100% !important;
  width: 100%;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  border-left: 4px solid var(--accent-red) !important;
  padding: 0;
}
.strategy-output-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(90deg, rgba(220,38,38,0.08) 0%, transparent 100%);
}
.strategy-output-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-red-light);
  position: relative;
  padding-left: 14px;
}
.strategy-output-header-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--accent-red);
  border-radius: 2px;
}
.strategy-output-thinking {
  margin: 0 16px;
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
}
.strategy-output-thinking-header {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #f87171;
  background: rgba(220,38,38,0.08);
  border-bottom: 1px solid rgba(220,38,38,0.1);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.strategy-output-thinking-body {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245,245,245,0.85);
}
.strategy-output .markdown-content {
  padding: 20px;
}

/* ===== Strategy Recommendation Cards ===== */
.strategy-rec-header {
  font-size: 20px; font-weight: 800; color: #f87171;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--accent-red), transparent) 1;
}
.strategy-rec-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.chat-message.system.strategy-rec-container {
  max-width: 100% !important;
  width: 100%;
  text-align: left;
}
.strategy-rec-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, #191919 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px; padding: 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.strategy-rec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.strategy-rec-card:hover {
  border-color: var(--accent-red); background: var(--bg-hover);
  box-shadow: 0 0 20px var(--accent-red-glow), inset 0 0 20px rgba(220,38,38,0.03);
  transform: translateY(-2px);
}
.strategy-rec-card:hover::before { opacity: 0.8; }
.strategy-rec-name {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: 100%; display: block; text-align: left;
}
.strategy-rec-salary {
  font-size: 14px; font-weight: 800; color: #f87171;
  width: 100%; display: block; text-align: left;
}
.strategy-rec-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.strategy-rec-tag {
  font-size: 11px; padding: 2px 8px;
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: 4px; color: var(--text-muted);
}
.strategy-rec-summary {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.5; margin: 2px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.strategy-rec-bar-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.strategy-rec-bar-track {
  flex: 1; height: 8px; background: #1a1a1a; border-radius: 4px;
  overflow: hidden; border: 1px solid #2a2a2a;
}
.strategy-rec-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #000, #dc2626);
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(220,38,38,0.3);
}
.strategy-rec-score {
  font-size: 16px; font-weight: 800; color: #f87171;
  min-width: 44px; text-align: right;
  text-shadow: 0 0 10px rgba(220,38,38,0.3);
}
.strategy-rec-matched {
  margin-top: 8px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: var(--text-muted);
  line-height: 1.6;
}
.strategy-rec-matched-kw {
  display: inline-block;
  margin: 2px 3px; padding: 1px 6px;
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 3px;
  font-size: 10px; color: var(--accent-red-light);
}
