/* ========== 四维体系 swxt.com.cn 全局样式 V2 ========== */
:root {
  --c-primary: #e91e63;
  --c-lynch: #3b82f6;
  --c-livermore: #f97316;
  --c-wyckoff: #8b5cf6;
  --c-elliott: #eab308;
  --c-bg: #fafafa;
  --c-text: #1a1a1a;
  --c-muted: #999;
  --c-border: #e0e0e0;
  --c-card: #fff;
  --radius: 12px;
  --max-w: 960px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 导航 ---- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .dot { color: var(--c-primary); }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--c-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--c-text); text-decoration: none; }

/* ---- 容器 ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1;
}

/* ---- 卡片 ---- */
.card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--c-border);
  margin-bottom: 24px;
}
.card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---- 四军团网格 ---- */
.corps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.corps-card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--c-border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--c-text);
}
.corps-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.corps-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}
.corps-icon.lynch { background: var(--c-lynch); }
.corps-icon.livermore { background: var(--c-livermore); }
.corps-icon.wyckoff { background: var(--c-wyckoff); }
.corps-icon.elliott { background: var(--c-elliott); }
.corps-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.corps-card p { font-size: 13px; color: var(--c-muted); line-height: 1.5; }

/* ---- 搜索框 ---- */
.search-box {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-card);
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--c-primary); }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 15px;
  background: transparent;
}
.search-input::placeholder { color: #bbb; }
.search-btn {
  background: var(--c-primary);
  color: #fff;
  border: none;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.search-btn:hover { opacity: 0.85; }

/* ---- 标签 ---- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.tag-lynch { background: #dbeafe; color: #1d4ed8; }
.tag-livermore { background: #ffedd5; color: #c2410c; }
.tag-wyckoff { background: #ede9fe; color: #6d28d9; }
.tag-elliott { background: #fef9c3; color: #a16207; }

/* ---- 底部 ---- */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: #bbb;
  font-size: 12px;
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.footer a { color: #999; }

/* ---- 研究员按钮 ---- */
.researchers-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.researcher-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 32px;
  border-radius: 20px;
  border: 2px solid var(--c-border);
  background: var(--c-card);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}
.researcher-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.researcher-btn.lynch { border-color: var(--c-lynch); }
.researcher-btn.lynch:hover { background: #eff6ff; }
.researcher-btn.livermore { border-color: var(--c-livermore); }
.researcher-btn.livermore:hover { background: #fff7ed; }
.researcher-btn.wyckoff { border-color: var(--c-wyckoff); }
.researcher-btn.wyckoff:hover { background: #f5f3ff; }
.researcher-btn.elliott { border-color: var(--c-elliott); }
.researcher-btn.elliott:hover { background: #fefce8; }

.researcher-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
}
.lynch .researcher-icon { background: var(--c-lynch); }
.livermore .researcher-icon { background: var(--c-livermore); }
.wyckoff .researcher-icon { background: var(--c-wyckoff); }
.elliott .researcher-icon { background: var(--c-elliott); }

.researcher-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
}
.researcher-sub {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 4px;
}

/* ---- 加载遮罩 ---- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.loading-content {
  text-align: center;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- 方法论页面 ---- */
.method-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 32px;
}
.method-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.method-hero .subtitle {
  font-size: 16px;
  color: var(--c-muted);
}
.method-section { margin-bottom: 32px; }
.method-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.method-section ul {
  list-style: none;
  padding-left: 0;
}
.method-section li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  line-height: 1.6;
}
.method-section li:last-child { border-bottom: none; }
.method-section li::before {
  content: '→';
  margin-right: 8px;
  color: var(--c-primary);
  font-weight: 600;
}

/* ---- 分析结果页 ---- */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.result-header h1 { font-size: 28px; }
.score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.score-ring.lynch { background: var(--c-lynch); }
.score-ring.livermore { background: var(--c-livermore); }
.score-ring.wyckoff { background: var(--c-wyckoff); }
.score-ring.elliott { background: var(--c-elliott); }
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dim-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
}
.dim-card h4 { font-size: 14px; color: var(--c-muted); margin-bottom: 8px; }
.dim-card .score { font-size: 28px; font-weight: 800; }
.dim-card .verdict { font-size: 13px; margin-top: 4px; }

/* ---- 登录/注册表单 ---- */
.auth-container {
  max-width: 400px;
  margin: 60px auto;
}
.auth-box {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--c-border);
  text-align: center;
}
.auth-box h1 {
  font-size: 24px;
  margin-bottom: 8px;
}
.auth-box .subtitle {
  color: var(--c-muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--c-text);
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--c-primary);
}
.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}
.auth-btn:hover { opacity: 0.85; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-link {
  margin-top: 20px;
  font-size: 14px;
  color: var(--c-muted);
}
.auth-link a { color: var(--c-primary); font-weight: 500; }
.error-msg {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.success-msg {
  background: #f0fdf4;
  color: #16a34a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .nav { padding: 12px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .container { padding: 32px 16px; }
  .corps-grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .researchers-row { gap: 12px; }
  .researcher-btn { padding: 16px 20px; min-width: 80px; }
  .researcher-icon { width: 44px; height: 44px; font-size: 20px; }
  .researcher-name { font-size: 14px; }
  .researcher-sub { font-size: 11px; }
  .auth-container { margin: 30px auto; padding: 0 16px; }
  .auth-box { padding: 24px; }
}

@media (max-width: 600px) {
  .dimension-grid { grid-template-columns: 1fr; }
}
