/* --- Core Layout --- */
body {
    background-color: #000000;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 60px 20px;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents watermark from causing side-scroll */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2; /* Keeps text above the watermark */
}

/* --- Watermark Effect --- */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 12vw; /* Scales with screen width */
    color: rgba(0, 255, 0, 0.05); /* Very faint green */
    font-weight: bold;
    letter-spacing: 20px;
    z-index: 1;
    pointer-events: none; /* Allows you to click links through it */
    white-space: nowrap;
}

/* --- Typography --- */
h1 {
    font-size: 2.5rem;
    letter-spacing: 8px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 10px;
    display: inline-block;
}

.status {
    font-weight: bold;
    margin-top: 5px;
}

.report {
    margin: 40px 0;
    border-left: 1px solid #004400;
    padding-left: 20px;
}

/* --- Redacted (Ink Block) --- */
.redacted {
    background-color: #00ff00; /* Solid ink look */
    color: #00ff00;            /* Text matches background to hide */
    padding: 0 2px;
    transition: color 0.2s ease;
    cursor: crosshair;
}

.redacted:hover {
    color: #000000; /* Text appears in black when hovered */
}

/* --- Navigation Links --- */
nav ul {
    list-style: none;
    padding: 0;
}

nav li {
    margin: 15px 0;
}

a {
    color: #00ff00;
    text-decoration: none;
    padding: 5px;
}

a:before {
    content: "[ ";
}

a:after {
    content: " ]";
}

a:hover {
    background-color: #00ff00;
    color: #000000;
}

footer {
    margin-top: 60px;
    font-size: 0.8rem;
    opacity: 0.6;
    border-top: 1px solid #004400;
    padding-top: 20px;
}

/* --- Scanline Overlay --- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    /* This creates a repeating 4px pattern of lines */
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), 
    linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.02), 
        rgba(0, 255, 0, 0.01), 
        rgba(0, 0, 255, 0.02)
    );
    z-index: 10; /* Sits on top of everything */
    background-size: 100% 4px, 3px 100%;
    pointer-events: none; /* Crucial: lets you click things underneath */
}

/* --- Screen Flicker & Jitter --- */

/* 1. Subtle brightness flicker */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    15% { opacity: 0.98; }
    30% { opacity: 0.95; }
    50% { opacity: 0.92; }
    80% { opacity: 0.99; }
    100% { opacity: 0.96; }
}

/* --- Refined Glitch: Rare and Sharp --- */
@keyframes glitch {
    0% { transform: translate(0); }
    0.5% { transform: translate(-3px, 1px); } /* Sudden jump */
    1% { transform: translate(3px, -1px); }   /* Sudden snap back */
    1.5% { transform: translate(0); }         /* Back to normal */
    100% { transform: translate(0); }        /* Long pause of stability */
}

.container {
    /* 10s makes it feel more 'random' and less repetitive */
    animation: glitch 10s infinite;
}

body {
    /* Applies the flicker constantly */
    animation: flicker 0.15s infinite;
}

.container {
    /* Applies a quick shake every 5 seconds */
    animation: glitch 5s infinite;
}

/* --- Login Screen Overlay --- */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center; /* Centers the box horizontally */
    align-items: center;     /* Centers the box vertically */
    transition: opacity 0.5s ease;
}

#terminal {
    /* FIX THE WIDTH: This stops the 'jumping' */
    width: 320px; 
    
    text-align: left;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    
    /* That vertical line you like */
    border-left: 2px solid #004400;
    padding-left: 15px;
    margin: 0;
}

/* Ensure the typewriter span itself has no hidden margin */
#typewriter {
    margin: 0;
    padding: 0;
}

/* --- Blinking Cursor --- */
.cursor {
    display: inline-block;
    background-color: #00ff00;
    width: 10px;
    height: 1.2rem;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

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

.scanner {
    font-size: 0.75rem;
    color: rgba(0, 255, 0, 0.5); /* Slightly dimmer green */
    letter-spacing: 2px;
    margin-top: 10px;
}

#coordinates {
    font-weight: bold;
    color: #00ff00; /* Bright green for the numbers */
}

.command-line {
    margin-top: 40px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: #00ff00;
}

.prompt {
    color: #888; /* Dimmer color for the prompt */
    margin-right: 10px;
}

/* Make the cursor blink just like the splash screen */
.command-line .cursor {
    animation: blink 0.8s infinite;
}

.security-banner {
    display: none; /* Keep it hidden initially */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #002200;
    color: #00ff00;
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 5px;
    padding: 4px 0;
    z-index: 10000;
    text-transform: uppercase;
    border-bottom: 1px solid #00ff00;
}

/* --- Mobile Specific Fixes --- */
@media (max-width: 480px) {
    body {
        padding: 40px 10px; /* Reduces side padding to give text more room */
    }

    h1 {
        font-size: 1.5rem;   /* Shrinks header size */
        letter-spacing: 2px; /* Tightens letters so they don't push the screen wide */
        display: block;      /* Ensures it doesn't try to sit next to other elements */
    }

    .security-banner {
        font-size: 0.5rem;   /* Shrinks the Top Secret bar */
        letter-spacing: 2px;
    }

    #terminal {
        width: 100%;         /* Stops the terminal from being a fixed 320px */
        padding-left: 10px;
    }

    .watermark {
        font-size: 20vw;     /* Makes the watermark bigger so it's still legible */
        letter-spacing: 5px;
    }
}

/* --- Case File Styles --- */

/* Grainy, military-spec imagery */
.case-image {
    width: 100%;
    max-width: 500px;
    border: 1px solid #00ff00;
    filter: grayscale(1) contrast(1.2) brightness(0.8);
    margin: 20px 0;
    opacity: 0.8;
}

/* Technical Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9em;
    border: 1px solid #004400;
}

.data-table td {
    border: 1px solid #004400;
    padding: 8px;
}

/* Green highlight for key data points */
.highlight { 
    color: #00ff00; 
    font-weight: bold; 
}

/* --- Secure Contact Layout --- */
.contact-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 50vh;
}

.large-text {
    /* Fluid font size for mobile safety */
    font-size: clamp(1.2rem, 6vw, 2.5rem);
    letter-spacing: 2px;
    margin: 20px 0;
    white-space: nowrap; 
}

/* The Bot-Bunker Trick */
.reverse-email {
    unicode-bidi: bidi-override;
    direction: rtl;
}