:root {
    --bg-color: #0c0c0c;
    --text-color: #d4d4d4;
    --accent-red: #ff4d4d;
    --accent-gray: #333;
    --border-color: #444;
    --font-mono: 'Courier New', Courier, monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 1000;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0c0c0c 100%);
}

header {
    border-bottom: 3px solid var(--accent-red);
    padding: 20px 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
}

.logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-red);
    background: rgba(255, 77, 77, 0.05);
    box-sizing: border-box;
}

.logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.5));
}

.header-text {
    flex-grow: 1;
}

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.subtitle {
    margin: 5px 0 0;
    color: var(--accent-red);
    font-weight: bold;
    font-size: 0.9rem;
}

nav {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 30px;
}

.nav-item {
    margin-right: 25px;
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px;
    transition: all 0.3s;
}

.nav-item.active {
    background: var(--accent-red);
    color: black;
}

.nav-item:hover:not(.active) {
    color: var(--accent-red);
}

/* Sub-navigation of objects */
.sub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: -15px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.sub-nav-item {
    cursor: pointer;
    padding: 3px 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-weight: bold;
    color: #888;
}

.sub-nav-item.active {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(255, 77, 77, 0.05);
}

.sub-nav-item:hover:not(.active) {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.hidden {
    display: none !important;
}

.object-section {
    display: block;
}

.warning-banner {
    background: var(--accent-red);
    color: black;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.object-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.status-tags {
    margin-bottom: 30px;
}

.tag {
    padding: 5px 15px;
    margin-right: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid;
}

.class-delta {
    border-color: #ffd700;
    color: #ffd700;
}

.threat-red {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .logo {
        margin-right: 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    aside.object-image-placeholder {
        order: -1; /* Move image above text on mobile for better flow */
        width: 100%;
    }

    .image-box {
        max-width: 400px;
        margin: 0 auto;
    }

    .container {
        border: none;
        padding: 10px;
    }

    .header-text h1 {
        font-size: 1.4rem;
    }
}

h3 {
    border-bottom: 1px solid var(--accent-red);
    padding-bottom: 5px;
    margin-top: 30px;
}

.incident-report {
    background: #1a1a1a;
    padding: 20px;
    border-left: 5px solid var(--accent-red);
    margin-top: 40px;
}

.image-box {
    border: 1px solid var(--border-color);
    padding: 10px;
    background: #000;
}

.static {
    width: 100%;
    height: 300px;
    background: url('https://media.giphy.com/media/oEI9uWU0WMrQmZJvLy/giphy.gif'); /* Placeholder for static */
    background-size: cover;
    filter: grayscale(1) contrast(1.5);
    opacity: 0.5;
}

.caption {
    display: block;
    font-size: 0.75rem;
    margin-top: 10px;
    color: #888;
    font-style: italic;
    text-align: center;
}

footer {
    margin-top: 100px;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
}

/* Simulation of "Intellectual Drain" */
.drain-active {
    filter: blur(2px) grayscale(0.5);
    transition: filter 5s ease-in;
}

.text-glitch {
    color: var(--accent-red);
    text-shadow: 2px 2px #000;
}

/* Spinner for Dukin-Effect */
.spinner-container {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #050505;
    position: relative;
    border: 1px dashed var(--border-color);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 77, 77, 0.1);
    border-top: 4px solid var(--accent-red);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-text {
    margin-top: 25px;
    font-size: 0.8rem;
    color: var(--accent-red);
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
    font-weight: bold;
    letter-spacing: 1px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Dukin Block Overlay */
.dukin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    font-family: var(--font-mono);
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.dukin-overlay-box {
    border: 2px solid var(--accent-red);
    background: #000;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 0 25px rgba(255, 77, 77, 0.4);
    position: relative;
}

.dukin-overlay h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 15px;
    font-size: 1.3rem;
    color: #fff;
}

.dukin-overlay p {
    font-size: 0.95rem;
    margin: 20px 0;
    line-height: 1.5;
}

.dukin-loading-bar {
    width: 100%;
    height: 12px;
    background: #111;
    border: 1px solid var(--accent-red);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.dukin-loading-fill {
    height: 100%;
    background: var(--accent-red);
    width: 0%;
    animation: fillProgress 1.2s linear forwards;
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}
