/* ============================================
   律枢 LexHub — Design System v3
   面向评委的演示级品质
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg-deep: #06091A;
  --bg-surface: #0C1128;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);

  --accent-blue: #3B82F6;
  --accent-cyan: #22D3EE;
  --accent-purple: #A78BFA;
  --accent-gradient: linear-gradient(135deg, #3B82F6, #22D3EE, #A78BFA);
  --accent-gradient-warm: linear-gradient(135deg, #F59E0B, #EF4444);

  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  --color-success: #10B981;
  --color-info: #3B82F6;
  --color-contract: #A78BFA;
  --color-rights: #22D3EE;
  --color-qa: #3B82F6;

  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(59, 130, 246, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

  --font-main: 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --topbar-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Background Effects ---------- */
.bg-effects {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.12;
}
.bg-glow--1 {
  width: 600px; height: 600px; background: #3B82F6;
  top: -15%; left: -10%; animation: glowDrift 25s ease-in-out infinite;
}
.bg-glow--2 {
  width: 500px; height: 500px; background: #A78BFA;
  bottom: -10%; right: -8%; animation: glowDrift 25s ease-in-out infinite reverse;
}
.bg-glow--3 {
  width: 400px; height: 400px; background: #22D3EE;
  top: 40%; left: 50%; animation: glowDrift 20s ease-in-out infinite 5s;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
@keyframes glowDrift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -30px); }
  66% { transform: translate(-30px, 20px); }
}

/* ---------- Top Bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  background: rgba(6, 9, 26, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; padding: 0 32px; gap: 32px;
}
.logo-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.logo-word { display: flex; align-items: baseline; gap: 6px; }
.logo-cn { font-size: 1.1rem; font-weight: 900; color: #fff; }
.logo-en { font-size: 0.85rem; font-weight: 700; color: var(--accent-cyan); letter-spacing: 0.5px; }
.logo-sub {
  font-size: 0.65rem; font-weight: 500; color: var(--text-dim);
  background: rgba(255,255,255,0.05); padding: 1px 8px; border-radius: 10px;
  letter-spacing: 1px;
}

.topbar-nav {
  display: flex; gap: 4px; margin-left: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: all 0.2s;
  position: relative;
}
.nav-item i { font-size: 1.1rem; }
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: #fff; background: rgba(255,255,255,0.08);
}
.nav-item.active::after {
  content: ''; position: absolute; bottom: -1px; left: 16px; right: 16px;
  height: 2px; background: var(--accent-gradient); border-radius: 2px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.tech-badge {
  font-size: 0.7rem; font-weight: 600; color: var(--accent-cyan);
  padding: 3px 10px; border-radius: 10px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2);
  letter-spacing: 0.5px;
}

/* Mobile Nav */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: 60px; background: rgba(6, 9, 26, 0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  justify-content: space-around; align-items: center; padding: 0 8px;
}
.mob-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.65rem; font-weight: 500; color: var(--text-dim);
  text-decoration: none; padding: 4px 12px; border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.mob-nav-item i { font-size: 1.2rem; }
.mob-nav-item.active { color: var(--accent-cyan); }

/* ---------- Main Area ---------- */
.main-area {
  position: relative; z-index: 1;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.view {
  display: none; max-width: 1280px; margin: 0 auto; padding: 40px 32px;
  animation: viewIn 0.3s ease;
}
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center; gap: 64px;
  padding: 48px 0 64px; min-height: 420px;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px;
  color: var(--accent-cyan); background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.15); margin-bottom: 24px;
}
.hero-title {
  font-size: 3rem; font-weight: 900; line-height: 1.15; color: #fff;
  margin-bottom: 20px; letter-spacing: -0.5px;
}
.hero-title em {
  font-style: normal;
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.05rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { flex-shrink: 0; }
.hero-stats {
  display: flex; gap: 0; padding: 32px 40px;
  background: var(--bg-card); backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.hero-stat { text-align: center; padding: 0 24px; }
.hero-stat-num {
  display: block; font-size: 2.2rem; font-weight: 900; color: #fff;
  line-height: 1.2;
}
.hero-stat-unit { font-size: 0.9rem; font-weight: 600; color: var(--accent-cyan); }
.hero-stat-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }
.hero-stat-divider { width: 1px; background: var(--border-subtle); margin: 0 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-main); font-size: 0.88rem; font-weight: 600;
  border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s;
  border: none; padding: 10px 20px; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn--lg { padding: 14px 28px; font-size: 0.94rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 6px 12px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn--full { width: 100%; }
.btn--primary {
  background: var(--accent-gradient); color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}
.btn--primary:hover { box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35); transform: translateY(-1px); }
.btn--outline {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-hover);
}
.btn--outline:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(34,211,238,0.04); }
.btn--contract { background: var(--color-contract); color: #fff; }
.btn--contract:hover { box-shadow: 0 4px 20px rgba(167,139,250,0.3); }
.btn--rights { background: var(--color-rights); color: var(--bg-deep); font-weight: 700; }
.btn--rights:hover { box-shadow: 0 4px 20px rgba(34,211,238,0.3); }
.btn--qa { background: var(--color-qa); color: #fff; }
.btn--qa:hover { box-shadow: 0 4px 20px rgba(59,130,246,0.3); }
.btn--ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-subtle); }
.btn--ghost:hover { color: #fff; border-color: var(--border-hover); }

/* ---------- Section Header ---------- */
.section-header { margin-bottom: 36px; }
.section-header h2 { font-size: 1.75rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.section-header p { font-size: 0.94rem; color: var(--text-muted); }

/* ---------- Feature Cards ---------- */
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fcard {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  padding: 32px 28px; transition: all 0.25s; position: relative;
  cursor: pointer; overflow: hidden;
}
.fcard::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  pointer-events: none;
}
.fcard:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-card); }
.fcard--contract:hover { border-color: rgba(167,139,250,0.3); }
.fcard--rights:hover { border-color: rgba(34,211,238,0.3); }
.fcard--qa:hover { border-color: rgba(59,130,246,0.3); }

