/* =========================
   MATRIX GLOBAL STYLE
========================= */

:root {
  --bg: #000000;
  --green-main: #00ff41;
  --green-dim: #008f11;
  --green-glow: #00ff41;
}

/* Reset + base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--green-main);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  overflow-x: hidden;
}

/* =========================
   TEXT GLOW
========================= */

.matrix-text {
  color: var(--green-main);
  text-shadow:
    0 0 5px var(--green-glow),
    0 0 10px var(--green-glow),
    0 0 20px var(--green-glow);
}

/* Mocniejszy glow */
.matrix-text-strong {
  color: var(--green-main);
  text-shadow:
    0 0 5px var(--green-glow),
    0 0 10px var(--green-glow),
    0 0 20px var(--green-glow),
    0 0 40px var(--green-glow);
}

/* =========================
   TERMINAL BOX
========================= */

.terminal {
  background: #000;
  border: 1px solid var(--green-main);
  padding: 20px;
  margin: 20px;
  box-shadow: 0 0 10px var(--green-dim);
}

.terminal p::before {
  content: "> ";
  color: var(--green-main);
}

/* =========================
   TYPING EFFECT
========================= */

.typing {
  overflow: hidden;
  border-right: 2px solid var(--green-main);
  white-space: nowrap;
  width: 0;
  animation: typing 3s steps(30, end) forwards, blink 0.8s infinite;
}

@keyframes typing {
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* =========================
   FLICKER EFFECT (old monitor)
========================= */

.flicker {
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.9; }
  50% { opacity: 1; }
  100% { opacity: 0.95; }
}

/* =========================
   CRT SCANLINES
========================= */

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,65,0.05),
    rgba(0,255,65,0.05) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

/* =========================
   LINKS
========================= */

a {
  color: var(--green-main);
  text-decoration: none;
}

a:hover {
  text-shadow: 0 0 10px var(--green-glow);
}

/* =========================
   BUTTON (terminal style)
========================= */

.matrix-btn {
  background: transparent;
  border: 1px solid var(--green-main);
  color: var(--green-main);
  padding: 10px 20px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}

.matrix-btn:hover {
  background: var(--green-main);
  color: black;
  box-shadow: 0 0 10px var(--green-glow);
}

/* =========================
   INPUTS
========================= */

input, textarea {
  background: black;
  border: 1px solid var(--green-main);
  color: var(--green-main);
  padding: 10px;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 10px var(--green-glow);
}

/* =========================
   SCROLLBAR (optional)
========================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--green-dim);
}

::-webkit-scrollbar-track {
  background: black;
}

/* =========================
   MATRIX BACKGROUND CANVAS
========================= */

#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: black;
}

/* lekkie globalne migotanie całej strony */
body {
  animation: screenFlicker 0.2s infinite;
}

@keyframes screenFlicker {
  0% { opacity: 0.98; }
  50% { opacity: 1; }
  100% { opacity: 0.99; }
}

.center-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}