/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  overflow: hidden;
  background-color: #0a0a0a;
  color-scheme: dark;
}

#root {
  opacity: 1;
  transition: opacity 0.8s ease-in-out;
}

#root.loading {
  opacity: 0;
}

/* Animations */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes crtFlicker {
  0% {
    opacity: 0.01;
  }

  20% {
    opacity: 0.04;
  }

  40% {
    opacity: 0.02;
  }

  60% {
    opacity: 0.05;
  }

  80% {
    opacity: 0.01;
  }

  100% {
    opacity: 0.03;
  }
}

@keyframes scanBand {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 0% -200%;
  }
}

@keyframes glitchBars {
  0% {
    background-position: 0% 0%;
  }

  25% {
    background-position: 0% 30%;
  }

  50% {
    background-position: 0% 60%;
  }

  75% {
    background-position: 0% 15%;
  }

  100% {
    background-position: 0% 0%;
  }
}

/* Responsive adjustments */
@media (max-height: 500px) {
  .crt-content {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .crt-logo {
    margin-bottom: 0.75rem !important;
  }

  .crt-title {
    margin-bottom: 0.25rem !important;
  }

  .crt-divider {
    margin-bottom: 0.5rem !important;
  }
}

@media (hover: none) {
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Layer utility for fixed overlays */
.fixed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Content layout */
.crt-content {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 5vh, 2.5rem) clamp(1rem, 4vw, 1.5rem);
}

.central-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
}

.crt-logo {
  width: clamp(160px, 40vmin, 280px);
  height: auto;
  margin-bottom: clamp(1.25rem, 3vh, 2.5rem);
  filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.45));
}

.crt-title {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: clamp(0.4rem, 1vh, 0.6rem);
  text-align: center;
  letter-spacing: clamp(0.1em, 2vw, 0.3em);
  text-transform: uppercase;
  color: #22c55e;
  text-shadow:
    0 0 10px rgba(34, 197, 94, 0.3),
    0 0 20px rgba(34, 197, 94, 0.2);
}

.crt-divider {
  width: clamp(6rem, 14vw, 10rem);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(34, 197, 94, 0.4), transparent);
  margin-bottom: clamp(0.5rem, 1.5vh, 0.9rem);
}

.terminal-message {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.9rem, 2vw, 1rem);
  /* Increased slightly */
  text-align: center;
  letter-spacing: 0.08em;
  color: rgba(34, 197, 94, 0.9);
  /* Maximize legibility */
  min-height: 1.4em;
  margin-bottom: 0.5rem;
}

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  background-color: rgba(34, 197, 94, 0.5);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

.footer {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.75rem, 1.2vw, 0.8rem);
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(34, 197, 94, 0.45);
  /* Balanced contrast */
}