@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-dark: #050505;
    --bg-panel: #0d0d0d;
    --blood-red: #cc0000;
    --terminal-green: #00ff41;
    --text-primary: #e0e0e0;
    --text-muted: #555555;
    --border-sterile: 1px solid rgba(255, 255, 255, 0.1);
    --tape-color: rgba(255, 255, 230, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: crosshair;
}

/* --- SYSTEM BOOT SCREEN --- */
#boot-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-dark); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 50px; font-size: 1.2rem; color: var(--terminal-green);
    animation: fadeOut 0.5s 2.5s forwards; pointer-events: none;
}
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* --- CINEMATIC CRT & SCANLINES --- */
.crt::before {
    content: " "; display: block; position: fixed; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 100; background-size: 100% 2px, 3px 100%; pointer-events: none;
}
.vignette {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    box-shadow: inset 0 0 200px rgba(0,0,0,0.9); z-index: 99; pointer-events: none;
}

/* --- REC OVERLAY --- */
.rec-indicator {
    position: fixed; top: 30px; right: 40px; z-index: 101; color: var(--blood-red);
    font-family: 'Space Mono', monospace; font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; gap: 10px;
}
.rec-indicator span {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--blood-red);
    animation: blink 1s infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.container { max-width: 1300px; margin: 0 auto; padding: 80px 20px 100px 20px; position: relative; z-index: 10; }

/* --- HERO: THE DOSSIER --- */
.hero-dossier {
    border: var(--border-sterile); border-top: 4px solid var(--blood-red);
    background: radial-gradient(circle at 50% 0%, rgba(204, 0, 0, 0.05) 0%, transparent 70%);
    padding: 50px; margin-bottom: 60px; position: relative; overflow: hidden;
}

/* Background SVGs in Hero */
.bg-graphic { position: absolute; opacity: 0.05; pointer-events: none; }
.bg-topo { top: -50px; right: -50px; width: 600px; }
.bg-fingerprint { bottom: -20px; left: -20px; width: 300px; transform: rotate(-15deg); }

.hero-dossier h1 {
    font-family: 'Cinzel', serif; font-size: 5rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 5px; line-height: 1; margin-bottom: 20px; color: #fff;
    text-shadow: 0 0 10px rgba(255,0,0,0.3);
}

.classified-meta { display: flex; gap: 30px; color: var(--blood-red); font-weight: 700; font-size: 0.9rem; margin-bottom: 40px; }

.decrypt-text {
    background-color: var(--text-primary); color: var(--text-primary);
    padding: 2px 8px; cursor: crosshair; display: inline-block;
}

/* --- THE EVIDENCE BOARD --- */
.section-title {
    font-family: 'Cinzel', serif; font-size: 2.2rem; color: #fff;
    border-left: 5px solid var(--blood-red); padding-left: 15px; margin-bottom: 50px; letter-spacing: 3px;
}

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 40px; }

/* Messy Desk Polaroid Effect */
.case-file {
    background: var(--bg-panel); padding: 20px; padding-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05); position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); transform-style: preserve-3d;
}
.case-file:nth-child(odd) { transform: rotate(-1deg); }
.case-file:nth-child(even) { transform: rotate(1.5deg); }

/* Masking Tape */
.tape {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg);
    width: 120px; height: 30px; background-color: var(--tape-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.8); z-index: 10; backdrop-filter: blur(4px); border-radius: 2px;
}

.media-evidence {
    width: 100%; height: 240px; background: #000; margin-bottom: 20px;
    position: relative; overflow: hidden; filter: grayscale(100%) contrast(150%);
    transition: filter 0.5s ease; border: 1px solid #222; transform: translateZ(20px);
}
.case-file:hover .media-evidence { filter: grayscale(0%) contrast(100%); }
.media-evidence img, .media-evidence video, .media-evidence iframe { width: 100%; height: 100%; object-fit: cover; }

