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

:root {
    /* Default Matrix Theme */
    --bg-color: #0d0e11;
    --text-color: #4af626;
    --caret-color: #4af626;
    --prompt-color: #50fa7b;
    --highlight-color: #8be9fd;
    --input-text-color: #f8f8f2;
}

body.theme-matrix {
    --bg-color: #0d0e11;
    --text-color: #4af626;
    --caret-color: #4af626;
    --prompt-color: #50fa7b;
    --highlight-color: #8be9fd;
    --input-text-color: #f8f8f2;
}

body.theme-dracula {
    --bg-color: #282a36;
    --text-color: #f8f8f2;
    --caret-color: #ff79c6;
    --prompt-color: #50fa7b;
    --highlight-color: #8be9fd;
    --input-text-color: #f8f8f2;
}

body.theme-hacker {
    --bg-color: #080500;
    --text-color: #ffb000;
    --caret-color: #ffb000;
    --prompt-color: #ffb000;
    --highlight-color: #ffd700;
    --input-text-color: #ffe082;
}

body.theme-light {
    --bg-color: #f4f4f6;
    --text-color: #1f1f23;
    --caret-color: #000000;
    --prompt-color: #0000ff;
    --highlight-color: #008080;
    --input-text-color: #1f1f23;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle CRT Scanline overlay effect */
body::before {
    content: " ";
    display: block;
    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));
    z-index: 2;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
}

.terminal {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Hide scrollbars but preserve functionality */
.terminal::-webkit-scrollbar {
    display: none;
}

.output {
    white-space: pre-wrap;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--prompt-color);
    margin-right: 10px;
    white-space: nowrap;
}

input[type="text"] {
    background: transparent;
    border: none;
    color: var(--input-text-color);
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    outline: none;
    flex-grow: 1;
    caret-color: var(--caret-color);
}

.highlight {
    color: var(--highlight-color);
}

.error {
    color: #ff5555;
}

.ai-response {
    color: #ffb86c; /* Unique color to indicate an AI output */
}