/* ============================================================
   星链创投 · 风险投资平台 — 深色科技金融主题
   Dark Tech Finance Theme — Shared Stylesheet
============================================================ */

:root {
  --bg-0:        #05070d;
  --bg-1:        #0a0f1c;
  --bg-2:        #0f1626;
  --line:        rgba(212, 175, 55, 0.18);
  --line-soft:   rgba(148, 163, 184, 0.10);
  --gold-1:      #d4af37;
  --gold-2:      #f1d77a;
  --gold-3:      #b88a1f;
  --blue-1:      #4f8dff;
  --blue-2:      #7cb8ff;
  --purple-1:    #8b5cf6;
  --teal-1:      #2dd4bf;
  --text-1:      #e8ecf4;
  --text-2:      #a8b2c5;
  --text-3:      #6b7488;
  --danger:      #ef4444;
  --success:     #10b981;
  --warn:        #f59e0b;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  min-height: 100vh;
}

.font-serif-cn { font-family: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif; }
.font-mono     { font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Background environment ---------- */
.app-bg {
  position: fixed; inset: 0; z-index: -10;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(212,175,55,0.10), transparent 60%),
    radial-gradient(900px 700px at -10% 20%, rgba(79,141,255,0.10), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(139,92,246,0.10), transparent 60%),
    linear-gradient(180deg, #05070d 0%, #070b15 60%, #05070d 100%);
}
.app-grid {
  position: fixed; inset: 0; z-index: -9; pointer-events: none;
  background-image:
    linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: .55;
}

/* ---------- Glass card ---------- */
.glass {
  background: linear-gradient(180deg, rgba(20,28,46,0.78) 0%, rgba(12,18,32,0.78) 100%);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
}
.glass-soft {
  background: linear-gradient(180deg, rgba(18,25,42,0.55) 0%, rgba(10,15,28,0.55) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.hairline { border: 1px solid var(--line-soft); }

/* ---------- Brand & text ---------- */
.brand-wordmark {
  background: linear-gradient(120deg, #f6e1a1 0%, #d4af37 45%, #b88a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gold   { color: var(--gold-1); }
.text-gold-2 { color: var(--gold-2); }
.text-blue   { color: var(--blue-1); }
.text-mute   { color: var(--text-2); }
.text-dim    { color: var(--text-3); }

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-1), transparent);
  opacity: .5;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px;
       padding: 10px 18px; border-radius: 10px; font-weight: 500;
       font-size: 14px; cursor: pointer; border: 1px solid transparent;
       transition: all .2s ease; text-decoration: none; }
.btn-gold {
  background: linear-gradient(120deg, #f1d77a, #d4af37 50%, #b88a1f);
  color: #1a120a; border: 1px solid #c9a961;
  box-shadow: 0 8px 28px -10px rgba(212,175,55,.55);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(212,175,55,.65); }
.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text-1);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--gold-1); color: var(--gold-2); }
.btn-blue {
  background: linear-gradient(120deg, #6aa2ff, #4f8dff 60%, #3a6bd6);
  color: #fff; border: 1px solid #3a6bd6;
  box-shadow: 0 8px 28px -10px rgba(79,141,255,.6);
}

/* ---------- Tag / chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-2);
  background: rgba(255,255,255,0.02);
}
.chip-gold { color: var(--gold-2); border-color: rgba(212,175,55,0.45); background: rgba(212,175,55,0.06); }
.chip-blue { color: var(--blue-2); border-color: rgba(79,141,255,0.45); background: rgba(79,141,255,0.08); }
.chip-purple { color: #c4b5fd; border-color: rgba(139,92,246,0.45); background: rgba(139,92,246,0.08); }
.chip-green { color: #6ee7b7; border-color: rgba(16,185,129,0.45); background: rgba(16,185,129,0.08); }

/* ---------- Hero stat number ---------- */
.stat-num {
  font-family: "DIN Alternate", "PingFang SC", sans-serif;
  font-weight: 700;
  background: linear-gradient(180deg, #f6e1a1 0%, #d4af37 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Top nav ---------- */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 13, 0.7);
  border-bottom: 1px solid var(--line-soft);
}
.nav-link {
  font-size: 14px; color: var(--text-2);
  padding: 6px 14px; border-radius: 8px;
  transition: all .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--gold-2); background: rgba(212,175,55,0.06); }

/* ---------- Subtle animations ---------- */
@keyframes pulse-glow {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}
.pulse-dot::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--success); margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.6);
  animation: pulse-glow 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-line {
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.55), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  height: 1px;
}

/* ---------- Form ---------- */
.input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-soft);
  color: var(--text-1); font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
}
.input:focus {
  border-color: var(--gold-1);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display:block; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.35); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Utility ---------- */
