/* ============================================
   黑料网数据可视化与信息图站 - 核心样式
   数据新闻风格：白底+多彩图表
   ============================================ */

:root {
  --primary: #1976D2;
  --secondary: #43A047;
  --bg: #FFFFFF;
  --card: #F5F7FA;
  --accent: #E91E63;
  --text: #37474F;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --font-heading: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Source Code Pro", monospace;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

/* 重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航 */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid #E8EDF2;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.main-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.main-nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: #78909C;
}

.breadcrumb a {
  color: #78909C;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
}

/* 首屏英雄区 */
.hero-section {
  background: linear-gradient(135deg, #E3F2FD 0%, #F5F7FA 50%, #E8F5E9 100%);
  padding: 80px 0 60px;
  text-align: center;
}

.hero-section h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-section .subtitle {
  font-size: 1.2rem;
  color: #546E7A;
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px 16px;
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-number.green { color: var(--secondary); }
.stat-number.pink { color: var(--accent); }

.stat-label {
  font-size: 0.85rem;
  color: #78909C;
  margin-top: 8px;
}

/* 模块标题 */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-desc {
  color: #546E7A;
  font-size: 1rem;
  margin-bottom: 32px;
}

/* 通用区块 */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--card);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card-body p {
  font-size: 0.9rem;
  color: #546E7A;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #90A4AE;
}

/* 图表容器 */
.chart-container {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
  margin-bottom: 24px;
}

.chart-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #E3F2FD, #F5F7FA);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

/* 数据来源标注 */
.data-source {
  background: #F5F7FA;
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: #78909C;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #1565C0;
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: #388E3C;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* 团队 */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.team-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
}

.team-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--primary);
}

/* 下载区 */
.download-section {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 40px 0;
}

.download-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.download-section p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.download-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #E8EDF2;
  padding: 20px 0;
}

.faq-question {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-top: 12px;
  font-size: 0.9rem;
  color: #546E7A;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* 页脚 */
.site-footer {
  background: #263238;
  color: #B0BEC5;
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-links h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #B0BEC5;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #37474F;
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
}

/* 搜索 */
.search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto 32px;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #E8EDF2;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 1rem;
}

/* 报告列表 */
.report-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-item {
  display: flex;
  gap: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
  align-items: center;
}

.report-item img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

.report-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.report-info p {
  font-size: 0.9rem;
  color: #546E7A;
  margin-bottom: 12px;
}

/* 工具卡片 */
.tool-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid #E8EDF2;
  text-align: center;
}

.tool-card img {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

/* 滚动叙事 */
.scroll-story {
  position: relative;
  padding: 40px 0;
}

.story-step {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
  opacity: 0.3;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.story-step.active {
  opacity: 1;
  transform: translateY(0);
}

.story-text {
  flex: 1;
}

.story-chart {
  flex: 1;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 120px 20px;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--primary);
  font-family: var(--font-mono);
}

.error-page p {
  font-size: 1.2rem;
  color: #546E7A;
  margin: 16px 0 32px;
}

/* 合规页面 */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 12px;
  color: var(--primary);
}

.legal-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul {
  margin: 12px 0 16px 24px;
}

.legal-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid #E8EDF2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-section {
    padding: 48px 0 40px;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .report-item {
    flex-direction: column;
  }

  .report-item img {
    width: 100%;
    height: 200px;
  }

  .story-step {
    flex-direction: column;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-btns {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* 动画 */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* 图表动画条 */
.bar-chart-demo {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 20px;
}

.bar {
  flex: 1;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  animation: barGrow 1s ease forwards;
}

.bar:nth-child(2) { background: var(--secondary); animation-delay: 0.2s; }
.bar:nth-child(3) { background: var(--accent); animation-delay: 0.4s; }
.bar:nth-child(4) { background: #FF9800; animation-delay: 0.6s; }
.bar:nth-child(5) { background: #9C27B0; animation-delay: 0.8s; }

/* 数据标签 */
.data-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #E3F2FD;
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 6px;
  margin-bottom: 6px;
}

.data-tag.green {
  background: #E8F5E9;
  color: var(--secondary);
}

.data-tag.pink {
  background: #FCE4EC;
  color: var(--accent);
}
