:root {
  --bg: #000;
  --text: #33ff99;
  --border: #33ff99;
  --glow: rgba(51, 255, 153, 0.3);

  --scrollbar-bg: #000;
  --scrollbar-thumb: #33ff99;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: 'VT323', monospace;
  color: var(--text);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crt {
  position: relative;
  width: 95%;
  max-width: 960px;
  height: 90vh;
  padding: 25px;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 0 40px var(--glow);
  overflow: hidden;
}

/* Scanlines */
.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
}

/* Slight screen flicker */
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.02);
  animation: flicker 0.15s infinite;
  pointer-events: none;
}

@keyframes flicker {
  0% { opacity: 0.95; }
  100% { opacity: 1; }
}

.terminal {
  color: var(--text);
  position: relative;
  height: 100%;
  overflow-y: auto;
}

pre {
  margin: 0;
  white-space: pre-wrap;
}

.input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.input-line span {
  margin-right: 6px;
}

input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  width: 100%;
}

/* Scrollbar width */
.terminal::-webkit-scrollbar {
  width: 10px;
}

/* Track */
.terminal::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
  border-left: 1px solid var(--border);
}

/* Handle */
.terminal::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 6px;
  box-shadow: 0 0 8px var(--glow);
}

/* Handle on hover */
.terminal::-webkit-scrollbar-thumb:hover {
  background-color: var(--text);
}

.terminal {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}
