/* ============================================================
   实验页公共样式 —— 所有 demos/ 下的页面共用这一份
   风格：深色赛博朋克（黑底 + 青/品红霓虹）
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #050508;
  color: #e8ecf4;
  font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* 全屏画布：每个实验的主角 */
.stage-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 返回按钮：左上角悬浮胶囊 */
.demo-back {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e8ecf4;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.demo-back:hover {
  border-color: #00f0ff;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
  transform: translateX(-4px);
}

/* 左下角的信息卡片：告诉观众这是什么实验 */
.demo-info {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 420px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none; /* 不挡鼠标交互 */
}
.demo-info .tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #00f0ff;
  margin-bottom: 8px;
}
.demo-info h1 {
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(90deg, #00f0ff, #ff2d78);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.demo-info p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 236, 244, 0.65);
}

/* 右上角的提示（比如「拖动我」「点击试试」） */
.demo-hint {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(232, 236, 244, 0.75);
  border: 1px dashed rgba(0, 240, 255, 0.4);
  background: rgba(10, 10, 18, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: hintPulse 2.4s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* 滚动型实验页的通用小节容器（anime / text 实验室用） */
.lab-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lab-section .sec-label {
  font-size: 12px;
  letter-spacing: 0.35em;
  color: #00f0ff;
  margin-bottom: 14px;
}
.lab-section .sec-title {
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

/* 通用霓虹按钮 */
.neon-btn {
  cursor: pointer;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.06);
  color: #00f0ff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: all 0.25s;
}
.neon-btn:hover {
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}
.neon-btn.pink {
  border-color: rgba(255, 45, 120, 0.5);
  background: rgba(255, 45, 120, 0.06);
  color: #ff2d78;
}
.neon-btn.pink:hover {
  background: rgba(255, 45, 120, 0.18);
  box-shadow: 0 0 20px rgba(255, 45, 120, 0.4);
}

@media (max-width: 640px) {
  .demo-info { max-width: calc(100vw - 48px); padding: 14px 18px; }
  .demo-hint { display: none; }
}

/* 嵌入模式：被首页 iframe 实况预览引用时（URL 带 ?embed=1），
   隐藏所有 UI 元素，只留纯净画面 */
body.embed .demo-back,
body.embed .demo-info,
body.embed .demo-hint,
body.embed .controls,
body.embed .page-foot { display: none !important; }
