:root {
    --bg-color: #050505;
    --text-primary: #00ff41; /* Verde Hacker */
    --text-secondary: #00b8ff; /* Azul Policia Futuro */
    --alert: #ff3333;
    --panel-bg: rgba(0, 15, 20, 0.95);
    --border: 1px solid var(--text-secondary);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 20px;
    background-image: radial-gradient(circle, #0a1f2b 0%, #000000 100%);
}

h1, h2, h3 { text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-top: 0; }

/* Formularios y Botones */
input, textarea, select {
    background: #000;
    border: 1px solid #334455;
    color: #fff;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    font-family: inherit;
    box-sizing: border-box;
}
input:focus { border-color: var(--text-secondary); outline: none; }

button {
    background: rgba(0, 184, 255, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
    width: 100%;
}
button:hover { background: var(--text-secondary); color: #000; box-shadow: 0 0 15px var(--text-secondary); }

/* Contenedores */
.container { max-width: 1200px; margin: 0 auto; display: grid; gap: 20px; }
.panel {
    border: 1px solid var(--text-secondary);
    padding: 20px;
    background: var(--panel-bg);
    box-shadow: 0 0 10px rgba(0, 184, 255, 0.1);
    margin-bottom: 20px;
    position: relative;
}

/* EFECTO DE ESCANEO (Animación de carga) */
.scan-effect {
    position: relative;
    overflow: hidden;
}
.scan-effect::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to bottom, #000 0%, rgba(0, 255, 65, 0.1) 50%, transparent 100%);
    animation: scanline 2.5s ease-out forwards;
    background-color: #000; /* Empieza tapando todo */
}

@keyframes scanline {
    0% { height: 100%; top: 0; opacity: 1; }
    90% { height: 0%; top: 100%; opacity: 0.5; }
    100% { height: 0%; top: 100%; opacity: 0; display: none;}
}

/* Ficha Policial */
.ficha-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.foto-evidence { width: 100%; height: 150px; object-fit: cover; border: 1px solid var(--text-secondary); filter: sepia(100%) hue-rotate(180deg) saturate(200%); }

/* Noticias */
.newspaper { 
    background: #dcdcdc; 
    color: #111; 
    padding: 20px; 
    font-family: 'Times New Roman', serif; 
    border: 5px double #000;
}
.newspaper h1 { color: #000; text-align: center; font-size: 2.5em; border-bottom: 2px solid #000; margin-bottom: 10px; }

/* Utilidades */
.alert-box { color: var(--alert); border: 1px solid var(--alert); padding: 10px; text-align: center; margin-top: 10px; font-weight: bold; }
.intel-msg { border-left: 3px solid #ffaa00; background: rgba(50,30,0,0.5); padding: 10px; margin-bottom: 5px; color: #ffcc00; }
.log-item { border-bottom: 1px solid #222; padding: 5px 0; font-size: 0.9em; }

@media (max-width: 768px) { .ficha-grid { grid-template-columns: 1fr; } }







:root {
    --bg-color: #050505;
    --text-primary: #00ff41; 
    --text-secondary: #00b8ff;
    --alert: #ff3333;
    --panel-bg: rgba(0, 15, 20, 0.95);
    --border: 1px solid var(--text-secondary);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 20px;
    background-image: radial-gradient(circle, #0a1f2b 0%, #000000 100%);
}

h1, h2, h3 { text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-top: 0; }
a { color: var(--text-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Formularios */
input, textarea, select {
    background: #000;
    border: 1px solid #334455;
    color: #fff;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    font-family: inherit;
    box-sizing: border-box;
}
input:focus { border-color: var(--text-secondary); outline: none; }

button {
    background: rgba(0, 184, 255, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
    width: 100%;
}
button:hover { background: var(--text-secondary); color: #000; box-shadow: 0 0 15px var(--text-secondary); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; display: grid; gap: 20px; }
.panel {
    border: 1px solid var(--text-secondary);
    padding: 20px;
    background: var(--panel-bg);
    box-shadow: 0 0 10px rgba(0, 184, 255, 0.1);
    margin-bottom: 20px;
}

/* Tablas de Admin */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-table th, .admin-table td { border: 1px solid #333; padding: 8px; text-align: left; font-size: 0.9em; }
.admin-table th { background: #112233; color: #fff; }
.admin-table img { height: 40px; }

/* Efectos Detective */
.scan-effect { position: relative; overflow: hidden; animation: fadeIn 0.5s ease-out; }
.scan-effect::after {
    content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%;
    background: linear-gradient(to bottom, #000 0%, rgba(0, 255, 65, 0.1) 50%, transparent 100%);
    animation: scanline 2.5s ease-out forwards; background-color: #000;
}
@keyframes scanline { 0% { height: 100%; top: 0; opacity: 1; } 100% { height: 0%; top: 100%; opacity: 0; display: none;} }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Elementos Visuales */
.ficha-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.foto-evidence { width: 100%; height: 150px; object-fit: cover; border: 1px solid var(--text-secondary); filter: sepia(100%) hue-rotate(180deg) saturate(200%); }
.newspaper { background: #dcdcdc; color: #111; padding: 20px; font-family: 'Times New Roman', serif; border: 5px double #000; }
.newspaper h1 { color: #000; text-align: center; font-size: 2.5em; border-bottom: 2px solid #000; margin-bottom: 10px; }
.intel-msg { border-left: 3px solid #ffaa00; background: rgba(50,30,0,0.5); padding: 10px; margin-bottom: 5px; color: #ffcc00; }
.log-item { border-bottom: 1px solid #222; padding: 5px 0; font-size: 0.9em; }

@media (max-width: 768px) {
    .ficha-grid { grid-template-columns: 1fr; } .container{ grid-template-columns: 1fr !important;}
    .foto-evidence { width: 24%; height: auto; margin-left: 38%;}
}


/* ... MANTÉN TODO LO QUE TENÍAS ANTES Y AGREGA ESTO AL FINAL ... */

/* Estilo para datos compartidos por el Admin */
.shared-data-box {
    border: 1px solid #00ff41;
    background: rgba(0, 50, 0, 0.8);
    padding: 10px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    position: relative;
}
.shared-data-box::before {
    content: "TRANSFERENCIA DE DATOS:";
    display: block;
    font-size: 0.7em;
    color: #00ff41;
    margin-bottom: 5px;
    border-bottom: 1px dashed #00ff41;
}
.shared-img { width: 100%; max-height: 200px; object-fit: contain; border: 1px solid #333; }

/* Botones pequeños para el Admin */
.btn-share {
    background: #004466;
    color: cyan;
    border: 1px solid cyan;
    padding: 5px 10px;
    font-size: 0.8em;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 5px;
}
.btn-share:hover { background: cyan; color: black; }

/* Grid para el Admin Search */
.admin-result-card {
    background: #111;
    border: 1px solid #444;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
}

/* --- PANTALLAS DE FINAL (VICTORIA / DERROTA) --- */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ESTILO VICTORIA: CASO CERRADO */
.victory-bg {
    background-color: #050505;
    background-image: radial-gradient(circle, #003300 0%, #000000 90%);
    color: #00ff41;
    font-family: 'Courier New', monospace;
}
.stamp-box {
    border: 5px solid #00ff41;
    padding: 20px 40px;
    font-size: 3em;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-5deg);
    animation: stamp-fall 0.5s cubic-bezier(0.6, 0.04, 0.98, 0.335) forwards;
    opacity: 0;
    box-shadow: 0 0 20px #00ff41, inset 0 0 20px #00ff41;
}
@keyframes stamp-fall {
    0% { transform: scale(3) rotate(0deg); opacity: 0; }
    100% { transform: scale(1) rotate(-5deg); opacity: 1; }
}

/* ESTILO DERROTA: PERIODICO ESCANDALO */
.defeat-bg {
    background-color: #e0d8c0; /* Color papel viejo */
    color: #1a1a1a;
    font-family: 'Times New Roman', serif;
}
.headline-box {
    border-top: 5px double #000;
    border-bottom: 5px double #000;
    margin: 20px 0;
    padding: 20px 0;
    width: 90%;
    max-width: 800px;
}
.headline-title {
    font-size: 4em;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -2px;
}
.sub-headline {
    font-style: italic;
    font-size: 1.5em;
    margin-top: 10px;
}




/* --- PANTALLAS DE FINAL (VICTORIA / DERROTA) --- */

/* Contenedor que cubre toda la pantalla */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* Asegura que esté encima de todo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    box-sizing: border-box;
}

/* ==============================
   ESTILO VICTORIA (CASO CERRADO)
   ============================== */
.victory-bg {
    background-color: #050505;
    /* Un degradado sutil verde oscuro */
    background-image: radial-gradient(circle, #002200 0%, #000000 80%);
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
}

.victory-bg h2 {
    font-size: 2.5em;
    text-shadow: 0 0 10px #00ff41;
}

/* El Sello de CASO CERRADO */
.stamp-box {
    border: 5px solid #00ff41;
    color: #00ff41;
    padding: 20px 40px;
    font-size: 4em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    
    /* Inicia invisible y grande */
    opacity: 0;
    transform: scale(3) rotate(0deg);
    
    /* Animación de golpe */
    animation: stamp-fall 0.6s cubic-bezier(0.6, 0.04, 0.98, 0.335) forwards;
    
    /* Efecto de tinta corrida (opcional) */
    mask-image: url('https://upload.wikimedia.org/wikipedia/commons/3/3a/Grunge-texture.png'); 
    -webkit-mask-image: url('https://upload.wikimedia.org/wikipedia/commons/3/3a/Grunge-texture.png');
    mask-size: cover;
}

@keyframes stamp-fall {
    0% { opacity: 0; transform: scale(3) rotate(10deg); }
    70% { opacity: 1; transform: scale(0.9) rotate(-5deg); } /* Rebote */
    100% { opacity: 1; transform: scale(1) rotate(-3deg); border-color: #00ff41; box-shadow: 0 0 30px #00ff41, inset 0 0 30px #00ff41; }
}

/* ==============================
   ESTILO DERROTA (PERIÓDICO)
   ============================== */
.defeat-bg {
    background-color: #e8dfc5; /* Color papel viejo beige */
    color: #1a1a1a;
    font-family: 'Times New Roman', serif;
    /* Un patrón de ruido para simular papel viejo */
    background-image: url('https://www.transparenttextures.com/patterns/dust.png'); 
}

/* Cabecera del periódico */
.headline-box {
    border-top: 4px double #111;
    border-bottom: 4px double #111;
    margin: 30px 0;
    padding: 20px 0;
    width: 100%;
    max-width: 900px;
    background: transparent;
}

.headline-title {
    font-size: 5em;
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 10px;
    color: #111;
}

.sub-headline {
    font-style: italic;
    font-size: 1.8em;
    color: #444;
}

/* Texto de la noticia */
.defeat-bg .news-content {
    column-count: 2; /* Divide el texto en 2 columnas como diario real */
    column-gap: 40px;
    column-rule: 1px solid #aaa;
    text-align: justify;
    max-width: 800px;
    font-size: 1.2em;
    line-height: 1.5;
}

/* En móviles, que sea una sola columna */
@media (max-width: 768px) {
    .headline-title { font-size: 3em; }
    .stamp-box { font-size: 2em; }
    .defeat-bg .news-content { column-count: 1; }
}