:root {
  --color-bg: #0c0f10;
  --color-text: #f8fafc;
  --color-accent: #22c55e;
  --color-amarillo: #facc15;
  --color-azul: #60a5fa;
  --color-alerta: #f87171;
  --color-bar: #22c55e;
  --color-bar-bg: #232927;
  --color-terminal: #0a1511;
  --color-terminal-text: #9fffa6;
  --color-terminal-label: #ffee80;
  --color-terminal-success: #81ff81;
  --color-terminal-error: #f87171;
}

html, body {
  height: 100%; margin: 0; padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'IBM Plex Mono', monospace;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* --------------- TERMINAL INTRO --------------- */
#terminal-intro {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--color-terminal);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transition: opacity .5s;
  overflow: hidden;
}
.terminal-window {
  width: 100vw;
  height: 100vh;
  background: none;
  border: none;
  box-shadow: none;
  padding: 2.5em 2em 1.5em 2em;
  color: var(--color-terminal-text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.14rem;
  line-height: 0.28;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.terminal-header {
  color: var(--color-terminal-label);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.8em;
  letter-spacing: 0.02em;
  text-shadow: 0 0 7px #aaffaa33;
}
.terminal-footer {
  position: absolute;
  bottom: 1.1em; right: 2em;
  font-size: 0.98em;
  color: #4be98a;
  opacity: 0.24;
  letter-spacing: 0.13em;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 5px #0c6d2e44;
}
#terminal-content {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: none;
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.08em;
  font-family: inherit;
  color: inherit;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre-wrap;
}
.terminal-prompt, .terminal-line, .terminal-input {
  display: block;
  min-height: 1.2em;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-cursor {
  display: inline-block;
  width: 0.7em;
  color: var(--color-accent);
  background: transparent;
  animation: blink 1s steps(1) infinite;
  font-weight: bold;
}
@keyframes blink {
  50% { opacity: 0; }
}
.terminal-typein {
  color: #fff;
}
.terminal-success { color: var(--color-terminal-success);}
.terminal-error { color: var(--color-terminal-error);}
.terminal-scan { color: var(--color-accent);}
.terminal-hz { color: var(--color-amarillo); font-weight: 700;}
.terminal-root { color: #6cf391; font-weight: 700;}
.terminal-port { color: #81ff81; }
.terminal-service { color: #b2f7ff; }
.terminal-password { letter-spacing: 0.15em; }

#terminal-intro.closing {
  animation: terminal-close 0.8s cubic-bezier(.84,-0.14,.31,1.05) forwards;
  transform-origin: top center;
}
@keyframes terminal-close {
  0% { transform: scaleY(1); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; }
}

/* --------------- LANDING PAGE --------------- */
#main-landing {
  display: none;
  width: 100vw; min-height: 100vh;
}
#main-landing.visible {
  display: flex;
}
.centered-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; width: 100vw;
}
header {
  text-align: center; margin-bottom: 1vh;
}
.logo {
  font-size: 5.3rem;
  font-weight: 700;
  color: var(--color-accent);
  text-shadow: 0 0 10px #0a2e11;
  line-height: 1;
}
.logo-sub {
  font-size: 1.2rem;
  color: var(--color-amarillo);
  letter-spacing: 0.04em;
}
.logo-hzar {
  color: var(--color-amarillo);
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0.93;
}
h1.hz-title {
  font-size: 1.4rem;
  color: var(--color-azul);
  margin-top: 1rem;
}
.terminal-bar-wrap {
  width: 340px; max-width: 94vw;
  background: var(--color-bar-bg);
  border-radius: 8px;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 12px 1px rgba(34,197,94,0.09);
  padding: 1em;
  text-align: left;
  margin: 1.2rem auto 1.8rem auto;
  font-size: 1.05rem;
}
.terminal-bar-label {
  color: var(--color-amarillo);
  font-size: 1rem;
  margin-bottom: 0.4em;
}
.bar-bg {
  width: 100%; height: 1.1em;
  background: #16241a; border-radius: 4px;
  border: 1px solid #1c4322;
  position: relative;
}
.bar-fill {
  height: 100%; width: 45%;
  background: linear-gradient(90deg, var(--color-accent) 85%, #facc15 100%);
  border-radius: 4px 0 0 4px;
  transition: width 0.7s ease-in-out;
  position: absolute; left: 0; top: 0;
}
.bar-text {
  color: var(--color-accent);
  font-weight: 700;
  margin-top: 0.3em;
  display: block;
  font-size: 1rem;
}
.bar-prompt {
  color: var(--color-azul);
  font-size: 0.95rem;
  margin-top: 0.2em;
}
.desc {
  margin: 1.2vh 0; padding: 0 2vw; text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px; width: 95vw;
  font-weight: 400;
}
.desc strong, .desc .hz {
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.desc .amarillo {
  color: var(--color-amarillo);
  font-weight: 700;
}
.desc .frase {
  font-weight: 600;
  font-style: italic;
  display: block;
  margin: 0.6em 0;
  border-left: 2px solid var(--color-accent);
  padding-left: 0.6em;
}
.frase.libertad {
  color: var(--color-amarillo);
  border-color: var(--color-amarillo);
}
.footer-block {
  margin-top: 2vh;
  text-align: center;
}
.footer-ascii {
  color: var(--color-alerta);
  font-size: 0.9rem;
  opacity: 0.82;
}
.footer-text {
  color: var(--color-amarillo);
  font-size: 0.88rem;
  font-weight: 500;
}
.footer-copy {
  color: var(--color-text);
  font-size: 0.78rem;
  margin-top: 0.5em;
  opacity: 0.5;
}
@media (max-width: 600px) {
  .logo { font-size: 2.5rem; }
  .desc { font-size: 0.89rem; }
  .terminal-window { padding: 1.2rem 0.8rem 1.5rem 0.8rem; min-width: 0; }
  .centered-wrap { padding-top: 1.5vh; }
  #terminal-content { font-size: 1em;}
}
