:root {
  --pcb-green: #39ff14;
  --pcb-green-rgb: 0 255 136;
  --pcb-green-soft: rgba(57, 255, 20, 0.22);
}
body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.font-heading {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.pcb-bg {
  background-color: #121212;
  background-image: linear-gradient(
    180deg,
    #050505 0%,
    #121212 40%,
    #0d0d0d 100%
  );
}
.circuit-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: screen;
}
.trace-grid {
  background-image:
    linear-gradient(90deg, rgba(57, 255, 20, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(57, 255, 20, 0.06) 1px, transparent 1px);
  background-size:
    48px 48px,
    border-box;
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 30%,
    black 10%,
    transparent 75%
  );
}
.glow-border {
  box-shadow:
    0 0 0 1px rgba(57, 255, 20, 0.45),
    0 0 20px rgba(57, 255, 20, 0.25),
    inset 0 0 24px rgba(57, 255, 20, 0.04);
}
.glow-border-strong:hover {
  box-shadow:
    0 0 0 1px rgba(57, 255, 20, 0.75),
    0 0 32px rgba(57, 255, 20, 0.35),
    inset 0 0 28px rgba(57, 255, 20, 0.08);
}
.icon-green {
  color: var(--pcb-green);
  filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.55));
}
.pad-ring {
  box-shadow:
    0 0 0 2px rgba(57, 255, 20, 0.25),
    0 0 12px rgba(57, 255, 20, 0.15);
}
input[type="range"].slider-green::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  background: #39ff14;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.8);
  cursor: pointer;
}
input[type="range"].slider-green::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  background: #39ff14;
  border: none;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.8);
  cursor: pointer;
}
details summary::-webkit-details-marker {
  display: none;
}

/* PCB Grid Background */
.bg-grid {
  background-image:
    linear-gradient(var(--trace) 1px, transparent 1px),
    linear-gradient(90px, var(--trace) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ANIMATIONS */
@keyframes rain {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(60px);
    opacity: 0;
  }
}

@keyframes split-thumb {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(120px, -50px) scale(0.5);
    opacity: 0;
  }
}

@keyframes archive-sink {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(120px);
    opacity: 0;
  }
}

@keyframes pulse-shield {
  0%,
  100% {
    box-shadow: 0 0 5px var(--neon);
    border-color: var(--neon);
  }
  50% {
    box-shadow: 0 0 20px var(--neon);
    border-color: #fff;
  }
}

.animate-rain {
  animation: rain 3s infinite linear;
}
.animate-thumb {
  animation: split-thumb 2s infinite ease-out;
}
.animate-sink {
  animation: archive-sink 4s infinite cubic-bezier(0.4, 0, 1, 1);
}
.shield-active {
  animation: pulse-shield 2s infinite;
}

/* Custom Scrollbar for the text side */
.custom-scroll::-webkit-scrollbar {
  width: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--trace);
  border-radius: 10px;
}

/* base.css або твій блок стилів */

/* Темна тема (Default) */
.dark-pcb {
  --pcb-bg: #020617;
  --pcb-text: #f8fafc;
  --pcb-border: rgba(0, 255, 136, 0.2);
  --pcb-card: rgba(15, 23, 42, 0.8);
}

/* Світла тема */
.white-pcb {
  --pcb-bg: #f1f5f9;
  --pcb-text: #0f172a;
  --pcb-border: rgba(15, 23, 42, 0.1);
  --pcb-card: rgba(255, 255, 255, 0.9);
}

body {
  background-color: var(--pcb-bg);
  color: var(--pcb-text);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Використовуй класи Tailwind з префіксами тем */
.white-pcb .glass-card {
  background: var(--pcb-card);
  border-color: var(--pcb-border);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-bounce-slow {
  animation: bounce 3s infinite;
}
.shadow-glow-sm {
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}