.fcard-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px;
}
.fcard-icon--contract { background: rgba(167,139,250,0.12); color: var(--color-contract); }
.fcard-icon--rights { background: rgba(34,211,238,0.1); color: var(--color-rights); }
.fcard-icon--qa { background: rgba(59,130,246,0.1); color: var(--color-qa); }

.fcard-phase {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 6px;
}
.fcard-title { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.fcard-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.fcard-points { list-style: none; margin-bottom: 20px; }
.fcard-points li {
  font-size: 0.82rem; color: var(--text-dim); padding: 4px 0;
  padding-left: 16px; position: relative; line-height: 1.5;
}
.fcard-points li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-hover);
}

.fcard-cta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-dim);
  transition: color 0.2s;
}
.fcard:hover .fcard-cta { color: var(--text-primary); }
.fcard-cta i { transition: transform 0.2s; }
.fcard:hover .fcard-cta i { transform: translateX(4px); }

/* ---------- Tech Flow ---------- */
.tech-section { margin-top: 64px; padding-bottom: 32px; }
.tech-flow {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; padding: 24px 0;
}
.tech-node {
  flex-shrink: 0; text-align: center; padding: 20px 16px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); min-width: 100px;
  transition: all 0.2s;
}
.tech-node:hover { border-color: var(--border-hover); }
.tech-node--highlight { border-color: rgba(34,211,238,0.2); background: rgba(34,211,238,0.04); }
.tech-node-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; font-size: 1.1rem; color: var(--accent-cyan);
}
.tech-node-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; line-height: 1.4; }
.tech-node-label small { display: block; color: var(--text-dim); font-size: 0.68rem; margin-top: 2px; }
.tech-arrow { flex-shrink: 0; color: var(--text-dim); font-size: 1rem; }

/* ---------- View Head ---------- */
.view-head { margin-bottom: 28px; }
.view-head h2 { font-size: 1.75rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.view-head p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Split Layout ---------- */
.split-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }

