:root {
  --bg: #000000;
  --neon: #00ff6a;
  --neon-soft: #00cc55;
  --ui: #0a1f0a;
  --text: #caffce;
}
/* Global scrollbar styling to avoid white scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 106, 0.4) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 106, 0.25);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 255, 106, 0.45);
}
*::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  letter-spacing: 0.3px;
  overflow: hidden;
}
#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
      circle at 50% 0%,
      rgba(0, 255, 106, 0.06),
      transparent 60%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 106, 0.07) 0,
      rgba(0, 255, 106, 0.07) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 255, 106, 0.07) 0,
      rgba(0, 255, 106, 0.07) 1px,
      transparent 1px,
      transparent 28px
    );
  mix-blend-mode: screen;
  animation: grid-pan 30s linear infinite;
}
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 106, 0.04) 0,
      rgba(0, 255, 106, 0.04) 1px,
      transparent 2px,
      transparent 4px
    );
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: crt-flicker 6s ease-in-out infinite;
}
@keyframes crt-flicker {
  0%,
  100% {
    opacity: 0.2;
  }
  45% {
    opacity: 0.26;
  }
  55% {
    opacity: 0.18;
  }
  75% {
    opacity: 0.24;
  }
}
@keyframes grid-pan {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 0 240px, 240px 0;
  }
}
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.65);
  border-bottom: 1px solid rgba(0, 255, 106, 0.25);
  box-shadow: 0 0 18px rgba(0, 255, 106, 0.2);
  z-index: 3;
  backdrop-filter: blur(6px);
}
.brand {
  color: var(--neon);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 4px var(--neon), 0 0 14px rgba(0, 255, 106, 0.6),
    0 0 36px rgba(0, 255, 106, 0.4);
}
.brand.glitch {
  animation: brand-glitch 0.7s steps(1, end) 1;
}
@keyframes brand-glitch {
  0% {
    transform: none;
    text-shadow: 0 0 4px var(--neon), 0 0 14px rgba(0, 255, 106, 0.6),
      0 0 36px rgba(0, 255, 106, 0.4);
  }
  20% {
    transform: translate(1px, -1px);
    text-shadow: -2px 0 rgba(0, 255, 106, 0.7), 2px 0 rgba(0, 255, 106, 0.35);
  }
  40% {
    transform: translate(-1px, 0);
    text-shadow: 2px 0 rgba(0, 255, 106, 0.7), -2px 0 rgba(0, 255, 106, 0.35);
  }
  60% {
    transform: translate(0, 1px);
    text-shadow: -3px 0 rgba(0, 255, 106, 0.7), 3px 0 rgba(0, 255, 106, 0.35);
  }
  80% {
    transform: translate(-1px, 1px);
    text-shadow: 3px 0 rgba(0, 255, 106, 0.7), -3px 0 rgba(0, 255, 106, 0.35);
  }
  100% {
    transform: none;
  }
}
.controls {
  display: flex;
  gap: 8px;
}
.btn {
  appearance: none;
  border: 1px solid rgba(0, 255, 106, 0.35);
  background: linear-gradient(180deg, rgba(0, 20, 0, 0.8), rgba(0, 0, 0, 0.8));
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
  color: #d8ffd8;
  text-decoration: none;
}
.btn:hover {
  box-shadow: 0 0 12px rgba(0, 255, 106, 0.35),
    inset 0 0 8px rgba(0, 255, 106, 0.25);
}
.btn:active {
  transform: translateY(1px);
}
.status-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 106, 0.7), 0 0 24px rgba(0, 255, 106, 0.5);
  background: var(--neon);
}
.layout {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-auto-rows: minmax(300px, auto);
  gap: 16px;
  z-index: 2;
}
.panel {
  position: relative;
  background: rgba(0, 8, 0, 0.6);
  border: 1px solid rgba(0, 255, 106, 0.35);
  box-shadow: 0 0 12px rgba(0, 255, 106, 0.22),
    inset 0 0 18px rgba(0, 255, 106, 0.15);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  overflow: hidden;
}
.panel:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 30px rgba(0, 255, 106, 0.08);
  pointer-events: none;
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 255, 106, 0.25);
  background: linear-gradient(180deg, rgba(0, 16, 0, 0.7), rgba(0, 0, 0, 0.7));
}
.panel .title {
  color: var(--neon);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0, 255, 106, 0.7), 0 0 24px rgba(0, 255, 106, 0.4);
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 255, 106, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 106, 0.6);
}
.terminal {
  grid-row: span 2;
}
.terminal-output {
  height: calc(100% - 52px);
  overflow: auto;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #d8ffd8;
}
.terminal-output::-webkit-scrollbar {
  width: 8px;
}
.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 106, 0.25);
  border-radius: 10px;
}
.terminal-input {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(0, 255, 106, 0.25);
  background: linear-gradient(
    180deg,
    rgba(0, 12, 0, 0.85),
    rgba(0, 0, 0, 0.85)
  );
}
.prompt {
  color: var(--neon);
  text-shadow: 0 0 8px rgba(0, 255, 106, 0.8);
  animation: flicker 1.8s infinite;
}
#cmd {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #eaffea;
  font-size: 14px;
  letter-spacing: 0.3px;
  caret-color: var(--neon);
}
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}
.status .stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}
.stat {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 12px;
  color: #caffce;
}
.label {
  opacity: 0.8;
}
.label .num {
  color: var(--neon);
  margin-left: 6px;
}
.bar {
  height: 10px;
  border: 1px solid rgba(0, 255, 106, 0.3);
  background: rgba(0, 255, 106, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 255, 106, 0.18);
}
.fill {
  height: 100%;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 106, 0.5),
    rgba(0, 255, 106, 0.85)
  );
  box-shadow: 0 0 16px rgba(0, 255, 106, 0.45);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.metric .value {
  font-size: 20px;
  color: var(--neon);
  text-shadow: 0 0 10px rgba(0, 255, 106, 0.8), 0 0 30px rgba(0, 255, 106, 0.5);
}
.metric .desc {
  opacity: 0.8;
}
.streams .stream-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  height: calc(100% - 52px);
}
.stream {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 106, 0.25);
  background: rgba(0, 0, 0, 0.45);
}
.stream .line {
  display: block;
  color: #b9ffbf;
  font-size: 12px;
  white-space: nowrap;
  padding: 4px 8px;
  opacity: 0.9;
}
/* Arabic titles column (third stream) */
#streamC .line {
  direction: rtl;
  text-align: right;
}
.stream.scroll .inner {
  position: absolute;
  left: 0;
  right: 0;
  will-change: transform;
}
@keyframes stream-scroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(240px, auto);
  }
  .terminal {
    grid-row: auto;
  }
}

