/* ============================================================
   PrismaBreak92 – Cyberpunk Prism-Split Widget
   CSS-Namespace: pb92-*
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --pb92-cyan:    #00FFFF;
  --pb92-magenta: #FF00FF;
  --pb92-yellow:  #FFFF00;
  --pb92-dark:    #080810;
  --pb92-border:  1px solid rgba(0,255,255,0.35);
  --pb92-radius:  4px;
  --pb92-font:    'Courier New', Courier, monospace;
  --pb92-z-canvas: 1;
  --pb92-z-ui:     10;
  --pb92-z-light:  100;
}

/* ---------- Container ---------- */
.pb92-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pb92-dark);
  font-family: var(--pb92-font);
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- Wrapper ---------- */
.pb92-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.pb92-wrapper.pb92-has-border {
  border: 2px solid var(--pb92-cyan);
  box-shadow:
    0 0 12px rgba(0,255,255,0.4),
    0 0 40px rgba(255,0,255,0.15),
    inset 0 0 20px rgba(0,0,0,0.6);
}

/* ---------- Glass Background ---------- */
.pb92-wrapper.pb92-glass-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      rgba(0,255,255,0.03) 8px,
      rgba(0,255,255,0.03) 9px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(255,0,255,0.03) 8px,
      rgba(255,0,255,0.03) 9px
    );
  pointer-events: none;
}

/* ---------- Canvas ---------- */
.pb92-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: var(--pb92-z-canvas);
  display: block;
  cursor: crosshair;
}

/* ---------- HUD Overlay ---------- */
.pb92-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: var(--pb92-z-ui);
  pointer-events: none;
  opacity: 0.6;
}

.pb92-hud__label {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--pb92-cyan);
  text-transform: uppercase;
  line-height: 1;
}

.pb92-hud__label span {
  color: var(--pb92-magenta);
}

.pb92-hud__lines {
  display: flex;
  gap: 3px;
  margin-top: 5px;
}

.pb92-hud__lines span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--pb92-cyan);
  animation: pb92-hud-blink 2.4s infinite;
}

.pb92-hud__lines span:nth-child(2) {
  width: 10px;
  animation-delay: 0.4s;
  background: var(--pb92-magenta);
}

.pb92-hud__lines span:nth-child(3) {
  width: 6px;
  animation-delay: 0.8s;
  background: var(--pb92-yellow);
}

@keyframes pb92-hud-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ---------- Navigation Dots ---------- */
.pb92-nav-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: var(--pb92-z-ui);
}

.pb92-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--pb92-cyan);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}

.pb92-dot:hover,
.pb92-dot--active {
  background: var(--pb92-cyan);
  box-shadow: 0 0 8px var(--pb92-cyan);
}

/* ---------- Caption ---------- */
.pb92-caption {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  z-index: var(--pb92-z-ui);
  pointer-events: none;
  padding: 0 20px;
  text-shadow: 0 0 8px var(--pb92-cyan);
  transition: opacity 0.3s;
}

/* ---------- Scroll Hint ---------- */
.pb92-scroll-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: var(--pb92-z-ui);
  pointer-events: none;
  opacity: 0.5;
}

.pb92-scroll-hint span {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--pb92-magenta);
}

.pb92-scroll-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--pb92-magenta);
  border-bottom: 2px solid var(--pb92-magenta);
  transform: rotate(45deg);
  animation: pb92-arrow-bounce 1.4s infinite;
}

@keyframes pb92-arrow-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(4px); }
}

/* ---------- Glitch Flash (JS-triggered) ---------- */
.pb92-wrapper.pb92-glitch::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--pb92-z-ui);
  background: linear-gradient(
    90deg,
    rgba(255,0,255,0.07) 0%,
    rgba(0,255,255,0.07) 50%,
    rgba(255,255,0,0.04) 100%
  );
  pointer-events: none;
  animation: pb92-glitch-flash 0.12s ease-out forwards;
}

@keyframes pb92-glitch-flash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- Scan Lines ---------- */
.pb92-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: calc(var(--pb92-z-ui) - 1);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
}

/* ---------- Lightbox ---------- */
.pb92-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--pb92-z-light);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pb92-lb-in 0.3s ease;
}

.pb92-lightbox[hidden] {
  display: none;
}

@keyframes pb92-lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pb92-lightbox__inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pb92-lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(0,255,255,0.3);
  box-shadow:
    0 0 30px rgba(0,255,255,0.3),
    0 0 80px rgba(255,0,255,0.15);
  animation: pb92-lb-img-in 0.4s ease;
}

@keyframes pb92-lb-img-in {
  from { opacity: 0; filter: blur(12px) saturate(3); transform: scale(0.95); }
  to   { opacity: 1; filter: blur(0)   saturate(1); transform: scale(1); }
}

.pb92-lightbox__caption {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  text-align: center;
}

.pb92-lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  z-index: calc(var(--pb92-z-light) + 1);
}

.pb92-lightbox__close:hover {
  border-color: var(--pb92-cyan);
  color: var(--pb92-cyan);
  box-shadow: 0 0 10px var(--pb92-cyan);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .pb92-hud { display: none; }
  .pb92-scroll-hint { display: none; }
  .pb92-caption { font-size: 10px; bottom: 32px; }
}
