/* Dwinity Drop — futuristic FX layer.
   Everything is pure CSS (no deps). Import after Tailwind CDN. */

/* ---------- starfield / particles background ---------- */
.fx-stars {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.fx-stars::before, .fx-stars::after {
  content: ""; position: absolute; inset: -50%;
  background-image:
    radial-gradient(1px 1px at 10% 20%,  rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(1px 1px at 40% 60%,  rgba(0,255,157,0.55),   transparent 50%),
    radial-gradient(1px 1px at 70% 30%,  rgba(255,255,255,0.40), transparent 50%),
    radial-gradient(1px 1px at 85% 80%,  rgba(77,255,184,0.55),  transparent 50%),
    radial-gradient(1px 1px at 25% 85%,  rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(1px 1px at 55% 15%,  rgba(0,255,157,0.4),    transparent 50%),
    radial-gradient(1px 1px at 90% 50%,  rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(1.5px 1.5px at 15% 55%, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 65% 90%,  rgba(77,255,184,0.35),  transparent 50%);
  background-size: 900px 700px;
  animation: fx-stars-drift 120s linear infinite;
  opacity: 0.55;
}
.fx-stars::after {
  animation-duration: 180s;
  animation-direction: reverse;
  opacity: 0.35;
  filter: blur(0.5px);
}
@keyframes fx-stars-drift {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-900px, -700px, 0); }
}

/* ---------- aurora / holographic border ---------- */
.fx-aurora {
  position: relative;
  isolation: isolate;
}
.fx-aurora::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    125deg,
    rgba(0,255,157,0.55) 0%,
    rgba(77,255,184,0.20) 25%,
    rgba(142,45,226,0.35) 50%,
    rgba(0,229,255,0.30) 75%,
    rgba(0,255,157,0.55) 100%
  );
  background-size: 300% 300%;
  animation: fx-aurora-shift 8s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
@keyframes fx-aurora-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- gradient shimmer text ---------- */
.fx-glow-text {
  background: linear-gradient(
    90deg,
    #00FF9D 0%,
    #4DFFB8 25%,
    #00E5FF 50%,
    #4DFFB8 75%,
    #00FF9D 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: fx-glow-shift 6s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(0,255,157,0.35));
}
@keyframes fx-glow-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- hover halo (for CTAs and cards) ---------- */
.fx-halo {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.fx-halo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(0,255,157,0.35),
    0 10px 40px -10px rgba(0,255,157,0.45),
    0 4px 12px -2px rgba(0,0,0,0.6);
}

/* ---------- scan line (on uploading or loading) ---------- */
.fx-scan {
  position: relative; overflow: hidden;
}
.fx-scan::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,255,157,0.00) 40%,
    rgba(0,255,157,0.35) 50%,
    rgba(0,255,157,0.00) 60%,
    transparent 100%
  );
  animation: fx-scan-move 2.2s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes fx-scan-move {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ---------- terminal bracket accent ---------- */
.fx-brackets {
  position: relative;
}
.fx-brackets::before,
.fx-brackets::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid rgba(0,255,157,0.7);
}
.fx-brackets::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.fx-brackets::after  { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }

/* ---------- animated grid overlay ---------- */
.fx-gridlines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(rgba(0,255,157,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,157,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 80%);
}

/* ---------- custom scrollbar (for webkit) ---------- */
.fx-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.fx-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.fx-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0,255,157,0.35), rgba(0,229,255,0.25));
  border-radius: 8px;
}
.fx-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0,255,157,0.6), rgba(0,229,255,0.5));
}

/* ---------- holographic chip (pulses subtly) ---------- */
.fx-chip-holo {
  background: linear-gradient(
    100deg,
    rgba(0,255,157,0.10),
    rgba(0,229,255,0.08),
    rgba(0,255,157,0.10)
  );
  background-size: 200% 100%;
  animation: fx-glow-shift 5s ease-in-out infinite;
  border: 1px solid rgba(0,255,157,0.35);
}

/* ---------- "data transmit" animated dotted line beneath cards ---------- */
.fx-transmit {
  position: relative;
}
.fx-transmit::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: -1px; height: 1px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 8px,
    rgba(0,255,157,0.7) 8px 14px
  );
  animation: fx-transmit-flow 1.6s linear infinite;
  opacity: 0.5;
}
@keyframes fx-transmit-flow {
  0%   { background-position: 0px 0; }
  100% { background-position: 22px 0; }
}