/* Glitch Overlay on Hover */
.media-evidence::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(204, 0, 0, 0.2); opacity: 0; transition: 0.3s; mix-blend-mode: overlay; pointer-events: none;
}
.case-file:hover .media-evidence::after { opacity: 1; animation: flash 0.1s infinite alternate; }
@keyframes flash { 0% { opacity: 0.8; } 100% { opacity: 0; } }

.stamp {
    position: absolute; top: 10px; right: 10px; color: var(--blood-red);
    border: 2px solid var(--blood-red); padding: 4px 8px; font-family: 'Courier New', Courier, monospace;
    font-weight: 900; font-size: 0.75rem; transform: rotate(12deg); z-index: 5; mix-blend-mode: screen;
}

.case-file h3 { font-family: 'Cinzel', serif; font-size: 1.4rem; margin-bottom: 10px; color: #fff; transform: translateZ(10px); }
.case-file p { font-size: 0.95rem; color: var(--text-muted); transform: translateZ(10px); }

/* --- CCR VAULT --- */
.ccr-vault {
    background: repeating-linear-gradient(45deg, #050505, #050505 10px, #0a0a0a 10px, #0a0a0a 20px);
    border: 1px solid var(--blood-red); padding: 60px; margin: 80px 0; position: relative;
    box-shadow: inset 0 0 50px rgba(204,0,0,0.1);
}
.ccr-vault::before {
    content: 'CLASSIFIED // EYES ONLY'; position: absolute; top: -14px; left: 40px;
    background: var(--bg-dark); color: var(--blood-red); padding: 0 20px; font-weight: 900; font-size: 1.2rem;
}
.ccr-vault .case-file { filter: sepia(0.2) hue-rotate(-10deg); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: var(--blood-red); }
/* --- VISUAL FRONTEND EDITOR (ELEMENTOR STYLE) --- */
.admin-mode-banner {
    position: fixed; top: 0; left: 0; width: 100%; background: var(--blood-red); color: white;
    text-align: center; font-weight: 900; font-size: 0.85rem; padding: 5px; z-index: 9999;
    letter-spacing: 2px; font-family: 'Space Mono', monospace;
}

/* Hover overlay for editable elements */
.editable-card { position: relative; }
.editable-card::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: 2px dashed transparent; pointer-events: none; transition: 0.3s; z-index: 20;
}
.editable-card:hover::after { border-color: var(--terminal-green); background: rgba(0, 255, 65, 0.05); }

.edit-btn-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background: var(--terminal-green); color: #000; padding: 15px 25px; font-weight: 900;
    border: none; cursor: pointer; opacity: 0; transition: 0.3s; z-index: 25;
    font-family: 'Space Mono', monospace; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.editable-card:hover .edit-btn-overlay { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* The Pop-up Edit Modal */
#visual-editor-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 10000;
    justify-content: center; align-items: center;
}
.modal-content {
    background: var(--bg-panel); border: 2px solid var(--terminal-green);
    width: 90%; max-width: 600px; padding: 40px; position: relative;
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.2);
}
.close-modal {
    position: absolute; top: 15px; right: 20px; color: var(--blood-red);
    font-size: 1.5rem; cursor: pointer; font-weight: bold;
}
.modal-input {
    width: 100%; padding: 12px; margin-bottom: 20px; background: #000; color: var(--text-primary);
    border: 1px solid #333; font-family: 'Space Mono', monospace; outline: none;
}
.modal-input:focus { border-color: var(--terminal-green); }
.modal-btn {
    width: 100%; padding: 15px; background: var(--terminal-green); color: #000;
    border: none; font-family: 'Space Mono', monospace; font-weight: 900; cursor: pointer; margin-bottom: 10px;
}
.modal-btn.add-new { background: var(--blood-red); color: white; width: auto; position: fixed; bottom: 30px; right: 30px; border-radius: 50%; width: 60px; height: 60px; font-size: 2rem; box-shadow: 0 10px 20px rgba(204,0,0,0.4); z-index: 9998;}
