:root {
    --bg-color: #d2cdc1;
    --header-bg: #1a1a1a;
    --text-dark: #121212;
    --scp-red: #8b0000;
    --accent-gray: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Courier New", Courier, monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Entry Animation Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: #0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s ease-out;
}

.progress-bar {
    width: 300px;
    height: 10px;
    border: 1px solid #0f0;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: #0f0;
    width: 0%;
    transition: width 2s ease-in-out;
}

/* Header & Content Styles */
header {
    background-color: var(--header-bg);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
    color: white;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid var(--accent-gray);
}

.header-left { display: flex; align-items: center; gap: 20px; }
.logo { width: 80px; filter: invert(1); }
.foundation-title h1 { font-size: 2.5rem; letter-spacing: 2px; }
.header-right { text-align: center; border-left: 2px solid white; padding-left: 20px; }
.sub-header { background: var(--accent-gray); color: white; padding: 8px 50px; font-weight: bold; letter-spacing: 1px; }

main { padding: 40px 50px; max-width: 1200px; margin: 0 auto; }
.document-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.scp-id { color: var(--scp-red); font-size: 4rem; margin-bottom: 20px; }
.text-content p { margin-bottom: 20px; line-height: 1.6; font-size: 1.1rem; font-family: Arial, sans-serif; }
.text-content h3 { margin: 30px 0 10px 0; text-decoration: underline; }

.media-content { display: flex; flex-direction: column; align-items: center; }
.scp-image { width: 100%; border: 2px solid #000; }
figcaption { font-size: 0.9rem; margin-top: 10px; text-align: center; font-family: Arial, sans-serif; }

/* Link Button Styling and Animation */
.related-entities-btn {
    display: inline-block;
    text-decoration: none;
    margin-top: 40px;
    background: black;
    color: white;
    padding: 15px 40px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s ease;
    text-align: center;
}

.related-entities-btn:hover {
    background: #222;
}

.related-entities-btn:active {
    transform: scale(0.9);
}

.btn-click-anim {
    animation: flash 0.3s ease;
}

@keyframes flash {
    0% { background-color: var(--scp-red); }
    100% { background-color: black; }
}