:root {
    --bg-dark: #121316;
    --bg-dossier: #1a1b20;
    --bg-card: #202229;
    --border-folder: #3a3d47;
    --stamp-red: #d92323;
    --stamp-red-bg: rgba(217, 35, 35, 0.12);
    --stamp-yellow: #f59e0b;
    --text-main: #e2e4ea;
    --text-muted: #8b8f9e;
    --text-typewriter: #d1d5db;
    --paper-highlight: rgba(255, 255, 255, 0.04);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Courier Prime', monospace;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(217, 35, 35, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.6) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    line-height: 1.6;
    overflow-x: hidden;
}

.leak-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    background: #181418;
    border: 2px solid #ff1e3c;
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(255, 30, 60, 0.35);
    animation: toastSlide 0.5s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.leak-toast.toast-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@keyframes toastSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.toast-pulse {
    width: 8px;
    height: 8px;
    background: #ff1e3c;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff1e3c;
    animation: toastPulseAnim 1.2s infinite;
}

@keyframes toastPulseAnim {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; }
}

.toast-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    color: #ff1e3c;
    letter-spacing: 1.5px;
}

.toast-body strong {
    font-family: 'Special Elite', cursive, monospace;
    font-size: 0.95rem;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.toast-body p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.toast-action-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #ff1e3c, #b3002d);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 30, 60, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.toast-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 30, 60, 0.6);
}

.dossier-header {
    background: var(--bg-dossier);
    border-bottom: 3px solid var(--border-folder);
    position: relative;
    padding-top: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.folder-tab {
    position: absolute;
    top: 0;
    left: 40px;
    background: var(--border-folder);
    color: #ffd166;
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    padding: 4px 18px;
    border-radius: 6px 6px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px 10px;
    position: relative;
}

.stamp {
    font-family: 'Special Elite', cursive, monospace;
    color: var(--stamp-red);
    border: 3px solid var(--stamp-red);
    padding: 6px 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    user-select: none;
}

.stamp-top-right {
    position: absolute;
    top: 15px;
    right: 20px;
    transform: rotate(6deg);
    background: var(--stamp-red-bg);
    box-shadow: inset 0 0 10px rgba(217, 35, 35, 0.2);
}

.classification-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.barcode {
    font-size: 1.1rem;
    letter-spacing: -1px;
    color: #666;
}

.site-title {
    font-family: 'Special Elite', cursive, monospace;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    margin-bottom: 4px;
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--stamp-yellow);
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px dashed var(--border-folder);
    padding-top: 15px;
}

.main-nav a {
    display: inline-block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-folder);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    background: #2b2e38;
    color: #fff;
    border-color: #888;
}

.main-nav a.nav-leak-btn {
    background: #8b001a;
    border-color: #ff1e3c;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(255, 30, 60, 0.35);
    animation: leakBtnPulse 2s infinite;
}

@keyframes leakBtnPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 30, 60, 0.3); }
    50% { box-shadow: 0 0 18px rgba(255, 30, 60, 0.7); }
}

.main-nav a.nav-onion {
    color: #818cf8;
    border-color: rgba(129, 140, 248, 0.3);
}

.dossier-main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.dossier-section {
    background: var(--bg-dossier);
    border: 1px solid var(--border-folder);
    border-radius: 6px;
    position: relative;
    padding: 35px 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.section-folder-tag {
    position: absolute;
    top: -14px;
    left: 20px;
    background: #282a33;
    border: 1px solid var(--border-folder);
    color: #adb5bd;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 2px 12px;
    border-radius: 3px;
}

.section-header-wrap {
    margin-bottom: 30px;
    border-bottom: 1px dashed var(--border-folder);
    padding-bottom: 14px;
}

.section-header-wrap h2 {
    font-family: 'Special Elite', cursive, monospace;
    font-size: 1.7rem;
    letter-spacing: 2px;
    color: #fff;
}

.section-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 35px;
    align-items: start;
}

.about-photo-wrapper {
    background: #18191f;
    border: 1px solid var(--border-folder);
    padding: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    text-align: center;
}

.paperclip {
    position: absolute;
    top: -12px;
    right: 20px;
    width: 14px;
    height: 32px;
    border: 3px solid #9ca3af;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.suspect-img {
    width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.1) grayscale(20%);
    border: 1px solid #111;
}

.stamp-photo {
    position: absolute;
    bottom: 45px;
    right: 15px;
    color: var(--stamp-red);
    border: 2px solid var(--stamp-red);
    font-family: 'Special Elite', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    transform: rotate(-12deg);
    background: rgba(217, 35, 35, 0.2);
}