/* ---------- focus state for inputs ---------- */
.fx-input:focus {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(0,255,157,0.55),
    0 0 24px -4px rgba(0,255,157,0.55);
  border-color: rgba(0,255,157,0.6);
}

/* ---------- subtle noise / grain (high-end web3 vibe) ---------- */
.fx-noise::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 1  0 0 0 0 0.6  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.06;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---------- bubble-browser starfield background ---------- */
.fx-bubble-bg {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(0,255,157,0.08), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(0,229,255,0.06), transparent 60%),
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 35% 75%, rgba(0,255,157,0.4), transparent),
    radial-gradient(1px 1px at 65% 20%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(77,255,184,0.5), transparent),
    radial-gradient(1px 1px at 50% 90%, rgba(255,255,255,0.25), transparent),
    #0A0B10;
}

/* ---------- netstream canvas background ---------- */
#netstream-bg {
  position: fixed; inset: 0; z-index: -3;
  pointer-events: none;
}

/* ---------- readability: subtle dim behind headings + cards ----------
   Applied to text-heavy blocks so the animated BG never fights the copy. */
.fx-textshade {
  position: relative;
  isolation: isolate;
}
.fx-textshade > * { position: relative; z-index: 1; }
.fx-textshade::before {
  content: "";
  position: absolute; inset: -10px -20px;
  background: radial-gradient(ellipse at center, rgba(5,6,10,0.75) 40%, rgba(5,6,10,0) 85%);
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}

