@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Permanent+Marker&family=Special+Elite&display=swap');

:root {
    --bg-wall: #121212;
    --string-red: #d63031;
    --paper-manila: #fdf5e6;
    --ink-black: #1a1a1a;
    --ink-red: #c0392b;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-wall);
    /* Fundo da parede escura/cortiça */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 20%, rgba(0,0,0,0.8) 100%),
        url('assets/bg-board.jpg'); /* Mantenha apenas esta imagem de fundo */
    background-size: cover;
    background-position: center;
    font-family: 'Courier Prime', monospace;
    overflow: hidden;
    height: 100vh;
    color: var(--ink-black);
}

/* Efeito de Iluminação (Spotlight) */
.lighting-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 40%, transparent 30%, rgba(0,0,0,0.7) 90%);
    pointer-events: none;
    z-index: 50;
}

/* O Quadro */
.evidence-board {
    position: relative;
    width: 100%;
    height: 100%;
}

/* SVG das Linhas */
.connections-layer {
    position: absolute;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(2px 4px 2px rgba(0,0,0,0.5));
}

.string-line {
    stroke: var(--string-red);
    stroke-width: 2px;
    opacity: 0.9;
}

/* --- ESTILOS DE PAPEL CSS PURO --- */

.evidence-item {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.evidence-item:hover {
    z-index: 100;
    transform: scale(1.1) rotate(0deg) !important;
}

/* 1. Polaroid (Foto) */
.type-polaroid {
    width: 220px;
    background-color: #fff;
    padding: 12px 12px 50px 12px;
    box-shadow: 
        2px 2px 0 rgba(0,0,0,0.1), /* Borda fina */
        10px 10px 20px rgba(0,0,0,0.5); /* Sombra realista */
    transform-origin: center;
}
.type-polaroid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: contrast(1.1) sepia(0.2) grayscale(0.2);
    border: 1px solid #eee;
}
.marker-text {
    font-family: 'Permanent Marker', cursive;
    color: #333;
    font-size: 1.1rem;
    position: absolute;
    bottom: 15px;
    left: 20px;
    transform: rotate(-2deg);
}

/* 2. Documento Confidencial (Papel Manila) */
.type-document {
    width: 240px;
    height: 300px;
    background-color: #fcf5e5; /* Cor base */
    /* Gradiente para simular envelhecimento nas bordas */
    background-image: radial-gradient(circle, transparent 60%, rgba(139, 69, 19, 0.1) 100%);
    padding: 20px;
    box-shadow: 
        1px 1px 2px rgba(0,0,0,0.2),
        15px 15px 30px rgba(0,0,0,0.4);
    font-size: 0.8rem;
    line-height: 1.4;
    overflow: hidden;
}
.type-document h3 {
    font-family: 'Special Elite', cursive; /* Fonte de máquina de escrever gasta */
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-top: 0;
}
.redacted {
    background-color: #111;
    color: #111;
    padding: 0 2px;
    border-radius: 2px;
    opacity: 0.9;
}
.stamp-confidential {
    position: absolute;
    bottom: 40px; right: 20px;
    border: 3px double var(--ink-red);
    color: var(--ink-red);
    padding: 5px 10px;
    font-weight: bold;
    font-size: 1.2rem;
    transform: rotate(-15deg);
    opacity: 0.7;
    mask-image: url('data:image/svg+xml;base64,...'); /* Opcional: efeito de falha */
}

/* 3. Blueprint (Papel Azul com Grade) */
.type-blueprint {
    width: 260px;
    height: 200px;
    background-color: #003366;
    /* Grade CSS pura */
    background-image: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 4px solid #fff;
    color: #fff;
    padding: 15px;
    box-shadow: 10px 10px 25px rgba(0,0,0,0.6);
}
.type-blueprint h4 { margin: 0; font-family: monospace; letter-spacing: 2px; }
.tech-drawing {
    width: 100%; height: 120px;
    border: 1px dashed rgba(255,255,255,0.5);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

/* 4. Note (Papel de Caderno Rasgado) */
.type-note {
    width: 200px;
    height: 180px;
    background-color: #fdfd96;
    /* Linhas de caderno */
    background-image: linear-gradient(#99ccff 1px, transparent 1px);
    background-size: 100% 1.5em;
    padding: 15px;
    font-family: 'Permanent Marker', cursive;
    color: #000080; /* Azul caneta */
    line-height: 1.5em;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    /* Clipe no topo (simulado) */
}
.clip-css {
    position: absolute;
    top: -10px; left: 20px;
    width: 15px; height: 35px;
    border: 2px solid #555;
    border-radius: 10px;
    background: transparent;
    z-index: 5;
}

/* ELEMENTOS DE FIXAÇÃO CSS */

/* Fita Adesiva (Tape) */
.tape-css {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 80px; height: 25px;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    backdrop-filter: blur(1px);
    border-left: 1px dashed rgba(0,0,0,0.1);
    border-right: 1px dashed rgba(0,0,0,0.1);
}

/* Alfinete (Pin) */
.pin-css {
    position: absolute;
    top: -8px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 10;
}
.pin-css::after { /* A sombra do alfinete */
    content: '';
    position: absolute;
    top: 5px; left: 5px;
    width: 10px; height: 10px;
    background: black;
    border-radius: 50%;
    filter: blur(2px);
    z-index: -1;
    opacity: 0.5;
}

/* MODAL / PASTA */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.case-file {
    width: 700px;
    max-width: 90%;
    min-height: 500px;
    background-color: #dcb;
    background-image: url('assets/texture-paper.png'); /* Textura suave opcional */
    padding: 0;
    box-shadow: 0 0 100px rgba(0,0,0,1);
    position: relative;
    border-radius: 4px;
}

.file-tab {
    position: absolute;
    top: -25px; left: 0;
    width: 250px; height: 30px;
    background-color: #dcb;
    border-radius: 10px 10px 0 0;
    padding-left: 20px;
    font-weight: bold;
    color: #555;
    line-height: 30px;
}

.file-content {
    padding: 50px;
    font-family: 'Special Elite', monospace;
}

.close-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: #a00;
    color: white;
    border: none;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
}