/* ============================================================
   autoplay.css —— 电影感自动播放控制条
   ============================================================ */

.film-bar {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 3vh, 30px);
  transform: translateX(-50%);
  z-index: 48;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 9px;
  border: 1px solid rgba(20, 23, 26, .16);
  border-radius: 999px;
  background: rgba(246, 245, 241, .82);
  backdrop-filter: blur(10px) saturate(1.05);
  box-shadow: 0 18px 44px -26px rgba(20, 18, 16, .5);
  transition: opacity .45s ease, transform .45s ease;
}
.film-bar.is-hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); }

.film-bar__play {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(20, 23, 26, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.film-bar__play:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.film-bar__track {
  position: relative;
  width: clamp(120px, 20vw, 240px);
  height: 2px;
  background: rgba(20, 23, 26, .14);
  overflow: hidden;
}
.film-bar__track i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s linear;
}

.film-bar__label {
  flex: none;
  color: rgba(20, 23, 26, .6);
  white-space: nowrap;
}
.film-bar__state {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(20, 23, 26, .42);
  white-space: nowrap;
}
.film-bar__state::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(20, 23, 26, .3);
}
.film-bar.is-playing .film-bar__state::before {
  background: #a07e42;
  animation: filmPulse 1.8s ease-in-out infinite;
}
@keyframes filmPulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

/* 自动播放时隐藏原生滚动提示 */
body.film-playing .hint { opacity: 0; }

@media (max-width: 700px) {
  .film-bar { gap: 8px; padding: 7px 10px 7px 7px; bottom: 12px; }
  .film-bar__play { width: 28px; height: 28px; }
  .film-bar__track { width: 90px; }
  .film-bar__state { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .film-bar, .film-bar__play { transition: none; }
  .film-bar.is-playing .film-bar__state::before { animation: none; }
}
