/* ============================================
   北电视频标签体系 · MoMA 黑白基底 + 学院组彩色
   ============================================ */

:root {
  --bg:             #ffffff;
  --bg-soft:        #fafafa;
  --text:           #000000;
  --text-secondary: #666666;
  --text-muted:     #999999;
  --line:           #e5e5e5;
  --line-strong:    #d0d0d0;
  --hover-bg:       #f4f4f4;

  /* 学院组配色（白底上校色后） */
  --c-directing:      #B8901E;   /* 暖金（加深，白底上更稳） */
  --c-cinematography: #6B6B7A;   /* 银灰（加深） */
  --c-sound:          #5B4FA0;   /* 紫蓝（加深） */
  --c-animation:      #B03A36;   /* 朱红（加深） */

  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-sans:  'Inter', -apple-system, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ 视图切换 ============ */
.view { display: none; min-height: 100vh; animation: fadeIn 0.4s ease both; }
.view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============ 介绍页 ============ */
#view-intro {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
}
#view-intro.active { display: flex; }

.intro-bg {
  position: absolute; inset: 0;
  background: var(--bg);
  /* 占位背景：极淡的水平细线 */
  background-image: linear-gradient(180deg, transparent 0%, transparent 49.9%, var(--line) 50%, transparent 50.1%, transparent 100%);
  background-size: 100% 240px;
  opacity: 0.6;
}

.intro-content {
  position: relative; z-index: 1;
  max-width: 900px; padding: 0 40px;
}
.intro-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 76px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
  color: var(--text);
}
.intro-desc {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 2.2;
  max-width: 600px;
  margin: 0 auto 64px;
  letter-spacing: 0.05em;
}
.placeholder-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
  padding: 2px 8px;
  margin-left: 12px;
  letter-spacing: 0.1em;
  vertical-align: middle;
  border-radius: 0;
  font-family: var(--font-sans);
}

.intro-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 18px 52px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.4em;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.intro-btn:hover {
  background: var(--text);
  color: var(--bg);
}
.intro-btn .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.intro-btn:hover .arrow { transform: translateX(6px); }

.intro-footer {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  z-index: 1;
}

/* ============ 顶部栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.topbar-back {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar-back:hover { opacity: 0.55; }
.topbar-back::before { content: '←'; font-size: 16px; }

/* 右上角的"返回欢迎页"：箭头在右边，图标变成 ↗ */
.topbar-right-back::before { content: ''; display: none; }
.topbar-right-back::after { content: '↗'; font-size: 16px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.breadcrumb-item {
  cursor: pointer;
  transition: color 0.3s;
  letter-spacing: 0.05em;
}
.breadcrumb-item:hover { color: var(--text); }
.breadcrumb-item.current { color: var(--text); cursor: default; }
.breadcrumb-sep { color: var(--text-muted); font-size: 11px; }

/* ============ 总览页（放射图谱）============ */
#view-overview { padding-bottom: 60px; }

.galaxy-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 20px 20px;
  position: relative;
}
#galaxy-svg {
  width: min(1300px, 95vw);
  height: min(1300px, 95vw);
  display: block;
}

/* SVG 内交互 — 完全无 hover 动效，只浮窗 */
.cat-node {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
}
.cat-node.placeholder { opacity: 0.4; }

.cat-circle {
  /* 不再有任何 transition / filter / stroke-width 变化 */
}

.cat-label-zh {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  fill: var(--text);
  pointer-events: none;
  text-anchor: middle;
}
.cat-label-en {
  /* 已不再渲染 */
  display: none;
}
.cat-label-code {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  fill: var(--text-secondary);
  pointer-events: none;
  text-anchor: middle;
}

.subcat-node {
  cursor: pointer;
}
.subcat-label {
  font-family: var(--font-serif);
  font-weight: 600;
  fill: var(--text);
  pointer-events: none;
  text-anchor: middle;
  letter-spacing: 0.02em;
}

