/* ═══════════════════════════════════════════════════════════
   DURDENBTC — Shared Visual Effects CSS
   Loaded on every page alongside styles.css
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --hot-pink: #ff2d78;
  --hot-pink-dim: rgba(255, 45, 120, 0.10);
  --hot-pink-glow: rgba(255, 45, 120, 0.30);
  --font-display: 'Space Grotesk', 'JetBrains Mono', sans-serif;
}

/* ── Matrix Rain Canvas ── */
#matrixCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
}

/* ── Paper Street Background (scrolls with page, not fixed) ── */
.paper-street-bg {
  position: absolute;
  top: 56px; left: 0; right: 0;
  height: 55vh;
  z-index: 0;
  pointer-events: none;
  background: url('/images/paper-street.jpg') center top / cover no-repeat;
  mask-image: linear-gradient(to bottom,
    rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.40) 30%,
    rgba(0,0,0,0.15) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.40) 30%,
    rgba(0,0,0,0.15) 60%, transparent 100%);
  filter: grayscale(0.4) brightness(0.55);
}
.paper-street-gradient {
  position: absolute;
  top: calc(56px + 35vh); left: 0; right: 0;
  height: 10vh; z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(6,9,14,0.4) 40%, rgba(6,9,14,0.9) 100%);
}

/* ── Nav: portrait with RGB glitch ── */
.nav { position: relative; overflow: visible; }

.nav-brand {
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7);
}

.nav-portrait-wrap {
  position: absolute;
  left: 8px; top: 0;
  height: 56px; width: 56px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.nav-portrait-wrap img {
  display: block;
  height: 100%; width: auto;
  opacity: 0.30;
  filter: grayscale(1) brightness(1.2) contrast(1.3);
}
.nav-portrait-wrap::before,
.nav-portrait-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: url('/images/durden.png') left top / auto 100% no-repeat;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.2s;
}
.nav:hover .nav-portrait-wrap::before {
  opacity: 0.5;
  filter: grayscale(1) contrast(1.4) brightness(1.1);
  animation: rgbShiftR 0.15s steps(2) infinite;
}
.nav:hover .nav-portrait-wrap::after {
  opacity: 0.5;
  filter: grayscale(1) contrast(1.4) brightness(1.1);
  animation: rgbShiftB 0.15s steps(2) infinite;
}

@keyframes rgbShiftR {
  0%   { transform: translate(3px, 0); filter: hue-rotate(-60deg) saturate(5) brightness(1.5); }
  50%  { transform: translate(-2px, 1px); filter: hue-rotate(-60deg) saturate(5) brightness(1.3); }
  100% { transform: translate(1px, -1px); filter: hue-rotate(-60deg) saturate(5) brightness(1.5); }
}
@keyframes rgbShiftB {
  0%   { transform: translate(-3px, 0); filter: hue-rotate(180deg) saturate(5) brightness(1.5); }
  50%  { transform: translate(2px, -1px); filter: hue-rotate(180deg) saturate(5) brightness(1.3); }
  100% { transform: translate(-1px, 1px); filter: hue-rotate(180deg) saturate(5) brightness(1.5); }
}

/* ── Nav Whisper Quote ── */
.nav-whisper {
  position: absolute;
  left: 120px; right: 380px;
  top: 50%;
  margin-top: -6px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--txt4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  pointer-events: none;
  animation: whisperPulse 12s ease-in-out infinite;
  z-index: 1;
}
@keyframes whisperPulse {
  0%   { opacity: 0; }
  8%   { opacity: 0.45; color: var(--hot-pink); }
  42%  { opacity: 0.45; color: var(--hot-pink); }
  55%  { opacity: 0.35; color: var(--txt3); }
  65%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (max-width: 900px) {
  .nav-whisper { display: none; }
}

/* ── Glitch Title Effect ── */
.glitch-title {
  position: relative;
  display: inline-block;
}
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  font-style: normal;
}
.glitch-title::before {
  color: var(--hot-pink);
  animation: glitchA 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  opacity: 0.7;
}
.glitch-title::after {
  color: var(--cyan);
  animation: glitchB 4s infinite;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  opacity: 0.7;
}
@keyframes glitchA {
  0%, 90%, 100% { transform: translate(0); }
  91% { transform: translate(-3px, -1px); }
  93% { transform: translate(3px, 1px); }
  95% { transform: translate(-2px, 0); }
  97% { transform: translate(1px, -1px); }
}
@keyframes glitchB {
  0%, 88%, 100% { transform: translate(0); }
  89% { transform: translate(3px, 1px); }
  91% { transform: translate(-4px, -1px); }
  94% { transform: translate(2px, 0); }
  96% { transform: translate(-1px, 1px); }
}

