/* ===========================================================
   星诚供需平台 — 统一设计系统 v2.0
   主色调: 蓝色 #2563eb / 深蓝 #1e40af / 浅蓝 #dbeafe
   点缀色: 琥珀橙 #f59e0b（CTA按钮/高亮）
   字体: Inter + Noto Sans SC
   =========================================================== */

/* === 设计Token === */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --primary-bg: #eff6ff;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fef3c7;
  --blue: #3b82f6;
  --blue-dark: #1e40af;
  --blue-light: #dbeafe;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-blue: 0 4px 14px rgba(37,99,235,.15);
  --shadow-accent: 0 4px 14px rgba(245,158,11,.25);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === 基础重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--gray-800); background: var(--gray-50); line-height: 1.6; }
a { color: var(--gray-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* === 容器 === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === 导航栏 === */
.navbar { background: #fff; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; }
.navbar-content { display: flex; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 56px; gap: 20px; }
.navbar .logo { font-size: 17px; font-weight: 800; color: var(--gray-800); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.navbar .logo .logo-icon { color: var(--primary); font-size: 20px; }
.nav-menu { display: flex; list-style: none; gap: 2px; flex: 1; margin: 0; padding: 0; }
.nav-menu li a { display: block; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--gray-500); border-radius: var(--radius-sm); transition: all .2s; }
.nav-menu li a:hover { background: var(--primary-bg); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.nav-actions .btn { padding: 6px 16px; font-size: 12px; border-radius: 20px; }
.nav-actions .btn-primary { background: var(--primary); color: #fff; border: none; }
.nav-actions .btn-primary:hover { background: var(--primary-dark); }
.nav-actions .btn-outline { background: transparent; border: 1.5px solid var(--gray-200); color: var(--gray-600); }
.nav-actions .btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* === 按钮 === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 20px; font-size: 13px; font-weight: 600; border-radius: 25px; border: none; cursor: pointer; transition: all .2s; white-space: nowrap; font-family: var(--font-sans); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,.35); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-blue { background: var(--primary); color: #fff; box-shadow: var(--shadow-blue); }
.btn-blue:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.25); }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 15px; }

/* === 板块标题 === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-header .title { display: flex; align-items: center; gap: 8px; }
.section-header .title h2 { font-size: 18px; font-weight: 700; color: var(--gray-800); }
.section-header .title h2 .hl { color: var(--primary); }
.section-header .title .sub { font-size: 12px; color: var(--gray-400); font-weight: 400; margin-left: 4px; }
.section-header .more { font-size: 13px; color: var(--primary); font-weight: 600; text-decoration: none; }
.section-header .more:hover { color: var(--primary-dark); }
.section-hr { width: 40px; height: 3px; background: var(--primary); border-radius: 2px; margin-top: 4px; }

.section { padding: 40px 0; }
.section-alt { background: var(--primary-bg); }
.section-white { background: #fff; }

/* === 卡片基类 === */
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 16px; transition: all .25s; }
.card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.card-blue { border-left: 3px solid var(--primary); }

/* === Hero 首屏 === */
.hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 35%, #2563eb 100%); padding: 40px 20px 36px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(ellipse at 30% 60%, rgba(59,130,246,.15) 0%, transparent 60%), radial-gradient(ellipse at 70% 30%, rgba(245,158,11,.08) 0%, transparent 50%); pointer-events: none; }
.hero h1 { font-size: clamp(28px, 3.5vw, 38px); font-weight: 800; letter-spacing: -.5px; line-height: 1.15; margin-bottom: 4px; position: relative; z-index: 1; background: linear-gradient(135deg, #fff 0%, #93c5fd 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .subtitle { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 16px; letter-spacing: 1px; position: relative; z-index: 1; }
.hero .search-bar { display: flex; max-width: 520px; margin: 0 auto 14px; gap: 0; border-radius: 50px; overflow: hidden; position: relative; z-index: 1; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.hero .search-bar input { flex: 1; padding: 11px 20px; border: none; font-size: 14px; outline: none; background: rgba(255,255,255,.95); }
.hero .search-bar input::placeholder { color: var(--gray-400); }
.hero .search-bar button { padding: 11px 24px; background: var(--accent); color: #fff; border: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s; }
.hero .search-bar button:hover { background: var(--accent-dark); }
.hero .tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; position: relative; z-index: 1; }
.hero .tags span { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); padding: 4px 14px; border-radius: 20px; font-size: 12px; border: 1px solid rgba(255,255,255,.12); }
.hero-cards { display: flex; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.hero-card { flex: 1; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 14px 12px; cursor: pointer; transition: all .3s; text-align: center; color: #fff; }
.hero-card:hover { background: rgba(255,255,255,.16); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.15); }
.hero-card .icon { font-size: 26px; margin-bottom: 4px; }
.hero-card .title { font-size: 14px; font-weight: 700; }
.hero-card .desc { font-size: 11px; opacity: .65; margin-top: 2px; }

/* === 筛选标签 === */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filters .tab { padding: 5px 14px; font-size: 12px; border-radius: 20px; border: 1px solid var(--gray-200); color: var(--gray-500); background: #fff; cursor: pointer; transition: all .2s; font-family: var(--font-sans); }
.filters .tab:hover { border-color: var(--primary); color: var(--primary); }
.filters .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === 网格系统 === */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* === 情报热度条 === */
.heat-compact { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.heat-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.heat-row .hr-name { font-size: 12px; min-width: 56px; color: var(--gray-600); font-weight: 600; }
.heat-row .hr-bar { flex: 1; height: 20px; border-radius: 10px; overflow: hidden; background: var(--gray-100); }
.heat-row .hr-bar .hr-fill { height: 100%; border-radius: 10px; transition: width .8s ease; }
.heat-row .hr-count { font-size: 11px; min-width: 28px; color: var(--gray-400); text-align: right; font-weight: 700; }

/* === 快讯卡片 === */
.daily-news-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.news-item-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 14px; transition: all .25s; }
.news-item-card:hover { box-shadow: var(--shadow); }
.news-item-card .ni-ind { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.news-item-card .ni-item { display: block; font-size: 12px; color: var(--gray-500); padding: 5px 0; line-height: 1.5; border-bottom: 1px solid var(--gray-100); }
.news-item-card .ni-item:last-child { border-bottom: none; }
.news-item-card .ni-item:hover { color: var(--primary); }

/* === 报告/文章卡片 === */
.report-grid, .article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.report-card, .article-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 16px; cursor: pointer; transition: all .25s; }
.report-card:hover, .article-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); transform: translateY(-2px); }
.report-card .rc-icon { font-size: 22px; margin-bottom: 6px; }
.report-card .rc-title, .article-card .ac-title { font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report-card .rc-ind { display: inline-block; font-size: 11px; color: var(--primary); background: var(--primary-bg); padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; font-weight: 500; }
.report-card .rc-date { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.article-card .ac-ind { display: inline-block; font-size: 11px; color: var(--accent); background: var(--accent-light); padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; font-weight: 500; }
.article-card .ac-excerpt { font-size: 12px; color: var(--gray-400); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* === 数据统计 === */
.data-stats-compact { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.data-stat-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 18px 14px; text-align: center; transition: all .25s; }
.data-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.data-stat-card .dsc-icon { font-size: 24px; margin-bottom: 4px; }
.data-stat-card .dsc-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.data-stat-card .dsc-label { font-size: 12px; color: var(--gray-400); margin-top: 2px; font-weight: 500; }

/* === 推荐企业 === */
.rec-enterprise-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 14px; }
.rec-ent-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 16px; transition: all .25s; }
.rec-ent-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.rec-ent-card .rec-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.rec-ent-card .rec-desc { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.rec-ent-card .rc-tag { font-size: 10px; background: var(--primary-bg); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-weight: 500; }

/* === 匹配区 === */
.match-section { background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-bg) 100%); border: 1px solid rgba(37,99,235,.15); border-radius: var(--radius-xl); padding: 28px 24px; text-align: center; box-shadow: 0 2px 12px rgba(37,99,235,.06); }
.match-section h3 { font-size: 18px; color: var(--gray-800); margin-bottom: 4px; }
.match-section p { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }

/* === 模态框 === */
/* 由 index.html 内联样式接管 .modal 定义，此处只控制遮罩容器 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: var(--radius-lg); max-width: 480px; width: 90%; padding: 24px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-content .close { position: absolute; top: 12px; right: 16px; font-size: 24px; cursor: pointer; color: var(--gray-400); }

/* === 页脚 === */
.footer { background: var(--gray-900); color: rgba(255,255,255,.5); padding: 32px 0 20px; font-size: 12px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer h4 { color: #fff; font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.footer p { line-height: 1.7; font-size: 12px; }
.footer a { color: rgba(255,255,255,.45); transition: color .2s; }
.footer a:hover { color: var(--primary-light); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; margin-top: 20px; text-align: center; font-size: 11px; color: rgba(255,255,255,.35); }

/* === 设计变量别名 === */
:root {
  --primary-color: var(--primary);
  --secondary-color: var(--blue);
  --bg-light: var(--gray-50);
  --text-primary: var(--gray-800);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --border-color: var(--gray-200);
  --border-light: var(--gray-100);
  --danger-color: var(--red);
  --success-color: var(--green);
}

/* === 滚动公告栏 === */
.announcement-bar { background: var(--gray-900); color: #fff; font-size: 13px; font-weight: 500; overflow: hidden; white-space: nowrap; padding: 9px 0; cursor: default; }
.announcement-content { display: inline-block; animation: marquee 60s linear infinite; padding-left: 100%; will-change: transform; }
.announcement-content:hover { animation-play-state: paused; }
.announcement-content strong { margin: 0 10px; font-weight: 700; color: #fbbf24; }
.announcement-content a { color: #93c5fd; font-weight: 600; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* === 新手引导 === */
.onboarding-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 10000; display: none; align-items: center; justify-content: center; }
.onboarding-box { background: #fff; border-radius: 20px; padding: 35px 30px; max-width: 460px; width: 92%; box-shadow: 0 25px 80px rgba(0,0,0,.25); text-align: center; animation: onboardFadeIn .35s ease; position: relative; }
@keyframes onboardFadeIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* === 智能客服 === */
.smart-chat-btn { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border: none; border-radius: 26px; padding: 0 20px; height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-blue); transition: all .25s; font-family: var(--font-sans); }
.smart-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(37,99,235,.35); }
.smart-chat-btn .chat-badge { background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; line-height: 1.2; position: absolute; top: -6px; right: -6px; }
.smart-chat-box { position: fixed; bottom: 80px; right: 24px; width: 360px; max-height: 500px; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,.2); z-index: 999; display: none; flex-direction: column; overflow: hidden; }
.smart-chat-box.active { display: flex; }
.smart-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--primary); color: #fff; }
.smart-chat-header h4 { font-size: 14px; font-weight: 600; }
.smart-chat-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 4px; }
.smart-chat-messages { flex: 1; padding: 12px; overflow-y: auto; max-height: 340px; min-height: 120px; }
.smart-chat-msg { margin-bottom: 10px; display: flex; }
.smart-chat-msg.user { justify-content: flex-end; }
.smart-chat-msg.bot { justify-content: flex-start; }
.smart-chat-msg .msg-bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.smart-chat-msg.user .msg-bubble { background: var(--primary); color: #fff; border-radius: 14px 4px 14px 14px; }
.smart-chat-msg.bot .msg-bubble { background: var(--gray-100); color: var(--gray-700); border-radius: 4px 14px 14px 14px; }
.smart-chat-typing { display: none; font-size: 11px; color: var(--gray-400); padding: 4px 16px; font-style: italic; }
.smart-chat-input-area { display: flex; border-top: 1px solid var(--gray-200); padding: 8px; gap: 6px; }
.smart-chat-input-area input { flex: 1; padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 20px; font-size: 13px; outline: none; font-family: var(--font-sans); }
.smart-chat-input-area input:focus { border-color: var(--primary); }
.smart-chat-input-area button { padding: 8px 16px; background: var(--primary); color: #fff; border: none; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* === 加载 === */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 20px; color: var(--gray-400); font-size: 13px; gap: 8px; }

/* === 带背景装饰的板块 === */
.section-bg-intel { background: linear-gradient(180deg, var(--primary-bg) 0%, #fff 100%); }
.section-bg-brief { background: #fff; }
.section-bg-reports { background: var(--gray-50); }
.section-bg-data { background: linear-gradient(180deg, #fff 0%, var(--primary-bg) 100%); }
.section-bg-market { background: var(--primary-bg); }
.section-bg-featured { background: #fff; }
.section-bg-about { background: #fff; border-top: 1px solid var(--gray-100); }

/* 板块顶部装饰线 */
.section-head-deco { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.section-head-deco .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gray-200), transparent); }

/* === 移动端 === */
@media (max-width:480px) {
  .mobile-toggle { display: block; }
  .nav-menu { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 100; }
  .nav-menu.open { display: flex; }
  .nav-menu li a { font-size: 16px; padding: 12px 24px; }
  .hero { padding: 20px 12px 24px; }
  .hero h1 { font-size: 20px; }
  .hero .subtitle { font-size: 11px; }
  .hero .search-bar { flex-direction: column; border-radius: 0; box-shadow: none; }
  .hero .search-bar input { border-radius: 25px; margin-bottom: 6px; }
  .hero .search-bar button { border-radius: 25px; }
  .hero-cards { flex-direction: column; gap: 8px; }
  .hero-card { padding: 12px; }
  .section { padding: 24px 0; }
  .section-header .title h2 { font-size: 15px; }
  .data-stats-compact { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .data-stat-card { padding: 12px; }
  .data-stat-card .dsc-value { font-size: 18px; }
  .daily-news-compact { grid-template-columns: 1fr; }
  .report-grid, .article-grid, .rec-enterprise-grid { grid-template-columns: 1fr; }
  .filters { overflow-x: auto; flex-wrap: nowrap; gap: 4px; }
  .filters .tab { white-space: nowrap; font-size: 11px; padding: 4px 10px; }
  .nav-actions .btn { padding: 5px 12px; font-size: 11px; }
}

@media (min-width:481px) and (max-width:768px) {
  .hero h1 { font-size: 24px; }
  .daily-news-compact { grid-template-columns: repeat(2,1fr); }
  .report-grid, .article-grid { grid-template-columns: repeat(2,1fr); }
  .rec-enterprise-grid { grid-template-columns: repeat(2,1fr); }
  .data-stats-compact { grid-template-columns: repeat(2,1fr); }
}
