/* Killer Frost screenshots: neon ice. Frost Glass cyan with a magenta edge. */
:root { --neon: #38e8ff; --hot: #ff2bd6; }

main.glass.wide { max-width: 1400px; }

.cyber-title {
  position: relative;
  font-family: Consolas, "Cascadia Code", monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow: 0 0 8px var(--neon), 0 0 22px rgba(56, 232, 255, 0.5);
}
.cyber-title::before, .cyber-title::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  opacity: 0.7; pointer-events: none;
}
.cyber-title::before { color: var(--hot); clip-path: inset(0 0 55% 0); animation: tjit 3.2s infinite steps(1); }
.cyber-title::after  { color: var(--neon); clip-path: inset(55% 0 0 0); animation: tjit 2.7s infinite reverse steps(1); }
@keyframes tjit {
  0%, 88%, 100% { transform: none; }
  90% { transform: translate(-3px, 1px); }
  93% { transform: translate(3px, -1px); }
  96% { transform: translate(-1px, 0); }
}

.cv { display: flex; flex-direction: column; gap: 14px; }

.cv-stage {
  position: relative;
  height: min(72vh, 820px);
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(rgba(56, 232, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(56, 232, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    #02060f;
  border: 1px solid rgba(56, 232, 255, 0.35);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  box-shadow: inset 0 0 40px rgba(56, 232, 255, 0.12);
  overflow: hidden;
}
.cv-stage:fullscreen { height: 100vh; clip-path: none; border: 0; }
.cv-stage:fullscreen .cv-scan { display: none; }

.cv-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
  cursor: zoom-in;
}

/* HUD corner brackets */
.hud { position: absolute; width: 26px; height: 26px; border: 2px solid var(--neon); z-index: 3; pointer-events: none;
  filter: drop-shadow(0 0 4px var(--neon)); }
.hud.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.hud.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-color: var(--hot); filter: drop-shadow(0 0 4px var(--hot)); }
.hud.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-color: var(--hot); filter: drop-shadow(0 0 4px var(--hot)); }
.hud.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* scanlines + slow sweep */
.cv-scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
}
.cv-scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(transparent, rgba(56, 232, 255, 0.07), transparent);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { from { top: -120px; } to { top: 100%; } }

/* glitch on image change: RGB-split slices of the new image */
.cv-glitch {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: center / contain no-repeat;
  mix-blend-mode: screen;
}
.cv-stage.switch img { animation: shotin 0.45s ease-out; }
.cv-stage.switch .cv-glitch { animation: glitch 0.4s steps(1); }
@keyframes shotin {
  0% { opacity: 0; filter: brightness(2) saturate(0); }
  40% { opacity: 1; }
  100% { filter: none; }
}
@keyframes glitch {
  0%   { opacity: 0.8; transform: translateX(-12px); clip-path: inset(10% 0 70% 0); filter: hue-rotate(250deg); }
  20%  { transform: translateX(10px);  clip-path: inset(55% 0 25% 0); filter: hue-rotate(90deg); }
  40%  { transform: translateX(-6px);  clip-path: inset(30% 0 50% 0); }
  60%  { transform: translateX(8px);   clip-path: inset(75% 0 5% 0); filter: hue-rotate(250deg); }
  80%  { transform: translateX(-3px);  clip-path: inset(0 0 85% 0); }
  100% { opacity: 0; }
}

/* nav buttons */
.cv-nav, .cv-full {
  position: absolute; z-index: 4;
  background: rgba(2, 6, 15, 0.6);
  color: var(--neon);
  border: 1px solid rgba(56, 232, 255, 0.5);
  font-size: 22px; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.cv-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 74px;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.cv-nav.prev { left: 16px; }
.cv-nav.next { right: 16px; }
.cv-full { top: 16px; right: 44px; width: 38px; height: 34px; font-size: 18px; }
.cv-nav:hover, .cv-full:hover { background: rgba(255, 43, 214, 0.22); color: #fff; border-color: var(--hot); box-shadow: 0 0 14px var(--hot); }

.cv-count {
  position: absolute; left: 44px; bottom: 14px; z-index: 4;
  font: 13px Consolas, "Cascadia Code", monospace; letter-spacing: 0.2em;
  color: var(--neon); text-shadow: 0 0 6px var(--neon);
}

/* thumbnail strip */
.cv-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px;
  scrollbar-color: var(--hot) transparent; scrollbar-width: thin;
}
.cv-thumb {
  flex: 0 0 auto; width: 120px; height: 68px; padding: 0;
  background: #02060f; border: 1px solid rgba(56, 232, 255, 0.25); cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  opacity: 0.55; transition: opacity 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.cv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-thumb:hover { opacity: 0.9; border-color: var(--neon); }
.cv-thumb.active { opacity: 1; border: 2px solid var(--hot); box-shadow: 0 0 12px var(--hot); }

.cv.single .cv-nav, .cv.single .cv-strip { display: none; }

@media (max-width: 640px) {
  .cv-stage { height: 52vh; }
  .cv-thumb { width: 84px; height: 48px; }
  .cv-nav { width: 34px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .cyber-title::before, .cyber-title::after, .cv-scan::after,
  .cv-stage.switch img, .cv-stage.switch .cv-glitch { animation: none; }
}