/* ── Subliminal Flash ── */
.subliminal-flash {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.95);
  pointer-events: none; opacity: 0;
}
.subliminal-flash.active { animation: subliminalPulse 0.35s ease-out forwards; }
@keyframes subliminalPulse {
  0% { opacity: 1; } 15% { opacity: 1; } 20% { opacity: 0; }
  25% { opacity: 0.9; } 35% { opacity: 0; } 100% { opacity: 0; }
}
.subliminal-flash .quote {
  font-family: 'Courier New', monospace;
  font-size: clamp(18px, 4vw, 42px);
  font-weight: 700; color: var(--hot-pink);
  text-align: center; max-width: 80vw;
  text-shadow: 0 0 40px var(--hot-pink-glow);
  letter-spacing: 2px; white-space: pre-line;
}
.glitch-lines { position: fixed; inset: 0; z-index: 99998; pointer-events: none; opacity: 0; }
.glitch-lines.active { animation: glitchFlash 0.3s steps(2) forwards; }
@keyframes glitchFlash {
  0% { opacity: 0.6; } 10% { opacity: 0; } 15% { opacity: 0.4; }
  25% { opacity: 0; } 30% { opacity: 0.7; } 50% { opacity: 0; } 100% { opacity: 0; }
}
.glitch-lines canvas { width: 100%; height: 100%; }

/* ── Soap Cursor (idle) ── */
.soap-cursor {
  position: fixed; font-size: 28px; pointer-events: none; z-index: 99990;
  opacity: 0; transition: opacity 0.4s ease; transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(255,45,120,0.3));
}
.soap-cursor.visible { opacity: 1; animation: soapFloat 2s ease-in-out infinite; }
@keyframes soapFloat {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -52%) rotate(3deg); }
  75% { transform: translate(-50%, -48%) rotate(-3deg); }
}

/* ── Drifting Soap ── */
.drifting-soap {
  position: fixed; font-size: 22px; opacity: 0.60;
  bottom: 40px;
  animation: soapDrift 30s linear infinite;
  pointer-events: none; z-index: 1;
}
@keyframes soapDrift {
  0% { left: -40px; transform: rotate(0deg); }
  100% { left: calc(100vw + 40px); transform: rotate(360deg); }
}

/* ── VHS Tracking ── */
.vhs-tracking {
  position: fixed; inset: 0; z-index: 99997; pointer-events: none; opacity: 0;
}
.vhs-tracking.active { animation: vhsRoll 0.8s ease-in-out forwards; }
@keyframes vhsRoll {
  0% { opacity: 0; } 5% { opacity: 0.7; } 15% { opacity: 0.5; } 30% { opacity: 0; } 100% { opacity: 0; }
}
.vhs-bar {
  position: absolute; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.08) 20%,
    rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 80%, transparent 100%);
  animation: vhsScan 0.8s linear forwards;
}
@keyframes vhsScan { from { top: -80px; } to { top: calc(100vh + 80px); } }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--hot-pink); border-radius: 3px; box-shadow: 0 0 8px var(--hot-pink-glow); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }

/* ── Boot Sequence (for members dashboard) ── */
.boot-overlay {
  position: fixed; inset: 0; z-index: 100000; background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot-overlay.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-overlay.hidden-boot { display: none; }
.boot-terminal {
  width: min(600px, 90vw);
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--cyan); line-height: 1.8; padding: 20px;
}
.boot-line { opacity: 0; white-space: nowrap; overflow: hidden; }
.boot-line.visible { opacity: 1; animation: bootType 0.3s steps(30) forwards; }
.boot-line .ok { color: var(--green); }
.boot-line .warn { color: var(--amber); }
.boot-line .err { color: var(--hot-pink); }
.boot-line .dim { color: var(--txt3); }
@keyframes bootType { from { max-width: 0; } to { max-width: 100%; } }

/* ── ASCII Art ── */
.ascii-art {
  font-family: 'JetBrains Mono', monospace; font-size: 8px; line-height: 1.1;
  color: var(--hot-pink); opacity: 0.5; white-space: pre; text-align: center;
  user-select: none; letter-spacing: 1px;
}
