@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

:root {
    --terminal-green: #33ff33;
    --terminal-green-dim: #1a8c1a;
    --terminal-bg: #0d1a0d;
    --terminal-glow: rgba(51, 255, 51, 0.5);
}

body {
    background: #0a140a;
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: var(--terminal-green);
    min-height: 100vh;
    overflow: hidden;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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;
    z-index: 1000;
}

.terminal {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.terminal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 999;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid var(--terminal-green);
    margin-bottom: 20px;
    background: var(--terminal-bg);
}

.logo {
    font-size: 18px;
    letter-spacing: 2px;
}

.status {
    font-size: 16px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.terminal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    border: 2px solid var(--terminal-green);
    background: var(--terminal-bg);
    box-shadow: 0 0 20px var(--terminal-glow), inset 0 0 20px rgba(74, 246, 38, 0.1);
    margin-bottom: 20px;
    position: relative;
}

.terminal-content::-webkit-scrollbar {
    width: 10px;
}

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

.terminal-content::-webkit-scrollbar-thumb {
    background: var(--terminal-green-dim);
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-green);
}

.boot-sequence {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.robco-logo {
    font-size: 8px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--terminal-green);
    text-shadow: 0 0 10px var(--terminal-glow);
}

.loading {
    font-size: 24px;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.output-line {
    margin-bottom: 25px;
    line-height: 1.6;
    text-shadow: 0 0 5px var(--terminal-glow);
}

.output-line p {
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.output-line p:empty {
    margin-bottom: 30px;
}

.output-line p.qa-pair {
    margin-bottom: 8px;
}

.output-line h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.output-line.h1 {
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--terminal-green);
    padding-bottom: 10px;
}

.output-line.h2 {
    font-size: 24px;
    margin-bottom: 15px;
    margin-top: 20px;
}

.output-line.h3 {
    font-size: 22px;
    margin-bottom: 10px;
    margin-top: 15px;
}

.output-line ul {
    margin-left: 20px;
    list-style: square;
}

.output-line ul ul {
    margin-left: 20px;
}

.output-line li {
    margin-bottom: 12px;
    margin-left: 20px;
}

.output-line ul {
    margin-top: 15px;
    margin-bottom: 15px;
}

.output-line a {
    color: var(--terminal-green);
    text-decoration: underline;
}

.output-line a:hover {
    background: var(--terminal-green);
    color: var(--terminal-bg);
}

.output-line pre {
    font-family: 'VT323', monospace;
    white-space: pre-wrap;
    margin: 10px 0;
}

.output-line .command-echo {
    color: var(--terminal-green-dim);
    margin-bottom: 10px;
}

.output-line .error {
    color: #ff4444;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.output-line .success {
    color: #44ff44;
}

.output-line .warning {
    color: #ffaa00;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

.input-line {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid var(--terminal-green);
    background: var(--terminal-bg);
}

.prompt {
    margin-right: 10px;
    font-size: 20px;
    text-shadow: 0 0 5px var(--terminal-glow);
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    font-size: 20px;
    outline: none;
    caret-color: var(--terminal-green);
    text-shadow: 0 0 5px var(--terminal-glow);
}

#command-input::placeholder {
    color: var(--terminal-green-dim);
}

.divider {
    border: none;
    border-top: 1px dashed var(--terminal-green);
    margin: 20px 0;
}

.blink {
    animation: blink 1s infinite;
}

.crt-flicker {
    animation: flicker 0.15s infinite;
}

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

@media (max-width: 768px) {
    .terminal {
        padding: 10px;
    }

    .terminal-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .logo, .status {
        font-size: 14px;
    }

    .terminal-content {
        padding: 10px;
    }

    .robco-logo {
        font-size: 4px;
    }

    .output-line.h1 {
        font-size: 22px;
    }

    .output-line.h2 {
        font-size: 20px;
    }

    .output-line.h3 {
        font-size: 18px;
    }

    body {
        font-size: 16px;
    }
}