/* ---------- Text Area ---------- */
.text-area {
  width: 100%; background: var(--bg-input); backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 14px 16px; font-family: var(--font-main); font-size: 0.88rem;
  color: var(--text-primary); line-height: 1.6; transition: all 0.2s;
  resize: vertical;
}
.text-area:focus { outline: none; border-color: var(--border-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.text-area::placeholder { color: var(--text-dim); }
.text-area--tall { min-height: 360px; }
.text-area--short { min-height: 44px; max-height: 120px; resize: none; }

/* ---------- Input Field ---------- */
.input-field {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 12px 16px;
  font-family: var(--font-main); font-size: 0.94rem;
  color: var(--text-primary); transition: all 0.2s;
}
.input-field:focus { outline: none; border-color: var(--border-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.input-field::placeholder { color: var(--text-dim); }

/* ---------- Result Box ---------- */
.result-box {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 24px; min-height: 360px; max-height: 640px; overflow-y: auto;
}

/* ---------- Empty State ---------- */
.empty-hint {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 280px; text-align: center; color: var(--text-dim);
}
.empty-hint i { font-size: 3rem; opacity: 0.2; margin-bottom: 16px; }
.empty-hint p { font-size: 0.94rem; color: var(--text-muted); margin-bottom: 4px; }
.empty-hint span { font-size: 0.8rem; }

/* ---------- Scene Pills ---------- */
.scene-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.scene-pill {
  display: inline-flex; padding: 7px 16px; font-family: var(--font-main);
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 20px; cursor: pointer; transition: all 0.2s;
}
.scene-pill:hover { color: var(--text-primary); border-color: var(--border-hover); }
.scene-pill.active { color: var(--accent-cyan); border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.06); }

/* ---------- Chat ---------- */
.chat-area {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 24px; min-height: 400px; max-height: 520px; overflow-y: auto;
  margin-bottom: 16px;
}
.msg { display: flex; gap: 12px; margin-bottom: 20px; }
.msg--user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.msg-avatar--ai { background: var(--accent-gradient); color: #fff; }
.msg-avatar--user { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.msg-bubble {
  max-width: 75%; padding: 14px 18px; border-radius: var(--radius-lg);
  font-size: 0.9rem; line-height: 1.7; word-break: break-word;
}
.msg-bubble--ai {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); border-top-left-radius: 4px;
}
.msg-bubble--user {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(34,211,238,0.1));
  border: 1px solid rgba(59,130,246,0.15); color: var(--text-primary);
  border-top-right-radius: 4px;
}
.msg-bubble ul { margin: 8px 0 0 20px; list-style: disc; }
.msg-bubble li { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2px; }

.chat-bar { display: flex; gap: 12px; align-items: flex-end; }

/* ---------- QA ---------- */
.qa-input-area { max-width: 800px; margin: 0 auto 32px; }
.qa-search-box {
  position: relative; display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.2s;
}
.qa-search-box:focus-within { border-color: var(--border-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.qa-search-icon { position: absolute; left: 16px; color: var(--text-dim); font-size: 1.2rem; }
.qa-field { border: none; background: transparent; padding: 14px 16px 14px 48px; padding-right: 80px; }
.qa-field:focus { box-shadow: none; }
.qa-search-box .btn--qa {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 8px 18px; font-size: 0.85rem;
}
.qa-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.qa-suggest-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.qa-suggest {
  padding: 5px 12px; font-family: var(--font-main); font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle); border-radius: 16px;
  cursor: pointer; transition: all 0.2s;
}
.qa-suggest:hover { color: var(--text-primary); border-color: var(--border-hover); }
.qa-result-area { max-width: 800px; margin: 0 auto; }

/* ---------- Prose (Markdown Render) ---------- */
.prose h1 { font-size: 1.3rem; font-weight: 800; color: #fff; margin: 24px 0 12px; }
.prose h2 { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }
.prose h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 18px 0 8px; }
.prose h4 { font-size: 0.95rem; font-weight: 700; color: #fff; margin: 14px 0 6px; }
.prose p { margin-bottom: 12px; color: var(--text-secondary); line-height: 1.75; }
.prose ul, .prose ol { margin-left: 24px; margin-bottom: 12px; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 4px; color: var(--text-muted); line-height: 1.6; }
.prose strong { color: #fff; font-weight: 600; }
.prose code {
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.06); font-size: 0.85rem; color: var(--accent-cyan);
}
.prose blockquote {
  border-left: 3px solid var(--accent-cyan); padding: 8px 16px; margin: 12px 0;
  color: var(--text-muted); background: rgba(34,211,238,0.03); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 0.85rem; }
.prose-table th {
  text-align: left; padding: 10px 12px;
  background: rgba(255,255,255,0.04); color: var(--text-secondary);
  font-weight: 600; border-bottom: 1px solid var(--border-subtle);
}
.prose-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-muted);
}

/* ---------- Risk Stats ---------- */
.risk-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 24px;
}
.risk-stat-item {
  text-align: center; padding: 14px 8px;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.risk-stat-num { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.risk-stat-label { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.timeline-step { display: flex; align-items: center; gap: 6px; }
.timeline-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}
.timeline-dot.active {
  background: var(--accent-gradient); color: #fff; border-color: transparent;
  box-shadow: 0 0 12px rgba(34,211,238,0.25);
}
.timeline-label { font-size: 0.8rem; font-weight: 500; color: var(--text-dim); }
.timeline-label.active { color: var(--accent-cyan); }
.timeline-arrow { color: var(--text-dim); font-size: 0.7rem; }

/* ---------- Loading ---------- */
.loading-dots {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 0;
}
.loading-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan);
  animation: dotPulse 1.4s infinite ease-in-out both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ---------- Toast ---------- */
.toast-notification {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-10px);
  z-index: 200; padding: 12px 24px; border-radius: var(--radius-md);
  background: rgba(12, 17, 40, 0.95); backdrop-filter: blur(16px);
  color: #fff; font-size: 0.88rem; border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card); opacity: 0; transition: all 0.3s; pointer-events: none;
}
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Error ---------- */
.error-card {
  background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-md); padding: 20px;
}
.error-card .error-title { color: #f87171; font-weight: 600; font-size: 0.94rem; margin-bottom: 4px; }
.error-card .error-msg { color: var(--text-muted); font-size: 0.85rem; }
.error-card .error-hint { color: var(--text-dim); font-size: 0.75rem; margin-top: 8px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-cards { grid-template-columns: 1fr; }
  .hero { flex-direction: column; gap: 32px; }
  .hero-stats { width: 100%; justify-content: center; }
  .split-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .mobile-nav { display: flex; }
  .view { padding: 24px 16px; padding-bottom: 80px; }
  .hero-title { font-size: 2rem; }
  .hero-stats { flex-direction: column; gap: 16px; padding: 20px; }
  .hero-stat-divider { width: 100%; height: 1px; }
  .hero-stat { padding: 8px 0; }
  .main-area { padding-top: 0; }
  .risk-stats { grid-template-columns: repeat(2, 1fr); }
  .tech-flow { gap: 4px; }
  .tech-node { padding: 12px 10px; min-width: 80px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .msg-bubble { max-width: 90%; }
}
