/* FONTOS: ez oldja meg a legtöbb kilógást */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #353432;
  color: #cfeecf;
  font-family: "Courier New", monospace;
}

.wrapper {
   background-color: black;
  min-height: 100svh;
  width: 100%;
  padding: clamp(12px, 4vw, 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.terminal {
  opacity: 0;
  transform: scale(.98);
  animation: boot 2s ease-out forwards;
  background: #020202;
  font-size: clamp(0.72rem, 1.5vw, 0.95rem);
  line-height: 1.5;
  text-align: left;
  letter-spacing: clamp(0.5px, 0.2vw, 2px);
  border: 1px solid #1f401f;
  padding: clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px) clamp(14px, 2vw, 18px);
   width: 100%;
    max-width: 900px;
     padding: clamp(14px, 3vw, 24px);
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.08);
  text-shadow: 0 0 3px rgba(0, 255, 0, 0.25);
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 255, 0, 0.2) 0px,
      rgba(0, 255, 0, 0.1) 2px,
      rgba(0, 0, 0, 0) 5px,
      rgba(0, 0, 0, 0) 5px
    );
  opacity: 0.75;
  mix-blend-mode: screen;
}

@keyframes boot {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.line {
  min-height: 1.7rem;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cursor {
  position: relative;
}

.cursor::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 4px;
  background: #cfeecf;
  animation: cursor-blink 0.7s steps(1) infinite;
  vertical-align: bottom;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.terminal-footer {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(76, 255, 76, 0.25);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.start-btn {
  opacity: 0;
  pointer-events: none;
  border: 1px solid #4cff4c;
  color: #4cff4c;
  background: transparent;
  padding: 8px 22px;
  border-radius: 4px;
  font-family: inherit;
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s, opacity 0.4s;
  max-width: 100%;
}

.start-btn:hover {
  background: #002700;
  box-shadow: 0 0 12px #4cff4c;
  transform: translateY(-1px);
}

#canv {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  display: none;
  z-index: 1;
}

/* Tablet */
@media (max-width: 768px) {
  .wrapper {
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .terminal {
    width: 100%;
    letter-spacing: 1px;
  }

  .line {
    min-height: 1.5rem;
  }
}

/* Mobil */
@media (max-width: 480px) {
  .wrapper {
    padding: 12px;
  }

  .terminal {
    width: 100%;
    padding: 14px 14px 12px;
    border-radius: 4px;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
  }

  .line {
    white-space: pre-wrap;
    min-height: 1.4rem;
  }

  .terminal-footer {
    margin-top: 12px;
    padding-top: 8px;
  }

  .start-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}