/* theme.css — 技术秀场公共底座 · 品牌视觉与通用组件
 * 彩色水墨体系：宣纸底 + 墨色，辅以中国传统颜料色。
 * 每个项目通过覆盖 :root 变量来切换主题色相，不改结构。
 * 命名统一前缀 st-（showtime），避免与各页自有样式冲突。
 */

:root {
  /* ---------- 基底 ---------- */
  --st-paper:      #f5ecd7;   /* 宣纸底 */
  --st-paper-deep: #efe3c8;   /* 宣纸深 */
  --st-ink:        #2b2b2b;   /* 墨色 */
  --st-ink-2:      #3c3a36;
  --st-ink-light:  rgba(43, 43, 43, .56);
  --st-line:       rgba(43, 43, 43, .16);

  /* ---------- 中国传统颜料 ---------- */
  --st-indigo:     #4a6b8a;   /* 花青 */
  --st-azurite:    #3b6ea5;   /* 石青 */
  --st-malachite:  #6f9e83;   /* 石绿 */
  --st-cinnabar:   #c0392b;   /* 朱砂 */
  --st-rouge:      #c45d7c;   /* 胭脂 */
  --st-gold:       #d9a441;   /* 藤黄 / 鎏金 */
  --st-ochre:      #a0522d;   /* 赭石 */

  /* ---------- 主题槽（各页覆盖） ---------- */
  --st-accent:     var(--st-rouge);
  --st-accent-2:   var(--st-indigo);
  --st-glow:       rgba(217, 164, 65, .55);
  --st-bg:         var(--st-paper);
  --st-fg:         var(--st-ink);
  --st-fg-light:   var(--st-ink-light);

  --st-serif: 'Noto Serif SC', 'Cormorant Garamond', 'Songti SC', serif;
  --st-ease:  cubic-bezier(.22, 1, .36, 1);
  --st-ease-paper: cubic-bezier(.3, .05, .25, 1);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--st-bg);
  font-family: var(--st-serif);
  color: var(--st-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.st-fixed { overflow: hidden; height: 100%; }
body.st-fixed > canvas.st-stage {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
}
.st-ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.st-ui .st-interactive { pointer-events: auto; }

/* ---------- 顶部品牌栏 ---------- */
.st-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 12;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 38px;
}
.st-brand { display: flex; align-items: center; gap: 12px; }
.st-brand img { width: 34px; height: 34px; }
.st-brand .st-brand-name {
  font-size: 17px; letter-spacing: .3em; font-weight: 600;
  color: var(--st-fg); white-space: nowrap;
}
.st-brand .st-brand-sub {
  font-size: 11px; letter-spacing: .18em; color: var(--st-fg-light);
  border-left: 1px solid var(--st-line); padding-left: 12px; margin-left: 2px;
  white-space: nowrap;
}
.st-brand a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 12px; }

/* ---------- 底部公司胶囊条 ---------- */
.st-footer {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 12;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 22px; border-radius: 999px;
  background: rgba(245, 236, 215, .74);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(43, 43, 43, .08), inset 0 0 0 1px rgba(43, 43, 43, .06);
  white-space: nowrap;
}
.st-footer img { width: 22px; height: 22px; }
.st-footer .st-company { font-size: 13px; letter-spacing: .12em; font-weight: 600; color: var(--st-ink); }
.st-footer .st-divider { color: rgba(43, 43, 43, .25); font-size: 12px; }
.st-footer .st-tagline { font-size: 12px; letter-spacing: .14em; color: var(--st-ink-light); }

