/* ==========================================================================
   NEXUS TERMINAL // CORE CRT ENGINE DEFINITION
   ========================================================================== */

/* 1. Document Architecture & Radial Backdrop Glow */
html {
    background: radial-gradient(circle at center, #161005 0%, #050301 100%);
    min-height: 100vh;
    scroll-behavior: smooth;
}

body, .crt-bg {
    background-color: #0a0702 !important; /* Deep, warm amber-tinted charcoal black */
    color: #f59e0b;                      /* Master Amber Palette hex value */
}

/* 2. Dynamic Rolling CRT Scanline Effect Engine */
@keyframes scanline-roll {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* CRT Overlay Mesh & Animated Scan Intercept */
.crt-scanlines {
    position: relative;
}

.crt-scanlines::after {
    content: " ";
    display: block;
    position: fixed; /* Swapped to 'fixed' so it covers the viewport even when scrolling */
    top: 0; left: 0; bottom: 0; right: 0;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%), 
        linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.05));
    z-index: 9999; /* Ensures structural priority over media elements */
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
}

/* The Animated Laser Beam Scan Tracer */
.crt-scanlines::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 10px;
    background: rgba(245, 158, 11, 0.04);
    opacity: 0.8;
    z-index: 10000;
    pointer-events: none;
    animation: scanline-roll 8s linear infinite;
}

/* 3. Terminal Visual FX & Animations */
.terminal-glow {
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.7), 0 0 12px rgba(245, 158, 11, 0.3);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor-blink::after {
    content: "█";
    margin-left: 4px;
    animation: blink 1s steps(2, start) infinite;
}

/* 4. Responsive Mobile Overrides */
@media (max-width: 768px) {
    /* Prevents pixelated scanlines on high-density small phone displays */
    .crt-scanlines::after {
        background-size: 100% 3px, 3px 100%;
        opacity: 0.8;
    }

    /* Stacks legacy flex layout models on mobile displays */
    .main-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .field-feed-box {
        width: 100%; 
        margin-bottom: 20px;
    }

    /* Remediation logic for overlapping bottom footer components */
    .bottom-info-grid {
        display: block;
        position: relative;
    }
}

/* Persistent Header Custom Background Image Rule */
.banner-backdrop {
    background-image: 
        linear-gradient(rgba(10, 7, 2, 0.85), rgba(10, 7, 2, 0.85)), 
        url('your-background-image.png'); /* Replace with your image filename */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(245, 158, 11, 0.4); /* Matches terminal accent border */
    padding-top: 1rem;
    padding-bottom: 1rem;
}