:root {
  --primary: #0f0;
  --error: #f00;
  --bg: #000;
  --text: #0f0;
  --container-bg: #000;
  --input-bg: #000;
  --scan-line-color: rgba(0, 255, 0, 0.1);
  font-family: 'Courier New', monospace;
  line-height: 1.5;
  color: var(--text);
}

@keyframes textShadow {
  0% {
    text-shadow: 0.4389924193300864px 0 1px rgba(0,255,0,0.5), 
                 -0.4389924193300864px 0 1px rgba(255,0,0,0.3), 
                 0 0 3px;
  }
  5% {
    text-shadow: 2.7928974010788217px 0 1px rgba(0,255,0,0.5), 
                 -2.7928974010788217px 0 1px rgba(255,0,0,0.3), 
                 0 0 3px;
  }
  /* ... and more randomized text-shadow values ... */
  100% {
    text-shadow: 0.4389924193300864px 0 1px rgba(0,255,0,0.5), 
                 -0.4389924193300864px 0 1px rgba(255,0,0,0.3), 
                 0 0 3px;
  }
}

@keyframes scanline {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(100vh);
  }
}

body {
  max-width: 100%;
  margin: 0;
  padding: 2rem;
  background: var(--bg);
  animation: textShadow 1.6s infinite;
  position: relative;
  /* allow page to scroll when content is tall */
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 2px;
  background: var(--scan-line-color);
  animation: scanline 6s linear infinite;
  pointer-events: none;
  opacity: 0.75;
}

.container {
  background: rgba(0, 0, 0, 0.8);
  padding: 2rem;
  border: 1px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2),
              inset 0 0 20px rgba(0, 255, 0, 0.1);
  position: relative;
  /* let the container grow with content */
  overflow: visible;
}

h1 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--primary);
}

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

h1 {
  position: relative;
  display: inline-block;
}

h1::before {
  content: ">";
  color: var(--primary);
  margin-right: 0.5rem;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

input, button {
  font: inherit;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: var(--text);
  border: 1px solid var(--primary);
  position: relative;
}

input {
  flex: 1;
  caret-color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
}

input::before {
  content: ">";
  color: var(--primary);
  position: absolute;
  left: 0.5rem;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4),
              inset 0 0 10px rgba(0, 255, 0, 0.2);
  background: rgba(0, 255, 0, 0.05);
}

button {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 0, 0.2),
    transparent
  );
  transition: 0.5s;
}

button:hover {
  background: rgba(0, 255, 0, 0.1);
  color: var(--text);
  border-color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4),
              inset 0 0 10px rgba(0, 255, 0, 0.2);
}

button:hover::before {
  left: 100%;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}

#result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary);
  min-height: 100px;
  box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.1);
  position: relative;
  /* allow the result area to scroll when content is long */
  overflow: auto;
  max-height: 60vh; /* limit height so page remains usable */
}

#result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--primary),
    transparent
  );
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#result pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--text);
  text-shadow: 0 0 5px var(--text);
  position: relative;
}

.error {
  color: var(--error);
  font-weight: bold;
  text-shadow: 0 0 10px var(--error),
               0 0 20px var(--error),
               0 0 30px var(--error);
  animation: glitch 0.3s infinite;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.loading {
  color: var(--primary);
  font-style: italic;
  position: relative;
}

@keyframes typing {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Replace entire file content */
:root {
  --primary: #0f0;
  --secondary: #00ff95;
  --error: #ff0000;
  --bg: #000;
  --terminal-bg: rgba(16, 16, 16, 0.9);
  --text: #0f0;
  --dim: rgba(0, 255, 0, 0.5);
  --terminal-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
  font-family: 'Courier New', monospace;
  line-height: 1.5;
  color: var(--text);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 20px;
}

/* CRT Effect */
.crt::before {
  content: " ";
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 100;
}

.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--dim);
  opacity: 0.2;
  animation: scanline 6s linear infinite;
  pointer-events: none;
  z-index: 101;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--terminal-bg);
  border: 1px solid var(--primary);
  box-shadow: var(--terminal-shadow),
              inset 0 0 30px rgba(0, 255, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.terminal-header {
  padding: 15px;
  border-bottom: 1px solid var(--primary);
  font-size: 14px;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 0 0 5px var(--primary);
}

.terminal-info {
  display: flex;
  gap: 20px;
  font-size: 12px;
}

.terminal-info span {
  color: var(--secondary);
}

.access-panel {
  padding: 20px;
}

.panel-header {
  margin-bottom: 20px;
  font-size: 16px;
  letter-spacing: 2px;
}

.bracket {
  color: var(--secondary);
  font-weight: bold;
  margin: 0 5px;
}

.title {
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.input-group {
  flex: 1;
}

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary);
  padding: 8px 12px;
}

.arrow {
  color: var(--primary);
  font-weight: bold;
}

input {
  background: transparent;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 16px;
  width: 100%;
  outline: none;
}

input::placeholder {
  color: var(--dim);
  opacity: 0.5;
}

.cyber-button {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 20px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.cyber-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 0, 0.2),
    transparent
  );
  transition: 0.5s;
}

.cyber-button:hover {
  background: rgba(0, 255, 0, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2),
              inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.cyber-button:hover::before {
  left: 100%;
}

.cyber-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.result-container {
  margin-top: 20px;
}

.result-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary);
  padding: 15px;
  min-height: 200px;
  overflow: auto;
  font-size: 14px;
}

.system-msg {
  color: var(--dim);
  white-space: pre-line;
}

pre {
  margin: 10px 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.error {
  color: var(--error);
  text-shadow: 0 0 10px var(--error);
  animation: glitch 0.3s infinite;
}

.loading {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading .dots {
  font-family: monospace;
}

.terminal-footer {
  padding: 15px;
  border-top: 1px solid var(--primary);
  font-size: 12px;
}

.stats {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  color: var(--dim);
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}