/* --- GHOST SIGNAL | CORE UI v6.0 (MATRIX STABLE) --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&family=Orbitron:wght@400;700&display=swap');

* { box-sizing: border-box; }

:root {
    /* DEFAULT ORANGE THEME */
    --orange: #FF5500;
    --orange-glow: rgba(255, 85, 0, 0.3);
    --border: rgba(255, 85, 0, 0.25);
    --bg: #111111;
    --panel-bg: #1A1A1A;
}

/* THE CYAN THEME OVERRIDE */
body.theme-cyan {
    --orange: #00F2FF;
    --orange-glow: rgba(0, 242, 255, 0.3);
    --border: rgba(0, 242, 255, 0.25);
    --bg: #010204;
    --panel-bg: rgba(6, 11, 18, 0.9);
}

html, body {
    margin: 0; padding: 0;
    height: 100vh; width: 100%;
    background: var(--bg);
    background-image: 
        radial-gradient(circle at 50% 50%, #222 0%, #111 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 2px);
    background-size: cover, 100% 3px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: background-color 0.5s ease;
}

/* --- HEADER --- */
.system-header {
    height: 80px; min-height: 80px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    z-index: 5000;
}

.site-title {
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.4rem;
    color: var(--orange); text-shadow: 0 0 15px var(--orange-glow);
    cursor: pointer; animation: text-flicker 4s infinite;
}

.tagline {
    font-weight: 300; font-size: .9rem; letter-spacing: 2px; 
    margin-left: 12px; opacity: 0.6; color: #fff; display: inline-block;
}

.nav-trigger { 
    display: none; color: var(--orange); cursor: pointer; 
    font-family: 'Orbitron'; font-weight: 700; letter-spacing: 2px; 
    padding: 10px; border: 1px solid var(--border);
}

/* --- MAIN LAYOUT --- */
.console-wrapper {
    display: grid; grid-template-columns: 320px 1fr 300px;
    flex: 1; overflow: hidden; gap: 1px;
}

.hud-panel {
    background: var(--panel-bg); backdrop-filter: blur(15px);
    padding: 25px; display: flex; flex-direction: column; 
    position: relative; overflow-y: auto; transition: background-color 0.5s ease;
}

#left-sidebar { border-right: 1px solid var(--border); }
#right-sidebar { border-left: 1px solid var(--border); }

/* --- TYPOGRAPHY & LISTS --- */
#vault-title {
    font-weight: 700; font-size: 0.75rem; color: var(--orange);
    margin-bottom: 20px; letter-spacing: 3px; text-transform: uppercase;
    cursor: pointer;
}

.section-label {
    font-size: 0.65rem; font-weight: 700; color: var(--orange);
    letter-spacing: 2px; margin-bottom: 15px; border-bottom: 1px dashed var(--border);
    padding-bottom: 5px;
}

.vault-container { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--orange) transparent; }
.vault-item { 
    padding: 15px 10px; font-size: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); 
    cursor: pointer; transition: 0.2s; line-height: 1.4;
}
.vault-item:hover { background: var(--orange-glow); color: var(--orange); padding-left: 15px; }

/* DHR FOLDERS */
.accordion-folder {
    border: 1px solid var(--border); margin-bottom: 8px;
    background: rgba(255,255,255,0.02); font-size: 0.8rem;
    padding: 12px; cursor: pointer; color: var(--orange);
    font-family: 'Orbitron'; transition: 0.3s;
}
.accordion-folder:hover { background: var(--orange-glow); }
.episode-list { display: none; flex-direction: column; padding-left: 10px; margin-bottom: 10px; border-left: 1px solid var(--border); }

/* --- READ ARTICLE STATE --- */
.read-article {
    opacity: 0.45; border-color: rgba(255, 255, 255, 0.05) !important; filter: grayscale(100%);
}
.read-article:hover { opacity: 0.8; filter: grayscale(0%); }

