body {
  margin: 0;
  padding: 0;
  background: url('img/fundo.jpeg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Courier New', Courier, monospace;
  color: #00ffcc;
  text-shadow: 0 0 5px #00ffcc;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Camada escura para melhorar a legibilidade */
  z-index: -1;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* escurece um pouco a imagem pra texto não sumir */
  z-index: -1;
}

.intro {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: black;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: glitchBg 0.1s infinite;
}

.logo {
  font-size: 2em;
  color: #00ffcc;
  text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffff;
  animation: blink 1.5s infinite alternate;
}

@keyframes blink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes glitchBg {
  0%, 100% { background: black; }
  50% { background: #001111; }
}

.hidden { display: none; }

.crt {
  position: relative;
  margin: 50px auto;
  width: 90%;
  max-width: 1000px;
  height: 600px;
  background: radial-gradient(#003300, #000);
  border: 10px solid #222;
  border-radius: 20px;
  box-shadow: 0 0 30px #0f0;
  overflow: hidden;
}

.crt::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(0,255,0,0.05) 0px, rgba(0,255,0,0.05) 2px, transparent 2px, transparent 4px);
  z-index: 2;
  pointer-events: none;
}

.interface {
  padding: 20px;
  z-index: 1;
}

.neon-button {
  background: transparent;
  border: 2px solid #00ffff;
  color: #00ffff;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  text-shadow: 0 0 5px #00ffff;
  box-shadow: 0 0 5px #00ffff;
  transition: all 0.3s ease;
}

.neon-button:hover {
  background: #00ffff;
  color: black;
  text-shadow: none;
  box-shadow: 0 0 15px #00ffff;
}

#terminalOutput {
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  height: 200px;
  overflow-y: auto;
  border: 1px solid #0f0;
  margin-bottom: 10px;
}

#historico {
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  margin-top: 10px;
  border: 1px solid #0ff;
  max-height: 120px;
  overflow-y: auto;
}

.glitch {
  animation: glitch 0.3s steps(2, end) 3;
}

@keyframes glitch {
  0% { transform: translate(2px, -2px); }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(2px, 2px); }
  75% { transform: translate(-2px, -2px); }
  100% { transform: none; }
}

.portal {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(0,255,255,0.4) 0%, transparent 70%);
  animation: portalAnim 2s infinite ease-in-out;
  z-index: 3;
  display: none;
  pointer-events: none;
}

@keyframes portalAnim {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}
