/* ============================================================
   五层蛋糕 · Five-Layer Cake — AI 产业研报站
   深色优先设计系统
   ============================================================ */

:root {
  /* 页面平面与图表表面（dataviz 规范） */
  --page: #0d0d0d;
  --surface-1: #1a1a19;
  --surface-2: #222220;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid-hairline: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.1);

  /* 五层专属色（深色分类色板，已验证） */
  --l1-energy: #c98500;
  --l2-chips: #008300;
  --l2-chips-bright: #35b135;
  --l3-infra: #3987e5;
  --l4-models: #9085e9;
  --l5-apps: #d55181;

  --accent: #3987e5;

  --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --radius: 14px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(57, 135, 229, 0.35); }

a { color: inherit; text-decoration: none; }

/* ---------- 背景氛围 ---------- */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 45% at 15% -5%, rgba(57, 135, 229, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 40% at 90% 10%, rgba(144, 133, 233, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(201, 133, 0, 0.08), transparent 60%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(13, 13, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.nav-logo .logo-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.nav-logo .logo-mark span {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  display: block;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); background: rgba(255, 255, 255, 0.09); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 40px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 78vh;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.03);
}
.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--l2-chips-bright);
  box-shadow: 0 0 10px var(--l2-chips-bright);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #c98500, #35b135 28%, #3987e5 55%, #9085e9 78%, #d55181);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
}
.hero-quote {
  margin-top: 26px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(57, 135, 229, 0.07);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}
.hero-quote strong { color: var(--text-primary); }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn-primary {
  background: linear-gradient(120deg, #2a78d6, #4a3aa7);
  box-shadow: 0 8px 28px rgba(57, 135, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(57, 135, 229, 0.5); }
.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }

/* ---------- 3D 蛋糕 ---------- */
.cake-stage {
  perspective: 1300px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 480px;
}

/* 蛋糕旁的层图例（自顶向下 L5→L1） */
.cake-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}
.cake-legend a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}
.cake-legend a .sw {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--lc);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lc) 55%, transparent);
}
.cake-legend a .num {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  display: block;
}
.cake-legend a:hover, .cake-legend a.hl {
  background: rgba(255, 255, 255, 0.05);
  border-color: color-mix(in srgb, var(--lc) 45%, transparent);
  color: var(--text-primary);
}
.cake {
  position: relative;
  width: 340px;
  height: 420px;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-38deg);
  animation: cakeFloat 7s ease-in-out infinite;
}
@keyframes cakeFloat {
  0%, 100% { transform: rotateX(56deg) rotateZ(-38deg) translateZ(0); }
  50% { transform: rotateX(56deg) rotateZ(-38deg) translateZ(18px); }
}
.cake-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 26px;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 30px 60px rgba(0, 0, 0, 0.55);
}
.cake-layer::after {
  /* 层侧面厚度的模拟 */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  filter: brightness(0.55);
  transform: translateZ(-26px);
  z-index: -1;
}
.cake-layer .cl-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateZ(38deg) rotateX(-56deg) translateZ(46px);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.cake-layer:hover .cl-label,
.cake-layer.hl .cl-label { opacity: 1; }
.cake-layer .cl-num {
  font-size: 11px;
  opacity: 0.75;
  display: block;
  text-align: center;
  letter-spacing: 0.2em;
}
.cake-layer:hover, .cake-layer.hl {
  transform: translate(-50%, -50%) translateZ(var(--z, 0)) translateX(-26px) translateY(26px) !important;
  filter: brightness(1.25) saturate(1.15);
}

/* 每层的尺寸/高度/颜色 —— 底大顶小 */
.cake-layer.l1 { width: 340px; height: 340px; --z: 0px;   background: linear-gradient(135deg, #e8a51a, #8a5c00); transform: translate(-50%, -50%) translateZ(0); }
.cake-layer.l2 { width: 292px; height: 292px; --z: 56px;  background: linear-gradient(135deg, #2ea52e, #00520a); transform: translate(-50%, -50%) translateZ(56px); }
.cake-layer.l3 { width: 244px; height: 244px; --z: 112px; background: linear-gradient(135deg, #56a0f0, #16407e); transform: translate(-50%, -50%) translateZ(112px); }
.cake-layer.l4 { width: 196px; height: 196px; --z: 168px; background: linear-gradient(135deg, #a89ef5, #40318f); transform: translate(-50%, -50%) translateZ(168px); }
.cake-layer.l5 { width: 148px; height: 148px; --z: 224px; background: linear-gradient(135deg, #ea7fa8, #8f2b52); transform: translate(-50%, -50%) translateZ(224px); }

/* ---------- 通用 section ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
}
.section-head { margin-bottom: 40px; }
.section-head .kicker {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--text-secondary); margin-top: 12px; max-width: 680px; }

/* ---------- 五层卡片 ---------- */
.layer-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.layer-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.layer-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--lc, var(--accent));
}
.layer-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--lc) 55%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 34px color-mix(in srgb, var(--lc) 18%, transparent);
}
.layer-card .lc-idx {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.layer-card .lc-idx .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--lc); }
.layer-card h3 { font-size: 19px; margin-bottom: 8px; }
.layer-card h3 .en { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.08em; margin-top: 2px; }
.layer-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }
.layer-card .lc-go {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}
.layer-card:hover .lc-go { color: var(--text-primary); gap: 10px; }

/* ---------- 最新研报列表（首页） ---------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* ---------- 研报条目卡 ---------- */
.report-item {
  display: block;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  position: relative;
  overflow: hidden;
}
.report-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--lc, var(--accent));
  opacity: 0.85;
}
.report-item:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--lc, var(--accent)) 50%, transparent);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}
.report-item .ri-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.report-item .ri-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  background: color-mix(in srgb, var(--lc, var(--accent)) 16%, transparent);
  color: color-mix(in srgb, var(--lc, var(--accent)) 70%, #fff);
}
.report-item h4 { font-size: 16.5px; line-height: 1.45; margin-bottom: 8px; }
.report-item p { font-size: 13.5px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 模块页 ---------- */
.layer-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 30px;
}
.layer-hero .lh-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  border: 1px solid color-mix(in srgb, var(--lc) 40%, transparent);
  background: color-mix(in srgb, var(--lc) 10%, transparent);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.layer-hero .lh-badge .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 12px var(--lc); }
