/* --- GALAXY MARAUDER: GHOST PATH EDITION --- */
body {
    background-color: #000000;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.3) 1px, transparent 30px),
        url('bg_tile_stars.jpg');
    background-repeat: repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

.twinkling {
    animation: twinkle 5s infinite ease-in-out;
}

body.disconnected {
    animation: none !important;
    background-color: #000000 !important;
    background-image: none !important;
    overflow: hidden !important;
}

::-webkit-scrollbar { 
    width: 15px; 
} 
::-webkit-scrollbar-track { 
    background: #000000; 
    box-shadow: inset 0 0 0 1px #c5a687; 
}
::-webkit-scrollbar-thumb { 
    background: #c5a687; 
    border: 2px solid #000000;
}

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

@keyframes sparkle-shimmer {
    0% { 
        border-color: #ffd700; 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); 
    }
    100% { 
        border-color: #ffffff; 
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.8); 
    }
}

.panel {
    background-color: rgba(197, 166, 133, 0.7);
    color: #000000;
    padding: 15px;
    margin-bottom: 20px;
    border: 3px solid #ffd700;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    animation: sparkle-shimmer 2s infinite alternate ease-in-out;
}

.panel h2 { 
    background: #000080; 
    color: #ffff00; 
    text-align: center; 
    border: 3px outset #ffffff; 
    margin-top: 0;
}

a:link, a:visited { 
    color: #8b0000; 
    font-weight: bold; 
}

/* 3D CORE VIEWPORT SETUP FIXED */
#architect-chamber {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    display: none;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    background: radial-gradient(circle at center, rgba(5,20,5,0.2) 0%, rgba(0,0,0,1) 100%);
    opacity: 0;
    transform: scale(3.5) translateZ(-2500px) rotateX(45deg);
    transition: opacity 1.8s ease-in, transform 2.4s cubic-bezier(0.7, 0, 0.15, 1);
    cursor: grab;
}

#architect-chamber.stabilized {
    opacity: 1;
    transform: scale(1) translateZ(0px) rotateX(0deg);
}

.pan-rig {
    position: relative;
    width: 0; height: 0;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    transform: rotateX(0deg) rotateY(0deg);
}

/* Precise Monitor Dimensions mapping matrix cells */
.monitor-wrapper {
    position: absolute;
    width: 160px; height: 120px;
    left: -80px; top: -60px;
    transform-style: preserve-3d !important;
}

/* --- THE SCREENS INNER LAYERING REPAIR SYSTEM --- */
.monitor-cell {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    top: 0; left: 0;
    background: #000000 !important;
    
    /* BEZEL MASK LAYER: The heavy board borders are now set to stay 
       at the top foreground of each individual television housing block */
    border: 6px solid #282a29 !important;
    border-top-color: #383a39 !important;
    border-bottom-color: #181919 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: inset 0 0 20px rgba(0,255,0,0.3) !important;
    transform: translateZ(0px) !important;
    z-index: 2;
    backface-visibility: hidden;
}

/* Forces glare maps to render over flowing characters */
.monitor-cell::before {
    content: " "; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 4; pointer-events: none;
}

/* Forces scanlines to sit beautifully on top of the text */
.monitor-cell::after {
    content: " "; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(16, 16, 16, 0) 40%, rgba(0, 0, 0, 0.55) 60%);
    background-size: 100% 3px; z-index: 5; pointer-events: none;
}

/* This pushes the actual running animation canvas back into the display screen capsule recess */
.tv-matrix-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important; /* Pushed to the baseline beneath bezel margins */
}

.monitor-back {
    position: absolute;
    width: 154px; height: 114px; top: 3px; left: 3px;
    background: #191b1a !important;
    border: 2px solid #111212 !important;
    border-radius: 8px !important;
    transform: translateZ(-10px) rotateY(180deg) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9) !important;
    backface-visibility: hidden;
}

/* UNIFIED MULTI-COCKPIT WORKSPACES */
.hud-body { 
    padding: 15px; 
    background: #000000 !important; 
    overflow: hidden; 
}
.media-row { 
    display: flex; 
    flex-direction: row; 
    gap: 15px; 
}

.terminal-screen-box { 
    flex: 1; 
    aspect-ratio: 16 / 9; 
    border: 6px solid #1c1e1d !important; 
    background: #000000 !important; 
    border-radius: 8px; 
    overflow: hidden; 
}

.terminal-screen-box iframe { 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: #000000 !important; 
    user-select: none !important;
}