/* ---------- 右下角摄像头圆窗 ---------- */
.st-cam {
  position: absolute; right: 34px; bottom: 62px; z-index: 11;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.st-cam-circle {
  position: relative; width: 220px; height: 220px; border-radius: 50%;
  overflow: hidden; background: #1a1a1a;
  box-shadow: 0 8px 30px rgba(43, 43, 43, .18), 0 0 0 1px rgba(43, 43, 43, .08);
}
.st-cam-circle video,
.st-cam-circle canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* 镜像规范：只镜像视频（照镜子）；骨架画布不做 CSS 镜像，绘制时数学镜像 */
.st-cam-circle video { transform: scaleX(-1); }
.st-cam-circle .st-cam-offline {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 18px;
  color: rgba(255, 255, 255, .62); font-size: 12px; letter-spacing: .2em; line-height: 1.7;
}
.st-cam.hidden { display: none; }

/* ---------- HUD（小窗下方数值） ---------- */
.st-hud {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; letter-spacing: .12em; color: var(--st-fg-light);
  text-align: center; font-variant-numeric: tabular-nums;
}
.st-hud .st-row { display: flex; gap: 10px; justify-content: center; align-items: baseline; }
.st-hud .st-key { width: 52px; text-align: right; }
.st-hud .st-val { min-width: 96px; text-align: left; color: var(--st-fg); }

/* ---------- 顶部提示条 ---------- */
.st-hint {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 13;
  padding: 9px 24px; border-radius: 999px;
  background: rgba(43, 43, 43, .8); color: rgba(255, 255, 255, .93);
  font-size: 13px; letter-spacing: .12em;
  opacity: 0; transition: opacity .5s var(--st-ease);
  pointer-events: none; white-space: nowrap; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis;
}
.st-hint.show { opacity: 1; }

/* ---------- 卡片 / 面板 ---------- */
.st-panel {
  background: rgba(255, 255, 255, .48);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.st-panel-solid {
  background: rgba(245, 236, 215, .92);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

/* ---------- 按钮 ---------- */
.st-btn {
  pointer-events: auto; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: .14em;
  color: var(--st-fg);
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--st-line);
  border-radius: 999px; padding: 9px 20px;
  transition: background .3s var(--st-ease), border-color .3s var(--st-ease),
              transform .3s var(--st-ease), color .3s var(--st-ease);
}
.st-btn:hover { background: rgba(255, 255, 255, .8); border-color: rgba(43, 43, 43, .3); transform: translateY(-1px); }
.st-btn:active { transform: translateY(0); }
.st-btn.accent { color: var(--st-accent); border-color: rgba(196, 93, 124, .4); }
.st-btn.on { background: var(--st-accent); color: #fff; border-color: transparent; }
.st-btn svg { vertical-align: middle; }
.st-btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 隐私声明 ---------- */
.st-privacy {
  position: absolute; left: 38px; top: 84px; z-index: 12;
  max-width: 300px;
  font-size: 11px; line-height: 1.8; letter-spacing: .06em;
  color: var(--st-fg-light);
}
.st-privacy b { color: var(--st-accent); font-weight: 600; }

/* ---------- 降级提示 ---------- */
.st-degrade {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%);
  z-index: 13; max-width: min(560px, 90vw);
  padding: 12px 22px; border-radius: 12px;
  background: rgba(43, 43, 43, .84); color: rgba(255, 255, 255, .92);
  font-size: 12.5px; line-height: 1.7; letter-spacing: .06em;
  opacity: 0; transition: opacity .5s var(--st-ease);
  pointer-events: none; text-align: center;
}
.st-degrade.show { opacity: 1; }

/* ---------- 加载态 ---------- */
.st-loading {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  background: var(--st-bg);
  transition: opacity .7s var(--st-ease);
}
.st-loading.done { opacity: 0; pointer-events: none; }
.st-loading .st-spin {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--st-line); border-top-color: var(--st-accent);
  animation: st-spin 1s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-loading .st-loading-text { font-size: 13px; letter-spacing: .3em; color: var(--st-fg-light); }

@media (max-width: 720px) {
  .st-header { padding: 16px 22px; }
  .st-brand .st-brand-sub { display: none; }
  .st-cam-circle { width: 150px; height: 150px; }
  .st-cam { right: 18px; bottom: 84px; }
  .st-footer { bottom: 12px; padding: 6px 16px; }
  .st-footer .st-tagline { display: none; }
  .st-privacy { left: 22px; top: 72px; max-width: 220px; font-size: 10px; }
}