.boot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.boot-inner {
  width: min(820px, 90vw);
  border: 1px solid rgba(0, 255, 106, 0.35);
  background: rgba(0, 12, 0, 0.85);
  box-shadow: 0 0 24px rgba(0, 255, 106, 0.25),
    inset 0 0 18px rgba(0, 255, 106, 0.15);
  padding: 18px;
  border-radius: 12px;
  color: #caffce;
}
.boot-title {
  color: var(--neon);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 255, 106, 0.7);
}
.boot-lines {
  height: 320px;
  overflow: auto;
  border: 1px solid rgba(0, 255, 106, 0.25);
  padding: 12px;
  background: rgba(0, 0, 0, 0.55);
}
.boot-lines::-webkit-scrollbar {
  width: 8px;
}
.boot-lines::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 106, 0.25);
  border-radius: 10px;
}
.boot-progress {
  margin-top: 12px;
  height: 10px;
  border: 1px solid rgba(0, 255, 106, 0.3);
  background: rgba(0, 255, 106, 0.08);
  border-radius: 10px;
  overflow: hidden;
}
.boot-progress .fill {
  height: 100%;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 106, 0.5),
    rgba(0, 255, 106, 0.85)
  );
  box-shadow: 0 0 16px rgba(0, 255, 106, 0.45);
}
.boot-overlay.hidden {
  display: none;
}
.deface-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deface-inner {
  width: min(980px, 95vw);
  border: 1px solid rgba(0, 255, 106, 0.35);
  background: rgba(0, 12, 0, 0.85);
  box-shadow: 0 0 24px rgba(0, 255, 106, 0.25),
    inset 0 0 18px rgba(0, 255, 106, 0.15);
  padding: 18px;
  border-radius: 12px;
  color: #caffce;
}
.deface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.breach-title {
  color: #00ff6a;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(0, 255, 106, 0.9), 0 0 30px rgba(0, 255, 106, 0.5);
  animation: deface-flicker 1.4s infinite;
}
.target {
  opacity: 0.9;
}
.deface-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}
.deface-col {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 255, 106, 0.25);
}
.deface-feed {
  height: 340px;
  overflow: auto;
  padding: 12px;
  direction: rtl;
  text-align: right;
}
.deface-feed .line {
  display: block;
  color: #b9ffbf;
  font-size: 13px;
  padding: 4px 6px;
  white-space: nowrap;
}
.deface-status {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.deface-status .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deface-progress {
  margin: 10px 12px;
  height: 10px;
  border: 1px solid rgba(0, 255, 106, 0.3);
  background: rgba(0, 255, 106, 0.08);
  border-radius: 10px;
  overflow: hidden;
}
.deface-progress .fill {
  height: 100%;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 106, 0.5),
    rgba(0, 255, 106, 0.85)
  );
  box-shadow: 0 0 16px rgba(0, 255, 106, 0.45);
}
.deface-note {
  padding: 0 12px 12px;
  opacity: 0.85;
}
.deface-overlay.hidden {
  display: none;
}
@keyframes deface-flicker {
  0%,
  100% {
    opacity: 1;
  }
  40% {
    opacity: 0.8;
  }
  60% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.7;
  }
}
.sys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}
.sys-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 106, 0.25);
}
.sys-list {
  height: 220px;
  overflow: auto;
  padding: 10px 12px;
}
.sys-list .line {
  color: #b9ffbf;
  font-size: 12px;
  white-space: nowrap;
  padding: 2px 0;
}