/* ---------- CRT scanlines over the whole viewport ---------- */
.fx-crt {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0) 0px,
      rgba(0,0,0,0.15) 2px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 4px
    ),
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.fx-crt::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,255,157,0.025) 50%,
    transparent 100%
  );
  animation: fx-crt-sweep 8s linear infinite;
}
@keyframes fx-crt-sweep {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ---------- HUD corner brackets (fixed viewport overlay) ---------- */
.fx-hud {
  position: fixed; inset: 0; z-index: 30;
  pointer-events: none;
}
.fx-hud::before, .fx-hud::after,
.fx-hud > .fx-hud-bl, .fx-hud > .fx-hud-br {
  content: ""; position: absolute;
  width: 28px; height: 28px;
  border: 2px solid rgba(0,255,157,0.65);
  box-shadow: 0 0 12px rgba(0,255,157,0.4);
}
.fx-hud::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.fx-hud::after  { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.fx-hud .fx-hud-bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.fx-hud .fx-hud-br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

/* HUD status readouts (optional content) */
.fx-hud-label {
  position: fixed; z-index: 30; pointer-events: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(0,255,157,0.75);
  text-shadow: 0 0 8px rgba(0,255,157,0.5);
}
.fx-hud-label.tl { top: 18px; left: 52px; }
.fx-hud-label.tr { top: 18px; right: 52px; }
.fx-hud-label.bl { bottom: 18px; left: 52px; }
.fx-hud-label.br { bottom: 18px; right: 52px; }
.fx-hud-label .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #00FF9D; box-shadow: 0 0 8px rgba(0,255,157,0.9);
  margin-right: 6px; vertical-align: middle;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

/* ---------- chromatic aberration on big headlines ---------- */
.fx-chroma {
  position: relative; display: inline-block;
}
.fx-chroma::before, .fx-chroma::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  pointer-events: none; opacity: 0.75;
}
.fx-chroma::before {
  color: #00E5FF;
  transform: translate(-2px, 0);
  mix-blend-mode: screen;
  animation: fx-chroma-jitter-a 4s infinite steps(60);
}
.fx-chroma::after {
  color: #FF2EC4;
  transform: translate(2px, 0);
  mix-blend-mode: screen;
  animation: fx-chroma-jitter-b 4s infinite steps(60);
}
@keyframes fx-chroma-jitter-a {
  0%, 92%, 100% { transform: translate(-2px, 0); }
  93%           { transform: translate(-4px, 1px); }
  95%           { transform: translate(-1px, -1px); }
  97%           { transform: translate(-3px, 0); }
}
@keyframes fx-chroma-jitter-b {
  0%, 92%, 100% { transform: translate(2px, 0); }
  93%           { transform: translate(4px, -1px); }
  95%           { transform: translate(1px, 1px); }
  97%           { transform: translate(3px, 0); }
}

/* ---------- legacy cosmos classes become no-ops (we use canvas now) ---------- */
.fx-cosmos, .fx-cosmos-blobs, .fx-cosmos-stars { display: none; }
.fx-cosmos-blobs {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; overflow: hidden;
}
.fx-cosmos-blobs::before,
.fx-cosmos-blobs::after {
  content: ""; position: absolute;
  width: 720px; height: 720px; border-radius: 50%;
  filter: blur(100px);
}
.fx-cosmos-blobs::before {
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(0,255,157,0.22), transparent 60%);
  animation: fx-cosmos-drift-a 38s ease-in-out infinite;
}
.fx-cosmos-blobs::after {
  bottom: -250px; right: -200px;
  background: radial-gradient(circle, rgba(142,45,226,0.22), transparent 60%);
  animation: fx-cosmos-drift-b 46s ease-in-out infinite;
}
@keyframes fx-cosmos-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(80px, 120px) scale(1.15); }
  66%      { transform: translate(-60px, 60px) scale(0.9); }
}
@keyframes fx-cosmos-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-90px, -60px) scale(1.12); }
  66%      { transform: translate(50px, -120px) scale(0.95); }
}
.fx-cosmos-stars {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; overflow: hidden;
}
.fx-cosmos-stars::before, .fx-cosmos-stars::after {
  content: ""; position: absolute; inset: -50%;
  background-image:
    radial-gradient(1px 1px at 10% 20%,  rgba(255,255,255,0.45), transparent 50%),
    radial-gradient(1px 1px at 35% 40%,  rgba(0,255,157,0.45), transparent 50%),
    radial-gradient(1px 1px at 60% 80%,  rgba(255,255,255,0.5),  transparent 50%),
    radial-gradient(1px 1px at 80% 15%,  rgba(77,255,184,0.45),  transparent 50%),
    radial-gradient(1.5px 1.5px at 25% 75%, rgba(255,255,255,0.6),transparent 50%),
    radial-gradient(1px 1px at 75% 55%,  rgba(0,229,255,0.45),   transparent 50%),
    radial-gradient(1px 1px at 50% 10%,  rgba(255,255,255,0.45), transparent 50%),
    radial-gradient(1px 1px at 90% 90%,  rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(1px 1px at 5%  65%,  rgba(0,255,157,0.4),    transparent 50%),
    radial-gradient(1.5px 1.5px at 45% 55%, rgba(255,255,255,0.45),transparent 50%);
  background-size: 900px 900px;
  animation: fx-stars-drift 140s linear infinite;
  opacity: 0.7;
}
.fx-cosmos-stars::after {
  animation-duration: 220s;
  animation-direction: reverse;
  background-size: 1300px 1300px;
  opacity: 0.4;
  filter: blur(0.4px);
}

/* ---------- decorative horizontal "data line" dividers between sections ---------- */
.fx-divider {
  position: relative; height: 1px; width: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,255,157,0.4) 20%,
    rgba(0,229,255,0.4) 50%,
    rgba(0,255,157,0.4) 80%,
    transparent 100%);
  overflow: visible;
}
.fx-divider::before {
  content: ""; position: absolute; top: -2px; left: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: #00FF9D;
  box-shadow: 0 0 12px rgba(0,255,157,0.8);
  transform: translateX(-50%);
  animation: fx-divider-slide 8s linear infinite;
}
@keyframes fx-divider-slide {
  0%   { left: 10%; }
  50%  { left: 90%; }
  100% { left: 10%; }
}

/* ---------- logo glow pulse ---------- */
.fx-logo-glow {
  filter: drop-shadow(0 0 8px rgba(0,255,157,0.55));
  animation: fx-logo-pulse 3.5s ease-in-out infinite;
}
@keyframes fx-logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0,255,157,0.45)); }
  50%      { filter: drop-shadow(0 0 14px rgba(0,255,157,0.8)); }
}
