#terminal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 11, 20, 0.97);
}

#terminal-overlay.active {
    display: flex;
}

#terminal-window {
    background: #111;
    color: #c8f7c5;
    font-family: "Fira Mono", "Consolas", "Monaco", monospace;
    border-radius: 14px;
    box-shadow: 0 2px 48px #000b;
    min-width: 460px;
    width: 44vw;
    max-width: 680px;
    min-height: 270px;
    max-height: 80vh;
    padding: 0.8em 1.1em;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

#terminal-output {
    flex: 1 1 auto;
    overflow-y: auto;
    font-size: 1.07em;
    line-height: 1.5;
    margin-bottom: 7px;
}

#terminal-input-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 1.09em;
    background: transparent;
}

.terminal-prompt {
    color: #79b8ff;
    margin-right: 0.3em;
}

#terminal-input {
    caret-color: #c8f7c5;
    background: transparent;
    border: none;
    outline: none;
    color: #c8f7c5;
    font-family: inherit;
    font-size: inherit;
    width: 68%;
}

.terminal-cursor {
    width: 9px;
    height: 1.3em;
    margin-left: 2px;
    background: #c8f7c5;
    animation: blink 1.2s steps(1) infinite;
    display: inline-block;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    49% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

#terminal-overlay.light {
    background: rgba(242, 242, 242, 0.97);
}

#terminal-window.light {
    background: #e9ecef;
    color: #24362f;
}

#terminal-window.light .terminal-prompt {
    color: #0056c9;
}

#terminal-window.light .terminal-cursor {
    background: #24362f;
}

#matrix-rain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: none;
}

#terminal-overlay.active #matrix-rain {
    display: block;
}