/* ── 技术签名条：和站点内容无关，纯手写 canvas 粒子系统 ──── */

.showcase {
  border-top: 1px solid var(--hairline);
  background: var(--ground-2);
  padding: 0 0 clamp(20px, 3vw, 32px);
}

.showcase-tab-nav {
  display: flex;
  border-bottom: 1px solid var(--hairline);
}

.showcase-tab-btn {
  flex: 1;
  padding: 13px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.showcase-tab-btn:hover { color: var(--ink-dim); }

.showcase-tab-btn:focus-visible {
  outline: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--garnet);
}

.showcase-tab-btn.is-active {
  color: var(--garnet);
  border-bottom-color: var(--garnet);
}

.showcase-panels {
  position: relative;
}

.showcase-item {
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.showcase-item.is-active {
  opacity: 1;
  pointer-events: auto;
}

.showcase-item:not(.is-active) {
  position: absolute;
  top: 0;
  left: 0;
}

.showcase-canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(240px, 30vw, 440px);
}

#showcase-canvas,
#sdf-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 交互提示挪到画布右上角，做成一个小角标，不占文字说明那一行的位置 */
.showcase-hint {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(24, 20, 15, 0.55);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  pointer-events: none;
}

.showcase-hint .hint-touch { display: none; }

@media (pointer: coarse) {
  /* 触屏设备没有鼠标也没有键盘，"把鼠标伸进来""按 D" 这种提示文案没有意义，换一句 */
  .showcase-hint .hint-mouse { display: none; }
  .showcase-hint .hint-touch { display: inline; }
}

.showcase-caption {
  margin-top: 10px;
  padding: 0 clamp(12px, 3vw, 28px);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.showcase-caption b {
  color: var(--ink-dim);
  font-weight: 500;
}

footer {
  padding: 18px clamp(24px, 6vw, 72px);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ── 页面签名印章：形状由本次页面的真实 SHA-256 指纹决定，
   内容一变、指纹一变，图案就跟着变，不是固定装饰图 ────────── */

.footer-seal {
  width: 26px;
  height: 26px;
  opacity: 0.55;
  transition: opacity 200ms ease;
  cursor: pointer;
}

.footer-seal:hover,
.footer-seal:focus-visible { opacity: 1; }

.footer-seal canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── 彩蛋提示：点了才展开，平时就是页脚一个不起眼的小圆点 ──── */

.egg-hint-btn {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  background: none;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 180ms ease, border-color 180ms ease;
}

.egg-hint-btn:hover,
.egg-hint-btn:focus-visible,
.egg-hint-btn.is-open {
  color: var(--garnet);
  border-color: var(--garnet);
  outline: none;
}

.egg-hint-panel {
  position: fixed;
  left: 50%;
  bottom: 64px;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  background: rgba(24, 20, 15, 0.96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-dim);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.egg-hint-panel.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.egg-hint-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 10px;
  padding-right: 36px; /* 给右上角悬浮的关闭按钮留位置 */
}

.egg-hint-panel ul {
  margin: 0;
  padding-left: 18px;
}

.egg-hint-panel li { margin-bottom: 7px; }
.egg-hint-panel li:last-child { margin-bottom: 0; }
.egg-hint-panel b { color: var(--garnet); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .egg-hint-panel { transition: none; }
}

.footer-left a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.gongan-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gongan-link img {
  display: block;
  opacity: 0.75;
}

.footer-left a:hover,
.footer-left a:focus-visible {
  color: var(--ink-dim);
  border-bottom-color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  .door, .door-spot, .door-glyph, .door-arrow, .thesis-wrap {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  /* 上面那条会把立方体的面全部拍回原点，面的定位不是动画，得留着 */
  .doors.is-cube .door { transform: var(--face) !important; }
}
