:root {
    --phosphor-primary: #33ff00;
    --phosphor-dim: #1a8000;
    --bg-color: #051005;
    --screen-curve: 20px;
}

@font-face {
    font-family: 'Monitor';
    src: local('Courier New'), monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #000;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--phosphor-primary);
    font-family: 'Monitor', monospace;
    font-size: 18px;
    text-shadow: 0 0 5px var(--phosphor-edit);
}

#crt-frame {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: var(--bg-color);
    overflow: hidden;
}

/* CRT Effects */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%,
            rgba(51, 255, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 11;
    animation: flicker 0.15s infinite;
}

.screen-content {
    padding: 40px;
    height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 5;
}

#terminal-output {
    white-space: pre-wrap;
    margin-bottom: 20px;
    line-height: 1.5;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
    animation: blink 1s step-end infinite;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--phosphor-primary);
    font-family: 'Monitor', monospace;
    font-size: 18px;
    outline: none;
    flex-grow: 1;
    text-shadow: 0 0 5px var(--phosphor-primary);
    text-transform: uppercase;
}

/* Animations */
@keyframes flicker {
    0% {
        opacity: 0.97;
    }

    5% {
        opacity: 0.95;
    }

    10% {
        opacity: 0.9;
    }

    15% {
        opacity: 0.95;
    }

    20% {
        opacity: 0.98;
    }

    50% {
        opacity: 0.95;
    }

    80% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.97;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Scrollbar hiding */
.screen-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Glitch Effect Utility Class */
.glitch-text {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: red;
}

@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}