/* ============================================================
   LLM 模型服务幕 · 动态公式滚动卡（高级黑 · 控制台风）
   作用域：仅 .wenjing-hix（platforms/index.html 专用，勿复用类名）
   ============================================================ */

.wenjing-hix .hix-formula-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(125, 180, 255, 0.22);
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(125, 180, 255, 0.13), transparent 58%),
    linear-gradient(165deg, #14283f 0%, #0c1a2b 55%, #0a1524 100%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---- 顶部窗口条 ---- */
.wenjing-hix .hix-card-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px clamp(20px, 2.2vw, 30px);
  border-bottom: 1px solid rgba(125, 180, 255, 0.1);
  background: rgba(255, 255, 255, 0.015);
}
.wenjing-hix .hix-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.wenjing-hix .hix-dot:first-child { background: rgba(125, 180, 255, 0.45); }
.wenjing-hix .hix-bar-title {
  margin-left: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #5d7b96;
}
.wenjing-hix .hix-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #6f93b5;
}
.wenjing-hix .hix-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7db4ff;
  animation: hix-live-pulse 2s ease-in-out infinite;
}
@keyframes hix-live-pulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* ---- 滚动区（用 mask 做上下渐隐，适配渐变底色） ---- */
.wenjing-hix .hix-formula-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: clamp(18px, 2.4vh, 30px) clamp(20px, 2.2vw, 30px) 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 88%, transparent 100%);
}

.wenjing-hix .hix-formula-track {
  will-change: transform;
}

.wenjing-hix .hix-formula-item {
  margin-bottom: clamp(26px, 3.4vh, 44px);
}

.wenjing-hix .hix-formula-label {
  font-family: Consolas, "Courier New", monospace;
  font-style: italic;
  font-size: clamp(11px, 0.9vw, 13px);
  color: #4f6d88;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}

.wenjing-hix .hix-formula-math {
  font-family: "Times New Roman", "STIX Two Math", Georgia, serif;
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 24px);
  color: #e6f0fa;
  white-space: nowrap;
  text-shadow: 0 0 22px rgba(125, 180, 255, 0.12);
}

/* 语法高亮：函数名/主体 蓝 · 指数/运算 琥珀 */
.wenjing-hix .hix-formula-math .hx-fn {
  font-style: italic;
  color: #7db4ff;
}
.wenjing-hix .hix-formula-math .hx-amp {
  font-style: italic;
  color: #ffb03a;
}

/* 纯 CSS 分式（本组件内专用类名，hix- 前缀防撞） */
.wenjing-hix .hix-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  margin: 0 6px;
  line-height: 1.3;
}
.wenjing-hix .hix-frac .hix-num {
  border-bottom: 1.2px solid rgba(125, 180, 255, 0.5);
  padding: 0 6px 2px;
}
.wenjing-hix .hix-frac .hix-den {
  padding: 2px 6px 0;
}
.wenjing-hix .hix-formula-math sub,
.wenjing-hix .hix-formula-math sup {
  font-size: 0.66em;
  color: inherit;
}

/* 窄屏（≤800px 单列时容器高 320px，与 .wenjing-visual 现有断点一致） */
@media (max-width: 800px) {
  .wenjing-hix .hix-formula-item { margin-bottom: 22px; }
  .wenjing-hix .hix-bar-title { display: none; }
}

/* ---- 布局收束：16:9 大面板、左列宽松（仅本幕，≥801px 覆盖场景网格） ---- */
@media (min-width: 801px) {
  .wenjing-hix {
    grid-template-columns: minmax(340px, 0.8fr) minmax(430px, 1fr);
    gap: clamp(32px, 4.5vw, 80px);
  }
  /* 左侧文案列放宽，标题不换行 */
  .wenjing-hix .wenjing-copy { max-width: 460px; }
  /* 16:9 电影感比例，占满右列；覆盖场景默认的固定高度 */
  .wenjing-hix .wenjing-visual {
    width: 100%;
    max-width: 880px;
    height: auto;
    aspect-ratio: 16 / 9;
    justify-self: end;
  }
}

/* ---- 公式字号放大一档，撑满 16:9 卡面 ---- */
@media (min-width: 801px) {
  .wenjing-hix .hix-formula-label {
    font-size: clamp(12px, 1vw, 14px);
    margin-bottom: 12px;
  }
  .wenjing-hix .hix-formula-math {
    font-size: clamp(20px, 1.9vw, 29px);
  }
  .wenjing-hix .hix-formula-item {
    margin-bottom: clamp(30px, 4.6vh, 52px);
  }
}
