/* ═══════════════════════════════════════════════════
   SALESFORCE LEAD CAPTURE — RETRO CRT TERMINAL
   ═══════════════════════════════════════════════════ */

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

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

body {
  background: #0a0a0a;
  color: #00ff41;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ───── CRT Monitor ───── */
.crt {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.screen {
  width: 90vw;
  max-width: 800px;
  height: 80vh;
  max-height: 600px;
  background: #0d0d0d;
  border: 2px solid #00ff41;
  border-radius: 12px;
  padding: 30px;
  overflow-y: auto;
  position: relative;
  box-shadow:
    inset 0 0 60px rgba(0, 255, 65, 0.05),
    0 0 20px rgba(0, 255, 65, 0.15),
    0 0 60px rgba(0, 255, 65, 0.05);
}

/* ───── CRT Scan Lines ───── */
.screen::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 12px;
}

/* ───── CRT Vignette ───── */
.screen::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  z-index: 11;
  border-radius: 12px;
}

/* ───── Scan line flicker ───── */
@keyframes flicker {
  0%   { opacity: 0.97; }
  5%   { opacity: 1.0; }
  10%  { opacity: 0.96; }
  15%  { opacity: 1.0; }
  50%  { opacity: 0.98; }
  80%  { opacity: 1.0; }
  90%  { opacity: 0.97; }
  100% { opacity: 1.0; }
}
.crt {
  animation: flicker 0.15s infinite;
}

/* ───── Terminal Output ───── */
#terminal {
  position: relative;
  z-index: 5;
}

#output {
  margin-bottom: 10px;
}

.line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 14px;
}

.line.system {
  color: #00a82d;
}

.line.ok {
  color: #00ff41;
}

.line.warn {
  color: #ffaa00;
}

.line.info {
  color: #00bfff;
}

.line.success {
  color: #00ff41;
  font-weight: bold;
}

.line.error {
  color: #ff3333;
}

/* ───── Blinking Cursor ───── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.cursor {
  animation: blink 1s step-end infinite;
  color: #00ff41;
}

/* ───── Input Line ───── */
#input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.prompt {
  color: #00a82d;
  font-weight: bold;
}

.command {
  color: #00ff41;
}

#input-line.hidden,
.hidden { display: none; }

/* ───── Form ───── */
#form-container {
  margin-top: 16px;
}

.form-line {
  margin-bottom: 12px;
}

.form-line .prompt {
  display: block;
  margin-bottom: 4px;
}

.terminal-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid #00ff41;
  color: #00ff41;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  width: 100%;
  padding: 4px 8px;
  outline: none;
  caret-color: #00ff41;
}

.terminal-input:focus {
  border-bottom-color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.terminal-input::placeholder {
  color: #005a1a;
}

.terminal-textarea {
  resize: vertical;
  border: 1px solid #00a82d;
  min-height: 40px;
}

.terminal-btn {
  background: transparent;
  border: 1px solid #00ff41;
  color: #00ff41;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  padding: 8px 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-btn:hover {
  background: #00ff41;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.terminal-btn:active {
  background: #00a82d;
}

/* ───── Status Line ───── */
#status-line {
  margin-top: 16px;
  font-size: 14px;
  padding: 8px;
  border-top: 1px solid #00a82d;
}

/* ───── Scrollbar ───── */
.screen::-webkit-scrollbar {
  width: 6px;
}
.screen::-webkit-scrollbar-track {
  background: #0d0d0d;
}
.screen::-webkit-scrollbar-thumb {
  background: #00a82d;
  border-radius: 3px;
}

/* ───── Responsive ───── */
@media (max-width: 600px) {
  .screen {
    width: 95vw;
    height: 90vh;
    padding: 16px;
  }
  .line, .prompt, .terminal-input, .terminal-btn {
    font-size: 12px;
  }
}
