*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  font-family: 'DejaVu Sans Mono', monospace;
}

body {
  display: flex;
  flex-direction: column;
}

.crt-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.crt-screen::before,
.crt-screen::after,
.crt-vignette,
.terminal-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crt-screen::before, .crt-screen::after { content: ''; }

.crt-screen::before {
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0 1px, transparent 1px 2px);
  z-index: 10;
}

.crt-screen::after {
  background: rgba(51,255,0,0.02);
  z-index: 9;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.97; }
  50% { opacity: 1; }
}

.crt-vignette {
  box-shadow: inset 0 0 150px rgba(0,0,0,0.8);
  z-index: 8;
}

.crt-content { width: 100%; height: 100%; }

#terminal {
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

#terminal .xterm { height: 100%; padding: 16px; }

#terminal .xterm-rows span {
  text-shadow: 0 0 4px rgb(from currentColor r g b / 0.7), 0 0 10px rgb(from currentColor r g b / 0.3);
}

#terminal .xterm-cursor-layer .xterm-cursor {
  box-shadow: 0 0 8px rgba(51,255,0,0.5);
}

.terminal-overlay {
  z-index: 10;
  background: radial-gradient(ellipse at center, rgba(51,255,0,0.04) 0%, transparent 70%);
  box-shadow: inset 0 0 100px rgba(51,255,0,0.08);
}

footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 0 0.75rem 0.75rem;
  font-family: 'DejaVu Sans Mono', monospace;
  font-size: 1rem;
  color: hsl(120 20% 40%);
}

footer a {
  color: hsl(120 20% 40%);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s, opacity 0.2s;
}

footer a img {
  opacity: 0.5;
  transition: opacity 0.2s;
}

footer a:hover {
  color: #33ff00;
}

footer a:hover img {
  opacity: 1;
}
