/* 语音演示：底部字幕控制条 + 讲解区域高亮 */
body.demo-on { padding-bottom: 150px; }

.demo-bar {
  position: fixed; left: 50%; bottom: 16px; z-index: 1000; transform: translateX(-50%);
  width: min(1080px, calc(100vw - 32px)); padding: 10px 16px 14px;
  border-radius: 16px; color: #e8eaf2; overflow: hidden;
  background: linear-gradient(180deg, rgba(22, 24, 40, .94), rgba(14, 16, 28, .97));
  box-shadow: 0 18px 48px -12px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  animation: demo-in .35s var(--ease);
}
@keyframes demo-in { from { opacity: 0; transform: translate(-50%, 16px); } }

.demo-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .08); }
.demo-progress i { display: block; height: 100%; background: linear-gradient(90deg, #818cf8, #38bdf8); transition: width .4s var(--ease); }

.demo-chapters {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 10px;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.demo-chapters::-webkit-scrollbar { display: none; }
.demo-chapter {
  flex: none; font: inherit; font-size: 12px; color: #aab0c6; cursor: pointer;
  background: rgba(255, 255, 255, .07); border: 0; border-radius: 999px; padding: 3px 11px;
  transition: background .15s, color .15s;
}
.demo-chapter:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.demo-chapter.active { background: #4f46e5; color: #fff; font-weight: 600; }

.demo-main { display: flex; align-items: center; gap: 14px; }
.demo-body { flex: 1; min-width: 0; }
.demo-chip { display: block; font-size: 12px; font-weight: 600; color: #fcd34d; letter-spacing: .02em; }
.demo-text { margin: 3px 0 0; font-size: 16px; line-height: 1.55; color: #fff; }

.demo-eq { flex: none; display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; width: 22px; }
.demo-eq i { width: 3px; height: 30%; border-radius: 2px; background: #818cf8; animation: demo-eq 1s ease-in-out infinite; }
.demo-eq i:nth-child(2) { animation-delay: .18s; }
.demo-eq i:nth-child(3) { animation-delay: .36s; }
.demo-eq i:nth-child(4) { animation-delay: .54s; }
.demo-bar.paused .demo-eq i { animation-play-state: paused; }
@keyframes demo-eq { 50% { height: 100%; } }

.demo-ctrl { flex: none; display: flex; align-items: center; gap: 2px; }
.demo-btn {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px;
  border: 0; border-radius: 8px; background: transparent; color: #e8eaf2; cursor: pointer; font: inherit; font-size: 12px;
}
.demo-btn svg { width: 18px; height: 18px; }
.demo-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.demo-btn:disabled { opacity: .35; cursor: default; }
.demo-btn.text { border: 1px solid rgba(255, 255, 255, .18); margin-left: 4px; }
.demo-btn.attn { background: #4f46e5; animation: demo-pulse 1.4s ease-in-out infinite; }
@keyframes demo-pulse { 50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, .35); } }

/* 讲到的区域：描边 + 光晕，不改变布局 */
.demo-focus {
  outline: 2px solid var(--primary); outline-offset: 3px;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 16%, transparent);
  transition: outline-color .3s, box-shadow .3s;
}

@media (max-width: 720px) {
  body.demo-on { padding-bottom: 190px; }
  .demo-bar { bottom: 8px; width: calc(100vw - 16px); padding: 8px 10px 10px; }
  .demo-main { flex-wrap: wrap; gap: 8px; }
  .demo-eq { display: none; }
  .demo-body { flex-basis: 100%; }
  .demo-text { font-size: 14px; }
  .demo-ctrl { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-bar, .demo-eq i, .demo-btn.attn { animation: none; }
}

/* 顶栏入口与登录页的一键体验 */
@media (max-width: 600px) { .demo-trigger .label { display: none; } }
.demo-cta { display: grid; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-text); }
.demo-cta small { color: var(--text-2); }
