html.wv-lock,
html.wv-lock body {
  overflow: hidden;
}

.wv[hidden] {
  display: none !important;
}

.wv {
  position: fixed;
  inset: 0;
  z-index: 6000;
  color: #fff;
  font-family: var(--font-nav);
  background: rgba(5, 7, 10, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: wv-in 0.18s ease-out;
  user-select: none;
  -webkit-user-select: none;
}

@keyframes wv-in {
  from { opacity: 0; }
}

.wv-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.wv-pic { cursor: zoom-in; }
.wv.is-zoomed .wv-pic { cursor: zoom-out; }
.wv.is-dragging .wv-stage,
.wv.is-dragging .wv-pic { cursor: grabbing; }

.wv-pic {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
  image-rendering: auto;
  pointer-events: auto;
}

.wv-pic.is-ready { opacity: 1; transition: opacity 0.2s ease; }
.wv-pic.wv-anim { transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease; }

.wv-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent, #22d3ee);
  animation: wv-spin 0.8s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.wv.is-loading .wv-spinner { opacity: 1; }

@keyframes wv-spin {
  to { transform: rotate(360deg); }
}

.wv-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
}

.wv-top > * { pointer-events: auto; }

.wv-cap {
  min-width: 0;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.wv-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.wv-count {
  padding: 0 0.7rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.wv-btn,
.wv-zoomread,
.wv-nav,
.wv-thumb {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wv-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.wv-btn:hover,
.wv-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--accent, #22d3ee);
}

.wv-close { margin-left: 0.15rem; }
.wv-close:hover { background: rgba(248, 113, 113, 0.25); color: #fca5a5; }

.wv-zoomread {
  min-width: 3.6rem;
  height: 2.4rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.wv-zoomread:hover { background: rgba(255, 255, 255, 0.14); }

.wv-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-top: -1.6rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 22, 28, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.2s ease;
}

.wv-nav--prev { left: 1rem; }
.wv-nav--next { right: 1rem; }

.wv-nav:hover,
.wv-nav:focus-visible {
  background: rgba(34, 211, 238, 0.28);
  transform: scale(1.06);
}

.wv-nav[hidden] { display: none; }

.wv-thumbs {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  max-width: min(92vw, 900px);
  padding: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 14px;
  background: rgba(20, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.wv-thumbs::-webkit-scrollbar { display: none; }
.wv-thumbs[hidden] { display: none; }

.wv-thumb {
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  border: 2px solid transparent;
  background: #0b0d12;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.wv-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wv-thumb:hover { opacity: 1; transform: translateY(-2px); }
.wv-thumb.is-on { opacity: 1; border-color: var(--accent, #22d3ee); }

.wv-hint {
  position: absolute;
  left: 50%;
  bottom: 6.2rem;
  z-index: 3;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.wv.show-hint .wv-hint { opacity: 1; }

@media (max-width: 700px) {
  .wv-count { display: none; }
  .wv-nav { width: 2.6rem; height: 2.6rem; margin-top: -1.3rem; }
  .wv-nav--prev { left: 0.4rem; }
  .wv-nav--next { right: 0.4rem; }
  .wv-hint { white-space: normal; text-align: center; width: max-content; max-width: 86vw; }
  .wv-cap { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wv { animation: none; }
  .wv-pic.wv-anim,
  .wv-pic.is-ready { transition: none; }
  .wv-spinner { animation-duration: 2s; }
}

.wv-cap-link {
  color: var(--accent, #22d3ee);
  text-decoration: none;
  font-weight: 600;
}

.wv-cap-link:hover { text-decoration: underline; }