.section-title {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.section-title .bar {
  width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-3));
  border-radius: 2px;
}
.section-title h2 {
  font-size: 26px; font-weight: 700; margin: 0; color: var(--text-1);
  letter-spacing: 1px;
}
.section-title p {
  margin: 0 0 0 auto; font-size: 13px; color: var(--text-3);
}

.kbd { font-family: var(--font-mono); font-size: 11px;
       padding: 1px 6px; border:1px solid var(--line-soft); border-radius: 4px;
       color: var(--text-2); background: rgba(255,255,255,0.02); }

/* corner deco */
.corner-deco { position: relative; }
.corner-deco::before, .corner-deco::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1px solid var(--gold-1); opacity:.6;
}
.corner-deco::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner-deco::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* progress bar */
.bar-track { height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.bar-fill  { height: 100%; background: linear-gradient(90deg, var(--gold-1), var(--gold-2));
             border-radius: 999px; }

/* chart axis colour */
.axis line, .axis path { stroke: rgba(168,178,197,0.18); }
.axis text             { fill: var(--text-3); font-size: 11px; }

/* skill modal */
.skill-modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.skill-modal-mask {
  position: absolute; inset: 0;
  background: rgba(2,4,8,0.78);
  backdrop-filter: blur(8px);
  animation: fadeIn .2s ease;
}
.skill-modal {
  position: relative; width: min(720px, 100%);
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
  animation: popIn .25s cubic-bezier(.2,.8,.3,1.2);
}
.skill-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  color: var(--text-2); cursor: pointer;
  font-size: 14px;
}
.skill-modal-close:hover { color: var(--gold-2); border-color: var(--gold-1); }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn  { from { opacity: 0; transform: translateY(8px) scale(.97) } to { opacity: 1; transform: none } }

/* small skill chip-button */
.skill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; font-size: 13px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-soft);
  color: var(--text-1); cursor: pointer;
  transition: all .2s ease; text-decoration: none;
}
.skill-btn:hover {
  border-color: var(--gold-1);
  background: rgba(212,175,55,.08);
  color: var(--gold-2);
  transform: translateY(-1px);
}
.skill-btn .skill-btn-icon { font-size: 16px; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.45));
  padding: 36px 0; margin-top: 60px;
  color: var(--text-3); font-size: 13px;
}

