:root {
    --bg: #050510;
    --fg: #e0e0ff;
    --accent1: #ff45c7;
    --accent2: #00eaff;
    --muted: #7777aa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'VT323', 'Press Start 2P', ui-monospace, monospace;
    font-size: 17px;
    line-height: 1.5;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#terminal {
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    word-wrap: break-word;
}

#terminal:focus-within {
    text-shadow: 1px 0 0 rgba(255, 69, 199, 0.3), -1px 0 0 rgba(0, 234, 255, 0.3);
}

.line {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.prompt {
    color: var(--accent2);
}

.command {
    color: var(--fg);
}

.error {
    color: var(--accent1);
}

.path {
    color: var(--accent1);
}

.cmd-name {
    color: var(--accent2);
}

.input-line {
    display: flex;
    align-items: flex-start;
}

#input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    caret-color: transparent;
}

.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.2em;
    background: var(--fg);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

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

/* Scanlines overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(255, 255, 255, 0.03) 1px,
        rgba(255, 255, 255, 0.03) 2px
    );
    pointer-events: none;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s;
}

body.fx-off::before {
    opacity: 0;
}

/* Glitch slices */
.glitch-slice {
    position: fixed;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bg);
    pointer-events: none;
    z-index: 11;
    opacity: 0;
    transform: scaleX(1);
}

body.fx-off .glitch-slice {
    display: none;
}

/* Scrollbar styling */
#terminal::-webkit-scrollbar {
    width: 8px;
}

#terminal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#terminal::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 4px;
}

#terminal::-webkit-scrollbar-thumb:hover {
    background: var(--accent2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    #terminal {
        padding: 10px;
    }
}

/* Footer backlink */
.footer-link {
    color: var(--muted);
    font-size: 0.9em;
    margin-top: 20px;
    opacity: 0.6;
}

.footer-link a {
    color: var(--accent2);
    text-decoration: none;
}

.footer-link a:hover {
    text-shadow: 0 0 5px var(--accent2);
}