/* Prism Translate — YouTube bilingual subtitle overlay */

/* Hide YouTube's own caption text; we render original + translation ourselves. */
html.prism-vsub-on .ytp-caption-window-container { opacity: 0 !important; }

#prism-vsub {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  max-width: 86%;
  text-align: center;
  z-index: 60;
  pointer-events: none;
  display: none;
}
#prism-vsub .prism-vsub-orig {
  display: inline-block;
  font: 500 18px/1.4 -apple-system, "PingFang SC", system-ui, sans-serif;
  color: #e8e6f2;
  background: rgba(10, 8, 20, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 3px 11px;
  border-radius: 8px;
  margin-bottom: 5px;
}
#prism-vsub .prism-vsub-trans {
  display: inline-block;
  position: relative;
  font: 700 24px/1.45 -apple-system, "PingFang SC", system-ui, sans-serif;
  color: #fff;
  background: rgba(12, 10, 24, 0.6);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  padding: 4px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 22px rgba(8, 6, 20, 0.5);
  /* Chinese typography */
  word-break: keep-all;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
#prism-vsub .prism-vsub-trans::before { /* gradient accent underline */
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, #818cf8, #f472b6);
  border-radius: 999px; opacity: 0.85;
}

#prism-vsub-toggle {
  position: absolute;
  top: 12px;
  right: 64px;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1 -apple-system, "PingFang SC", system-ui, sans-serif;
  color: #fff;
  background: rgba(20, 18, 36, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  opacity: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(8, 6, 20, 0.4);
  transition: opacity 0.2s, background 0.15s, transform 0.14s;
}
#prism-vsub-toggle:active { transform: scale(0.96); }
.html5-video-player:hover #prism-vsub-toggle,
#movie_player:hover #prism-vsub-toggle { opacity: 1; }
#prism-vsub-toggle:hover { background: rgba(40, 36, 64, 0.85); }
#prism-vsub-toggle .prism-vsub-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b6788;
}
#prism-vsub-toggle.on .prism-vsub-dot {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 0 6px rgba(236, 72, 153, 0.7);
}
