@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

:root {
    --primary-color: #00FF41;
    --background-color: #0a0a0a;
    --glitch-color-1: #00FFFF;
    --glitch-color-2: #FF00FF;
    --flicker-opacity: 0.97;
}

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

html, body {
    height: 100%;
    width: 100%;
    background-color: var(--background-color);
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    overflow: hidden;
}

/* Scanlines */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.5) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 9999;
}

/* CRT screen curvature vignette */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
    z-index: 9998;
}

/* Terminal container */
.terminal {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 30px 40px;
    overflow-y: auto;
    text-shadow: 0 0 5px var(--primary-color);
}

/* ASCII art */
#logo-container {
    white-space: pre;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    text-align: center;
}

#logo-container pre {
    display: inline-block;
}

/* Message area */
#message-container {
    width: 100%;
    max-width: 800px;
}

.line {
    display: block;
    min-height: 1.4em;
    white-space: pre;
}

/* Prompt line */
.prompt-line {
    display: flex;
    align-items: center;
    min-height: 1.4em;
    position: relative;
}

.prompt-tag {
    color: var(--primary-color);
    white-space: pre;
    flex-shrink: 0;
}

.prompt-text {
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    text-shadow: 0 0 5px var(--primary-color);
    white-space: pre;
}

.hidden-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Block cursor on input */
.input-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    flex-shrink: 0;
    margin-left: 2px;
}

/* Blinking cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background-color: var(--primary-color);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { background-color: transparent; }
    50% { background-color: var(--primary-color); }
}

/* Credit footer */
.credit {
    position: fixed;
    bottom: 12px;
    right: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    opacity: 0.5;
    z-index: 10000;
    text-shadow: none;
}

.credit a {
    color: var(--primary-color);
    text-decoration: none;
}

.credit a:hover {
    text-decoration: underline;
}