/* --- BUTTONS & INPUTS --- */
.action-btn {
    border: 1px solid var(--orange); color: var(--orange); background: transparent;
    padding: 12px; text-align: center; font-size: 0.7rem; font-weight: 700;
    cursor: pointer; transition: 0.2s; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 10px; font-family: 'Montserrat', sans-serif;
}
.action-btn:hover { background: var(--orange); color: #000; box-shadow: 0 0 15px var(--orange-glow); }

.terminal-input {
    width: 100%; padding: 15px; background: #000; border: 1px solid var(--orange);
    color: var(--orange); font-family: 'Orbitron', sans-serif; font-size: 0.9rem;
    margin-bottom: 15px; outline: none; transition: 0.3s;
}
.terminal-input:focus { box-shadow: 0 0 15px var(--orange-glow); }
.terminal-input::placeholder { color: var(--orange); opacity: 0.4; }

/* --- ESCAPE HATCH BUTTON --- */
.sticky-back-btn {
    position: sticky; top: -5px; 
    background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(5px);
    border: 1px solid var(--orange); color: var(--orange);
    padding: 15px; text-align: center; font-weight: 700; font-size: 0.75rem;
    cursor: pointer; z-index: 100; margin-bottom: 20px; letter-spacing: 2px;
    transition: 0.2s; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.sticky-back-btn:hover { background: var(--orange); color: #000; box-shadow: 0 0 15px var(--orange-glow); }

.system-logs {
    margin-top: 20px; font-size: 0.65rem; letter-spacing: 1px;
    padding-top: 15px; border-top: 1px dashed var(--border);
    line-height: 1.6; color: var(--orange); font-family: 'Orbitron';
}

/* --- VISUALIZER --- */
.visualizer { display: flex; gap: 6px; height: 40px; justify-content: center; margin-bottom: 30px; }
.v-bar { width: 4px; background: var(--orange); box-shadow: 0 0 10px var(--orange-glow); animation: data-bounce 1s infinite; }

/* --- FOOTER --- */
.footer-module { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border); text-align: center; }
.copyright { font-size: 0.65rem; letter-spacing: 2px; line-height: 1.6; opacity: 0.5; }

/* --- OVERLAY --- */
.overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(10px);
    z-index: 6000; justify-content: center; align-items: center; padding: 20px;
}
.overlay-content {
    background: var(--panel-bg); border: 1px solid var(--orange);
    padding: 30px; max-width: 600px; width: 100%; box-shadow: 0 0 30px var(--orange-glow);
}

/* --- ANIMATIONS --- */
@keyframes data-bounce { 0%, 100% { height: 10px; opacity: 0.3; } 50% { height: 100%; opacity: 1; } }
@keyframes text-flicker { 0%, 2%, 4%, 70%, 74%, 100% { opacity: 1; } 72% { opacity: 0.2; } }

/* --- MOBILE DUAL-DRAWER ENGINE --- */
@media (max-width: 1024px) {
    .system-header { padding: 0 15px; height: 60px; min-height: 60px; }
    
    .site-title { font-size: 1.5rem; text-align: center; }
    .tagline { display: none; }
    .nav-trigger { display: block; width: 65px; text-align: center; } 

    .console-wrapper { display: block; position: relative; }
    
    .nav-computer { 
        position: fixed; top: 60px; left: -320px; width: 320px; height: calc(100vh - 60px); 
        z-index: 4000; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        border-right: 1px solid var(--orange); box-shadow: 10px 0 20px rgba(0,0,0,0.8);
    }
    
    .system-hub { 
        position: fixed; top: 60px; right: -300px; width: 300px; height: calc(100vh - 60px); 
        z-index: 4000; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        border-left: 1px solid var(--orange); box-shadow: -10px 0 20px rgba(0,0,0,0.8);
    }
    
    body.nav-open .nav-computer { left: 0; }
    body.hub-open .system-hub { right: 0; }
    
    .content-terminal { width: 100%; height: calc(100vh - 60px); padding: 30px 20px; text-align: center; overflow-y: auto; }
}
