:root {
    --green: #00ff41;
    --dark-green: #003b00;
    --black: #000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--black);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--green);
    font-family: "Ubuntu Mono", "Cascadia Mono", Consolas, "Yu Gothic", "Meiryo", "MS Gothic", monospace;
    font-size: 14px;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#matrixCanvas {
    position: fixed;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.28;
    pointer-events: none;
}

body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    content: "";
    pointer-events: none;
}

#terminal {
    position: relative;
    z-index: 3;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    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%;
}

#log-stream {
    position: fixed;
    top: 10px;
    right: 20px;
    width: 300px;
    text-align: right;
    font-size: 12px;
    color: #a0ffa0;
    pointer-events: none;
}

#output {
    white-space: pre-wrap;
    word-break: break-all;
}

.line {
    margin-bottom: 5px;
}

.command-result {
    margin-bottom: 15px;
    color: #a0ffa0;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--green);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    flex-grow: 1;
}

/* Custom scrollbar */
#terminal::-webkit-scrollbar {
    width: 8px;
}
#terminal::-webkit-scrollbar-track {
    background: var(--black);
}
#terminal::-webkit-scrollbar-thumb {
    background: var(--dark-green);
}

.flicker {
    animation: flicker 0.1s infinite;
}

@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}