:root {
    --bg-color: #000;
    --text-color: #00ff00;
    --prompt-color: #00ff00;
    --error-color: #ff0000;
    --success-color: #00ff00;
    --info-color: #0000ff;
    --font-family: 'Courier New', Courier, monospace;
}

body.theme-classic {
    --bg-color: #000;
    --text-color: #00ff00;
    --prompt-color: #00ff00;
}

body.theme-light {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --prompt-color: #007bff;
}

body.theme-hacker {
    --bg-color: #050505;
    --text-color: #00ff41;
    --prompt-color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: none;
}

body.matrix-active #matrix-canvas {
    display: block;
}

#terminal-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#output {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 10px;
}

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

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

#command-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    flex-grow: 1;
    caret-color: transparent;
}

#cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background-color: var(--text-color);
    animation: blink 1s step-end infinite;
    margin-left: -100%; /* Position over the hidden input caret */
    pointer-events: none;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.error { color: var(--error-color); }
.success { color: var(--success-color); }
.info { color: var(--info-color); }

.boot-line {
    margin: 2px 0;
}

/* Scrollbar styling */
#terminal-container::-webkit-scrollbar {
    width: 8px;
}
#terminal-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
#terminal-container::-webkit-scrollbar-thumb {
    background: var(--text-color);
    border-radius: 4px;
}