.layer-hero h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; letter-spacing: -0.01em; }
.layer-hero h1 .en { display: block; font-size: 15px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.14em; margin-top: 8px; }
.layer-hero .lh-desc { margin-top: 18px; color: var(--text-secondary); max-width: 720px; font-size: 16px; }

.layer-stack-nav {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.layer-stack-nav a {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.layer-stack-nav a:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.3); }
.layer-stack-nav a.cur { background: color-mix(in srgb, var(--lc) 18%, transparent); color: var(--text-primary); border-color: color-mix(in srgb, var(--lc) 45%, transparent); }

.report-list { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 研报正文页 ---------- */
.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}
.article-head { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-head .ah-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; flex-wrap: wrap; }
.article-head .ah-tag {
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12.5px;
  background: color-mix(in srgb, var(--lc, var(--accent)) 16%, transparent);
  color: color-mix(in srgb, var(--lc, var(--accent)) 70%, #fff);
}
.article-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.28; font-weight: 800; letter-spacing: -0.01em; }
.article-head .ah-abstract { margin-top: 16px; color: var(--text-secondary); font-size: 15.5px; }

.article h2 {
  font-size: 24px;
  font-weight: 750;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--lc, var(--accent));
  line-height: 1.4;
}
.article h3 { font-size: 18px; font-weight: 700; margin: 30px 0 12px; }
.article p { margin: 14px 0; color: var(--text-secondary); font-size: 15.5px; }
.article strong { color: var(--text-primary); font-weight: 650; }
.article ul, .article ol { margin: 14px 0 14px 24px; color: var(--text-secondary); font-size: 15.5px; }
.article li { margin: 7px 0; }
.article li::marker { color: var(--lc, var(--accent)); }

/* 摘要要点卡 */
.key-points {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0;
}
.key-points .kp-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-points .kp-title::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--lc, var(--accent)); }
.key-points ol { margin-left: 20px; }
.key-points li { margin: 8px 0; color: var(--text-secondary); }
.key-points li strong { color: var(--text-primary); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: 12px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.article th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--baseline);
  white-space: nowrap;
}
.article td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--grid-hairline);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.article tr:last-child td { border-bottom: none; }
.article td:first-child { color: var(--text-primary); }

/* 图表容器 */
.chart-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 14px;
  margin: 26px 0;
}
.chart-card .cc-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.chart-card .cc-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; margin-bottom: 14px; }
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-card .cc-src { font-size: 11.5px; color: var(--text-muted); margin-top: 10px; }
.chart-tooltip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  background: #262624;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
}
.chart-tooltip .tt-k { color: var(--text-muted); margin-right: 8px; }

/* 来源列表 */
.sources {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.sources h2 { border: none; padding: 0; font-size: 16px; color: var(--text-secondary); }
.sources ol { font-size: 13px; }
.sources a { color: var(--text-muted); word-break: break-all; transition: color 0.2s; }
.sources a:hover { color: var(--accent); }

/* 免责声明 */
.disclaimer {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 上一层/下一层导航 */
.article-nav { display: flex; gap: 14px; margin-top: 40px; }
.article-nav a {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-1);
  transition: border-color 0.2s, transform 0.2s;
  font-size: 14px;
}
.article-nav a:hover { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.article-nav .an-dir { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-layers { display: flex; gap: 6px; }
.footer-layers span { width: 22px; height: 5px; border-radius: 3px; display: block; }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: unset; padding-top: 48px; }
  .cake-stage { min-height: 420px; order: -1; }
  .cake { transform: rotateX(56deg) rotateZ(-38deg) scale(0.82); }
  @keyframes cakeFloat {
    0%, 100% { transform: rotateX(56deg) rotateZ(-38deg) scale(0.82) translateZ(0); }
    50% { transform: rotateX(56deg) rotateZ(-38deg) scale(0.82) translateZ(18px); }
  }
  .layer-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .layer-cards { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cake { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