.photo-caption {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.stamp-red-line {
    font-family: 'Special Elite', monospace;
    color: var(--stamp-red);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.about-text-wrapper h2 {
    font-family: 'Special Elite', monospace;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 16px;
}

.dossier-table {
    background: var(--bg-card);
    border: 1px solid var(--border-folder);
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dossier-row {
    display: flex;
    font-size: 0.9rem;
    gap: 12px;
}

.d-label {
    color: var(--text-muted);
    min-width: 90px;
    font-weight: 700;
}

.d-value {
    color: #fff;
}

.status-active {
    color: #f87171;
    font-weight: 700;
}

.typewriter-body p {
    color: var(--text-typewriter);
    font-size: 1rem;
    margin-bottom: 14px;
}

.quote-signature {
    font-style: italic;
    color: var(--stamp-yellow) !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.polaroid-item {
    background: #1e2026;
    border: 1px solid var(--border-folder);
    padding: 10px 10px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.polaroid-item:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 8px 22px rgba(0,0,0,0.7);
    border-color: #666;
}

.tape-strip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.polaroid-item .img-box {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #000;
    margin-bottom: 10px;
}

.polaroid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(0.9);
}

.polaroid-item figcaption {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.5px;
}

.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.case-file {
    background: var(--bg-card);
    border: 1px solid var(--border-folder);
    border-radius: 6px;
    padding: 24px;
    position: relative;
}

.danger-case {
    border-color: rgba(217, 35, 35, 0.4);
    background: linear-gradient(180deg, rgba(217, 35, 35, 0.05) 0%, var(--bg-card) 100%);
}

.stamp-alert {
    position: absolute;
    top: 14px;
    right: 20px;
    color: var(--stamp-red);
    border: 2px solid var(--stamp-red);
    font-family: 'Special Elite', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 3px 8px;
    transform: rotate(4deg);
    background: var(--stamp-red-bg);
}

.case-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
    margin-bottom: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-num {
    color: var(--stamp-yellow);
    font-weight: 700;
}

.case-file-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.post-evidence-img {
    border: 1px solid #111;
    overflow: hidden;
    height: 150px;
    background: #000;
}

.post-evidence-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-text-content h3 {
    font-family: 'Special Elite', monospace;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.post-text-content p {
    font-size: 0.95rem;
    color: var(--text-typewriter);
    line-height: 1.6;
    margin-bottom: 8px;
}

.quote-sub {
    font-style: italic;
    color: var(--stamp-yellow) !important;
}

.contacts-grid, .family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dossier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-folder);
    border-radius: 6px;
    padding: 22px;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.dossier-card:hover {
    transform: translateY(-3px);
    border-color: #666;
}

.card-stamp {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 2px;
}

.contact-icon, .family-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 10px;
}

.dossier-card h3 {
    font-family: 'Special Elite', monospace;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 12px;
}

.classified-data {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.c-code {
    color: #d1d5db;
}

.redacted-box {
    background: #000;
    color: #111;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 2px;
    border: 1px solid #333;
    user-select: none;
    cursor: help;
    transition: color 0.3s;
}

.redacted-box:hover {
    color: #666;
}

.badge-lost {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--stamp-red);
    background: var(--stamp-red-bg);
    border: 1px dashed var(--stamp-red);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.classified-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
    border-top: 1px dotted rgba(255,255,255,0.08);
    padding-top: 8px;
}

.dossier-footer {
    background: #0d0e11;
    border-top: 2px solid var(--border-folder);
    padding: 40px 20px;
    text-align: center;
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.footer-stamp {
    display: inline-block;
    color: var(--stamp-red);
    border: 2px solid var(--stamp-red);
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    padding: 4px 12px;
    letter-spacing: 2px;
    margin-bottom: 14px;
    transform: rotate(-3deg);
}

.dossier-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

@media (max-width: 820px) {
    .about-container {
        grid-template-columns: 1fr;
    }
    .about-photo-wrapper {
        max-width: 320px;
        margin: 0 auto;
    }
    .case-file-body {
        grid-template-columns: 1fr;
    }
    .post-evidence-img {
        height: 200px;
    }
    .stamp-top-right {
        position: static;
        transform: none;
        margin-bottom: 15px;
    }
}

.main-nav a.nav-kostyan-btn {
    background: #ffcc00;
    border-color: #ff9900;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
    animation: flash-gold 2.5s infinite;
}

.main-nav a.nav-kostyan-btn:hover {
    background: #ff9900;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.8);
}

@keyframes flash-gold {
    0% { box-shadow: 0 0 5px rgba(255, 204, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 204, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 204, 0, 0.3); }
}
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox.active {
    display: flex;
}
.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    transform: scale(0.8);
    transition: transform 0.25s ease-out;
}
.lightbox.active .lightbox-img {
    transform: scale(1);
}
.lightbox-caption {
    color: #fff;
    font-family: 'Courier Prime', monospace;
    margin-top: 15px;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px #000;
}
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
    font-family: monospace;
}
.close-lightbox:hover {
    color: #ff1e3c;
}