.center-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.15em;
  fill: var(--text);
  text-anchor: middle;
  pointer-events: none;
}

/* ============ 星图下方说明区 ============ */
.below-galaxy {
  text-align: center;
  padding: 30px 40px 60px;
}
.below-galaxy .hint {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 28px;
}
.legend {
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
}
.legend-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.08em;
}
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* hover 浮窗 */
.tip {
  position: fixed;
  z-index: 1000;
  background: var(--bg);
  border: 1px solid var(--text);
  padding: 16px 20px;
  max-width: 300px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.08);
}
.tip.show { opacity: 1; }
.tip-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: 0.05em;
}
.tip-en { display: none; }
.tip-desc {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  letter-spacing: 0.02em;
}
.tip-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.1em;
}

/* ============ 流程式分层导览（双栏布局：左流程 + 右详情）============ */
#view-flow {
  padding: 0 0 60px;
}

.flow-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 64px);
}

/* 左：流程区 —— 宽度最多占一半，内部横向滚动 */
.flow-container {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 32px 32px 32px 40px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* 中：灰色虚线分隔 */
.flow-divider {
  flex: 0 0 0px;
  width: 0;
  border-left: 1px dashed var(--line-strong);
  margin: 24px 0;
}

/* 右：详情区 —— 固定宽度，内部可滚动 */
.flow-detail {
  flex: 1 1 50%;
  padding: 40px 48px 40px 40px;
  overflow-y: auto;
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
}

/* 右详情空态（未选标签时） */
.flow-detail-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 2;
  gap: 28px;
}
.flow-detail-empty .empty-line {
  width: 40px;
  height: 1px;
  background: var(--line-strong);
}

.flow-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 60vh;
}

.flow-column {
  flex: 0 0 auto;
  width: 240px;
  border-right: 1px solid var(--line);
  padding: 0 16px;
  animation: slideIn 0.4s ease both;
}
.flow-column:last-child { border-right: none; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.flow-col-header {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.flow-item {
  padding: 14px 16px;
  margin-bottom: 2px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.flow-item:hover {
  background: var(--hover-bg);
  border-left-color: var(--text);
}
.flow-item.active {
  background: var(--hover-bg);
  border-left-color: var(--text);
}
.flow-item-zh {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 4px;
}
.flow-item-en {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 11px;
  color: var(--text-muted);
}
.flow-item-meta {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.15em;
}
.flow-item-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}
.flow-item:hover .flow-item-arrow,
.flow-item.active .flow-item-arrow { opacity: 1; }

.flow-item.leaf .flow-item-arrow::before { content: '↗'; }
.flow-item:not(.leaf) .flow-item-arrow::before { content: '→'; }

.flow-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.placeholder-banner {
  margin: 60px auto;
  max-width: 480px;
  text-align: center;
  padding: 60px 32px;
  border: 1px dashed var(--line-strong);
}
.placeholder-banner .icon {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.2em;
}
.placeholder-banner h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--text);
}
.placeholder-banner p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 2;
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
}

/* ============ 右侧标签详情内容 ============ */
.detail-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.detail-title {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 500;
}
.detail-en {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

.detail-section {
  margin-bottom: 32px;
}
.detail-section-title {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.detail-definition {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  letter-spacing: 0.02em;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 0.3s, color 0.3s;
  background: transparent;
}
.detail-action:hover {
  background: var(--text);
  color: var(--bg);
}

/* 响应式：屏幕窄时上下堆叠 */
@media (max-width: 1024px) {
  .flow-layout { flex-direction: column; }
  .flow-container { flex: 0 0 auto; max-width: 100%; }
  .flow-detail { flex: 0 0 auto; max-height: none; position: static; border-top: 1px dashed var(--line-strong); }
  .flow-divider { display: none; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* 响应式 */
@media (max-width: 768px) {
  .intro-title { font-size: 44px; }
  .topbar { padding: 14px 20px; }
  .detail-title { font-size: 36px; }
  .flow-column { width: 240px; }
}
