/* --- Base Styles --- */
:root {
    --nier-bg: #1a1a1a;
    --nier-fg: #d4d2c8;
    --nier-green: #a2f8b1;
}

body {
    background-color: var(--nier-bg);
    color: var(--nier-fg);
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(212, 210, 200, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 210, 200, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 2rem;
    box-sizing: border-box;
}

.terminal-container {
    width: 80%;
    max-width: 650px;
    /* The new, subtle glowing pulse animation is applied here */
    animation: soft-focus-pulse 4s ease-in-out infinite;
}

.terminal-container p {
    margin: 4px 0;
    font-size: 1.1em;
    display: inline;
}

.line-container {
    height: 1.5em; /* Ensures each line takes up consistent space */
}

.status-green {
    color: var(--nier-green);
}

/* --- Animation Overlays --- */

.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px 40px rgba(0, 0, 0, 0.75);
    z-index: 10;
    pointer-events: none;
}

.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.2) 50%
    );
    background-size: 100% 4px;
    animation: scanline-scroll 20s linear infinite;
    z-index: 11;
    pointer-events: none;
}

/* --- Cursors and Keyframe Animations --- */

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--nier-fg);
    margin-left: 5px;
    vertical-align: middle;
    /* The new animation makes the blink smooth */
    animation: blink 1.2s ease-in-out infinite;
}

/* New Keyframe: Smooth fade-in/out blink */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes scanline-scroll {
    from { background-position-y: 0; }
    to { background-position-y: 80px; }
}

/* New Keyframe: Replaces jitter with a subtle glow */
@keyframes soft-focus-pulse {
    0% {
        text-shadow: 0 0 4px rgba(212, 210, 200, 0.2);
    }
    50% {
        text-shadow: 0 0 8px rgba(212, 210, 200, 0.4);
    }
    100% {
        text-shadow: 0 0 4px rgba(212, 210, 200, 0.2);
    }
}


/* New "Power-On" effect replaces the chaotic glitch */
body.glitch-start .terminal-container {
    animation: power-on 1s ease-out;
}

@keyframes power-on {
    from {
        opacity: 0;
        filter: blur(5px);
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}