/* SAVAGE TECH - STRATEGIC COMMAND CSS */
:root {
    --cyan: #00f2ff; /* Terminal Cyan */
    --gold: #f4c430; /* Aegis Gold */
    --red: #ff0033;  /* Violation Red */
    --bg: #010101;   /* Deep Black */
}

body, html {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: white;
    font-family: 'Courier New', monospace;
    height: 100vh;
    overflow: hidden;
}

/* OVERLAYS */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/7/76/1k_filmgrain.png');
    opacity: 0.07;
    pointer-events: none;
    z-index: 1000;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 2px 100%;
    pointer-events: none;
    z-index: 999;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 998;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    padding: 30px;
    box-sizing: border-box;
}

#wall-subtext.error-msg {
    color: var(--red) !important;
    text-shadow: 0 0 10px var(--red);
    font-weight: bold;
}

/* TERMINAL PANEL */
.terminal-panel {
    flex: 0 0 450px;
    background: var(--panel);
    border-left: 4px solid var(--gold);
    padding: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 25px 0 80px rgba(0,0,0,1);
    z-index: 100;
}

.security-tag {
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

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

    50% {
        opacity: 0.2;
    }
}

/* GLITCH TITLE */
.glitch {
    font-size: 3.5rem;
    line-height: 0.9;
    letter-spacing: 10px;
    margin: 0 0 30px 0;
}

    .glitch span {
        color: var(--gold);
        font-size: 2.2rem;
    }

/* TACTICAL NAVIGATION */
.tactical-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

    .tactical-nav button {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.1);
        color: #888;
        padding: 12px;
        font-family: inherit;
        font-size: 0.7rem;
        cursor: pointer;
        text-align: left;
        transition: 0.3s;
    }

        .tactical-nav button:hover {
            border-color: var(--gold);
            color: var(--gold);
            background: rgba(244,196,48,0.05);
        }

/* DECRYPTION HUB (SCROLLABLE) */
.decryption-hub {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .decryption-hub::-webkit-scrollbar {
        width: 3px;
    }

    .decryption-hub::-webkit-scrollbar-thumb {
        background: var(--gold);
    }

.terminal-output {
    font-size: 1rem;
    line-height: 1.8;
    color: #ccc;
    font-style: italic;
}

    .terminal-output::after {
        content: "_";
        animation: blink 1s infinite;
        color: var(--gold);
    }

/* ACTION MODULE */
.action-module {
    padding-top: 30px;
}

.system-status {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.gold {
    color: var(--gold);
}


.init-btn {
    width: 100%;
    padding: 18px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 3px;
    transition: 0.3s;
}

    .init-btn:hover {
        background: var(--cyan);
        color: black;
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    }


.init-btn.language-uplink {
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 13.3333px;
}

.archive-link {
    display: block;
    margin-top: 10px;
    color: var(--cyan);
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
}
/* VISUAL PANEL (RIGHT) */
.visual-panel {
    flex: 1;
    position: relative;
}

.window {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 100px rgba(0,0,0,1);
}

/* Asymmetrical Layout */
.frame-portrait {
    width: 320px;
    height: 480px;
    left: 10%;
    top: 12%;
    z-index: 10;
}

.frame-square {
    width: 380px;
    height: 380px;
    right: 8%;
    top: 5%;
    z-index: 5;
}

.frame-landscape {
    width: 500px;
    height: 350px;
    right: 15%;
    bottom: 10%;
    z-index: 15;
}

/* Update the Overlay Tag to be that sharp "FCN Blue" */
.overlay-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
    background: rgba(0, 229, 255, 0.1);
    color: var(--cyan);
    padding: 6px 15px;
    font-size: 0.7rem;
    font-weight: bold;
    border: 1px solid var(--cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--cyan);
    backdrop-filter: blur(5px);
    text-transform: uppercase;
}

/* Add a scanner glow effect */
.scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gold);
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold);
    z-index: 50;
    filter: brightness(1.5);
}

/* Ensure the terminal hub feels deep and industrial */
.decryption-hub {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px 0;
    margin: 15px 0;
    border-top: 1px solid rgba(244, 196, 48, 0.2);
    border-bottom: 1px solid rgba(244, 196, 48, 0.2);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.slideshow-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    /* 1. Reset the foundation and force box-sizing */
    * {
        box-sizing: border-box !important;
    }

    body, html {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }

    .app-container {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh;
        padding: 10px !important; /* Reduced padding to prevent cutoff */
        overflow-x: hidden !important;
    }

    /* 2. Fix the Terminal (Top half) - THE CUTOFF REPAIR */
    .terminal-panel {
        width: 98% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 30px;
        padding: 15px !important; /* Internal spacing */
        border-right: none !important;
        border-bottom: 2px solid var(--gold);
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure the button grid fits within the 100% width */
    .nav-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* 2 buttons per row */
        gap: 10px !important;
        width: 100% !important;
    }

    .nav-btn {
        width: 100% !important;
        font-size: 0.75rem !important; /* Smaller text for mobile fit */
        padding: 10px 5px !important;
    }

    .glitch {
        font-size: 1.8rem !important; /* Shrink title to fit mobile */
        text-align: center;
    }

    /* 3. Fix the Visuals (Bottom half) */
    .visual-panel {
        display: flex !important;
        flex-direction: column !important; 
        align-items: center !important;    
        height: auto !important;           
        width: 100% !important;
        position: relative !important;
        gap: 40px;                         
        padding-bottom: 50px;
    }

    /* 4. Reset all image frames to stack vertically */
    .frame-portrait, .frame-square, .frame-landscape {
        position: relative !important; 
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 auto !important;    
        max-width: 95% !important;     
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
    }

    /* 5. Set appropriate mobile sizes */
    .frame-portrait { width: 300px; height: 450px; }
    .frame-square   { width: 300px; height: 300px; }
    .frame-landscape { width: 340px; height: 240px; }
}





/* FULL SCREEN SECURITY WALL */
#security-wall {
    display: none;         /* JavaScript toggles this to 'flex' */
    position: fixed;       /* THIS IS CRITICAL: It floats over the layout */
    top: 0;
    left: 0;
    width: 100vw;          /* Full width of the viewport */
    height: 100vh;         /* Full height of the viewport */
    background: #000;      /* Pure black */
    color: #ff0000;
    z-index: 999999;       /* Ensures it is on top of EVERYTHING */
    
    /* Centers the warning text exactly in the middle */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 20px;
}

/* Ensure the text inside looks like a real warning */
.alert-text {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 5px;
    margin-bottom: 20px;
    border: 2px solid #ff0000;
    padding: 20px;
    background: black;
}

/* --- VOX UPLINK / BACK DOOR STYLING --- */

.back-door-btn {
    display: block;
    margin: 40px auto 20px auto; /* Adds significant spacing below the status text */
    padding: 15px 30px;
    background: rgba(244, 196, 48, 0.05);
    color: var(--gold);
    border: 1px solid var(--gold);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(244, 196, 48, 0.2);
    z-index: 1000000; /* Ensures it sits above the video/art */
}

.back-door-btn:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 30px var(--gold);
    transform: scale(1.05);
}

/* Optional: Subtle flicker animation for the back door */
.back-door-btn {
    animation: button-glitch 4s infinite;
}

@keyframes button-glitch {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.5; border-color: var(--cyan); color: var(--cyan); }
    94% { opacity: 0.8; }
}