/* ===== AI 流式输出 markdown 渲染样式 ===== */
.ai-stream {
  font-size: 14px; line-height: 1.85; color: var(--text-1);
}
.ai-stream h1, .ai-stream h2, .ai-stream h3, .ai-stream h4 {
  color: var(--gold-2); font-weight: 600; margin: 1.2em 0 0.6em;
  letter-spacing: 0.02em;
}
.ai-stream h1 { font-size: 22px; border-left: 3px solid var(--gold-1); padding-left: 12px; }
.ai-stream h2 { font-size: 18px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.ai-stream h3 { font-size: 16px; color: var(--text-1); }
.ai-stream h4 { font-size: 14px; color: var(--text-2); }
.ai-stream p { margin: 0.6em 0; color: var(--text-2); }
.ai-stream strong { color: var(--gold-2); font-weight: 600; }
.ai-stream code {
  background: rgba(212,175,55,0.1); color: var(--gold-2);
  padding: 2px 6px; border-radius: 3px; font-size: 12.5px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.ai-stream ul, .ai-stream ol { margin: 0.6em 0 0.6em 1.4em; color: var(--text-2); }
.ai-stream li { margin: 0.3em 0; }
.ai-stream .md-table {
  width: 100%; border-collapse: collapse; margin: 1em 0;
  background: rgba(255,255,255,0.02); font-size: 13px;
}
.ai-stream .md-table th {
  background: rgba(212,175,55,0.08); color: var(--gold-2);
  padding: 10px 12px; text-align: left; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.ai-stream .md-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
}
.ai-stream .md-table tr:hover td { background: rgba(212,175,55,0.04); }

/* 流式光标 */
.ai-cursor::after {
  content: '▋'; color: var(--gold-1);
  animation: blink 0.9s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* AI 状态条 */
.ai-status {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(79,141,255,0.1); border: 1px solid rgba(79,141,255,0.3);
  color: #a8c4ff; font-size: 12.5px; font-weight: 500;
}
.ai-status.success {
  background: rgba(64,200,140,0.1); border-color: rgba(64,200,140,0.3); color: #6ce0a4;
}
.ai-status.error {
  background: rgba(232,90,90,0.12); border-color: rgba(232,90,90,0.4); color: #ff9b9b;
}
.ai-status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.ai-status.success .dot, .ai-status.error .dot { animation: none; }
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

/* AI 触发主按钮 */
.btn-ai {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  background: linear-gradient(135deg, #4f8dff 0%, #8b5cf6 100%);
  color: #fff; font-weight: 600; font-size: 13.5px;
  border: 0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(79,141,255,0.35);
  transition: transform .15s, box-shadow .2s;
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79,141,255,0.5); }
.btn-ai:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ai svg { width: 14px; height: 14px; }

/* ===== 移动端适配 ===== */
@media (max-width: 767px) {
  .top-nav > div { padding-left: 12px; padding-right: 12px; }
  .site-footer > div { padding-left: 12px; padding-right: 12px; }
  /* 认证区域移动端紧凑 */
  #nav-auth .chip { font-size: 10px; padding: 2px 6px; }
  #nav-auth .btn { padding: 4px 10px; font-size: 11px; }
  /* 全局间距压缩 - 不覆盖 corner-deco 和 md: 响应式 padding */
  .glass:not(.corner-deco) { padding: 14px !important; }
  .glass.corner-deco { padding: 16px !important; }
  /* 表格滚动 */
  .glass.overflow-hidden, .glass.overflow-x-auto { overflow-x: auto; }
  table { font-size: 12px; }
  /* 按钮紧凑 */
  .btn { padding: 6px 12px; font-size: 12px; }
  .btn-sm { padding: 4px 10px; font-size: 11px; }
  /* KPI 数字缩小 */
  .stat-num { font-size: 1.25rem; }
  /* Hero 区域紧凑 */
  .font-serif-cn.text-3xl { font-size: 1.5rem; }
  .font-serif-cn.text-4xl { font-size: 1.75rem; }
  .font-serif-cn.text-2xl { font-size: 1.25rem; }
  .font-serif-cn.text-xl  { font-size: 1.1rem; }
  /* section 间距压缩 */
  section { padding-top: 16px !important; padding-bottom: 16px !important; }
  /* 搜索输入框全宽 */
  .input { font-size: 13px; padding: 10px 12px; }
  /* chip 紧凑 */
  .chip { font-size: 11px; padding: 3px 8px; }
  /* 隐藏大屏专属元素 */
  .hide-mobile { display: none !important; }
  /* AI 流式输出区适配 */
  .ai-stream { font-size: 13px; }
  .ai-stream h1 { font-size: 18px; }
  .ai-stream h2 { font-size: 16px; }
  .ai-stream h3 { font-size: 14px; }
  .skill-modal { max-width: 100%; padding: 16px; }
}

/* 移动端管理后台 — 响应式布局 */
.mobile-admin-block {
  display: none;
}
@media (max-width: 767px) {
  .mobile-admin-block { display: none; }
  .admin-sidebar-hide { flex-direction: column; }
  .admin-sidebar-hide > .w-48 { width: 100%; flex-shrink: 1; }
  .admin-sidebar-hide > .w-48 > .glass { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .admin-sidebar-hide > .w-48 .admin-nav { font-size: 11px; padding: 6px 10px; }
  .admin-sidebar-hide > .flex-1 { width: 100%; }
  .admin-content-hide { width: 100%; }
}

/* ============================================================
   技能弹窗 · 文件上传区 & 校验结果
============================================================ */

/* 文件拖放区 */
.skill-dropzone {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.03);
}
.skill-dropzone:hover,
.skill-dropzone:focus,
.skill-dropzone.drag-over {
  border-color: var(--gold-1);
  background: rgba(212, 175, 55, 0.07);
  outline: none;
}

/* 已选文件列表 */
.skill-file-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.skill-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 13px;
}
.skill-file-item > span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}
.skill-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.skill-file-remove:hover {
  color: var(--danger);
  background: rgba(239,68,68,0.1);
}

/* 校验通过 */
.skill-validate-pass {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 13px;
  line-height: 1.6;
}

/* 校验失败 / 信息不足 */
.skill-validate-fail {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  font-size: 13px;
  line-height: 1.6;
}
.skill-validate-fail ul {
  color: var(--text-2);
  margin-top: 4px;
  padding-left: 18px;
}
.skill-validate-fail li {
  font-size: 12px;
  margin-top: 2px;
}

/* ============================================================
   手机端底部功能导航栏
============================================================ */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(9, 14, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    gap: 3px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 10px;
    transition: color .2s;
  }
  .mobile-bottom-nav a .mbn-icon {
    font-size: 20px;
    line-height: 1;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:active {
    color: var(--gold-2);
  }
  /* 页面底部留出导航栏高度，防止内容被遮挡 */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* live 页不加底部 padding（已有自己的控制栏） */
  body[data-page="live"] { padding-bottom: 0; }
}
