:root {
    --bg-color: #0a0a0a;
    --primary-color: #00ff41;
    --dim-color: #008f11;
    --font-main: 'Courier New', Courier, monospace;
    --glow: 0 0 10px rgba(0, 255, 65, 0.35), 0 0 20px rgba(0, 255, 65, 0.15);
}

body, html {
    background:
        radial-gradient(circle at 25% 10%, rgba(0, 255, 65, 0.08), transparent 35%),
        radial-gradient(circle at 80% 90%, rgba(0, 255, 65, 0.05), transparent 30%),
        var(--bg-color);
    color: var(--primary-color);
    margin: 0;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-main);
    text-shadow: var(--glow);
    position: relative;
    animation: crt-flicker 6s infinite;
}

body::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.32) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    opacity: 0.78;
}

body::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, transparent 45%, rgba(0, 0, 0, 0.5) 100%);
}

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

#terminal::-webkit-scrollbar {
    display: none;
}

#history {
    white-space: pre-wrap;
    line-height: 1.4;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
}

.input-line {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
}

#prompt {
    color: var(--primary-color);
    margin-right: 10px;
    font-weight: bold;
}

#user-input {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    width: 100%;
    padding: 0;
    caret-color: var(--primary-color);
    animation: text-jitter 0.2s infinite;
}

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

.cmd-output {
    margin-bottom: 10px;
}

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

@keyframes crt-flicker {
    0%,
    100% {
        opacity: 1;
    }
    10% {
        opacity: 0.98;
    }
    16% {
        opacity: 0.995;
    }
    35% {
        opacity: 0.99;
    }
    62% {
        opacity: 0.985;
    }
    84% {
        opacity: 0.992;
    }
}

@keyframes text-jitter {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(0.2px);
    }
}
