.kp-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 12;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.kp-nav-item { color: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; opacity: 0.9; }
.kp-nav-item.is-active { opacity: 1; }
.kp-nav-icon { font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.kp-nav-icon svg { width: 22px; height: 22px; fill: #fff; }
.kp-nav-label { font-size: 11px; }

/* Vertical kuaipai layout */
.kuaipai-body { background: #000; color: #fff; --kp-nav-h: calc(58px + env(safe-area-inset-bottom)); }
.kuaipai-container {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.kuaipai-reel {
  position: relative;
  height: calc(100vh - var(--kp-nav-h));
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.kuaipai-video {
  width: 99%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.kuaipai-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  pointer-events: none; /* don’t block video taps */
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  z-index: 2;
}
.kuaipai-controls {
  position: absolute;
  right: 16px;
  top: 80%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(128,128,128,0.35);
  backdrop-filter: blur(4px);
  padding: 8px 10px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 3;
}
.kuaipai-btn { background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 20px; padding: 8px 12px; }
.kuaipai-btn:active { transform: scale(0.98); }
.like-toggle.liked { background: rgba(255,0,80,0.5); }

.reel-empty { opacity: 0.8; font-size: 18px; }

/* Hide native controls to enforce kuaipai-style */
.kuaipai-video::-webkit-media-controls { display: none !important; }

.kp-indicator {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 64px;
  line-height: 1;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 4px 20px rgba(0,0,0,0.55);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  z-index: 4;
  transition: opacity 180ms ease, transform 180ms ease;
}
.kp-indicator.show { opacity: 1; transform: scale(1); }

.kp-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 5;
  padding: 6px 0; /* thumb overflow space */
}
.kp-progress__track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  overflow: hidden;
}
.kp-progress__fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
}
.kp-progress__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.kp-progress, .kp-progress * { cursor: pointer; }

.kp-sound-hint {
  position: absolute;
  left: 50%;
  bottom: 56px; /* sit above progress bar */
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.2;
  z-index: 6;
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  animation: kp-pulse 1.8s ease-in-out infinite;
}
@keyframes kp-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.kuaipai-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  pointer-events: none;
  opacity: 0.9;
  animation: kp-bounce 1.6s ease-in-out infinite;
}
.kuaipai-hint::before {
  content: "⌄";
  display: block;
  font-size: 36px;
  line-height: 36px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
@keyframes kp-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.8; }
  50% { transform: translate(-50%, 10px); opacity: 1; }
}

/* Hide hint after first interaction */
.hint-hidden .kuaipai-hint { display: none; }
.hint-hidden .kp-sound-hint { display: none; }
