* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: #020306;
  color: #d7fff1;
  font-family: "Manrope", sans-serif;
}

/* Dunkler Nebel-Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.92)),
    url("../img/fogwater.png") center / cover repeat;
  opacity: 0.95;
  z-index: -4;
}

/* Dunkle Tiefe + Vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0, 255, 180, 0.08), transparent 32%),
    radial-gradient(
      circle at 20% 80%,
      rgba(0, 140, 255, 0.08),
      transparent 28%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(80, 255, 190, 0.06),
      transparent 25%
    ),
    linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  z-index: -3;
}

/* Canvas-Partikel */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Scanlines */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 5px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
}

/* Seite */
.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

/* Terminal-Fenster */
.terminal {
  width: min(860px, 94vw);
  border: 1px solid rgba(110, 255, 210, 0.2);
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(8, 18, 18, 0.92),
    rgba(1, 6, 7, 0.94)
  );
  box-shadow:
    0 0 80px rgba(0, 255, 180, 0.08),
    0 0 180px rgba(0, 140, 255, 0.08),
    inset 0 0 40px rgba(255, 255, 255, 0.025);
  overflow: hidden;
  backdrop-filter: blur(14px);
  animation: terminalIn 1.1s ease forwards;
}

/* Terminal-Leiste */
.terminal-header {
  height: 46px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(110, 255, 210, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(215, 255, 241, 0.35);
}

.terminal-dots span:nth-child(1) {
  background: #ff5f56;
}

.terminal-dots span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
  background: #27c93f;
}

.terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: rgba(215, 255, 241, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Terminal-Inhalt */
.terminal-body {
  padding: clamp(1.5rem, 5vw, 4rem);
}

.label {
  margin: 0 0 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: rgba(95, 255, 205, 0.75);
}

h1 {
  margin: 0 0 2rem;
  max-width: 760px;
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  line-height: 0.98;
  font-weight: 700;
  color: #eefdf8;
  letter-spacing: -0.06em;
  text-shadow: 0 0 32px rgba(0, 255, 180, 0.14);
}

/* Terminal Textausgabe */
.terminal-output {
  min-height: 190px;
  padding: 1.1rem;
  border: 1px solid rgba(110, 255, 210, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.32);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.78rem, 1.8vw, 0.98rem);
  line-height: 1.75;
  color: rgba(215, 255, 241, 0.88);
  box-shadow: inset 0 0 28px rgba(0, 255, 180, 0.035);
}

.terminal-line {
  margin: 0;
  opacity: 0;
  transform: translateY(6px);
  animation: lineIn 0.35s ease forwards;
}

.terminal-line::before {
  content: "> ";
  color: #5fffcf;
}

.terminal-line.success::before {
  content: "✓ ";
  color: #5fffcf;
}

.terminal-line.warning::before {
  content: "! ";
  color: #ffbd2e;
}

.cursor {
  display: inline-block;
  width: 0.65em;
  height: 1em;
  margin-left: 0.2em;
  background: #5fffcf;
  vertical-align: -0.15em;
  animation: blink 0.85s infinite;
}

/* Progress */
.progress-wrap {
  margin-top: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: rgba(215, 255, 241, 0.62);
}

.progress-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(215, 255, 241, 0.1);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1dffb2, #00b7ff);
  box-shadow: 0 0 18px rgba(0, 255, 180, 0.55);
  transition: width 0.5s ease;
}

.footer-line {
  margin: 1.4rem 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  color: rgba(215, 255, 241, 0.56);
}

/* Animationen */
@keyframes terminalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .terminal-body {
    padding: 1.4rem;
  }

  .terminal-output {
    min-height: 220px;
  }

  h1 {
    margin-bottom: 1.4rem;
  }
}
