:root {
    --color-near-black: #1A1A1A;
    --color-dark-gray: #333333;
    --color-medium-gray: #666666;
    --color-light-gray: #999999;
    --color-very-light-gray: #CCCCCC;
    --color-near-white: #E5E5E5;
    --color-crimson: #990000;
    --color-industrial-blue: #003366;

    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Courier New', monospace;

    --timing-mechanical: 300ms;
    --timing-fade: 500ms;
}

.contact-section {
    width: 60%;
    margin: 0 auto;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background-color: var(--color-dark-gray);
    border: 2px solid var(--color-light-gray);
    color: var(--color-near-white);
    padding: 0.5rem;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-crimson);
    color: var(--color-near-white);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.showcase-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.table-styler, .polaroid-switcher {
    background-color: var(--color-dark-gray);
    padding: 2rem;
    margin: 1rem;
    border: 2px solid var(--color-industrial-blue);
    width: 45%;
}

#styler-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 1rem;
}

#styler-table th, #styler-table td {
    border: 1px solid var(--color-light-gray);
    padding: 0.5rem;
    text-align: center;
}

#styler-table th {
    background-color: var(--color-industrial-blue);
}

.redacted {
    background-color: black;
    color: black;
}

.controls button {
    background-color: var(--color-industrial-blue);
    color: var(--color-near-white);
    border: 2px solid var(--color-light-gray);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    cursor: pointer;
    transition: background-color var(--timing-mechanical) ease-in-out;
}

.table-styler .controls button:hover,
.polaroid-switcher .controls button:hover {
    background-color: var(--color-crimson);
}

.polaroid-frame {
    background-color: var(--color-near-white);
    padding: 1rem;
    border: 2px solid var(--color-light-gray);
    text-align: center;
}

#polaroid-img {
    width: 100%;
}

#image-counter {
    color: var(--color-near-black);
    margin-top: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.news-item {
    border: 1px solid #ff0000;
    padding: 1rem;
    box-shadow: 0 0 10px #ff0000;
}

.gallery-item {
    position: relative;
    overflow-y: auto;
    height: auto;
    cursor: pointer;
}

.gallery-item .base-img,
.gallery-item .hover-img {
    width: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity var(--timing-fade) ease-in-out;
}

.gallery-item .hover-img {
    opacity: 0;
}

.gallery-item:hover .hover-img {
    opacity: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--timing-fade) ease-in-out;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.text-box {
    background-color: rgba(0, 0, 0, 0.5);
    /* 50% semi-transparent */
    color: var(--color-near-white);
    padding: 0.5rem;
    width: 100%;
    text-align: center;
    height: 15%;
}

.two-column {
    display: flex;
}

.column-left {
    width: 30%;
    padding-right: 2rem;
    border-right: 2px solid var(--color-industrial-blue);
}

.column-right {
    width: 70%;
    padding-left: 2rem;
}

.profile-pic {
    width: 100%;
    border: 2px solid var(--color-light-gray);
}

.glitch {
    animation: glitch-animation 0.3s forwards;
}

@keyframes glitch-animation {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-5px, 5px);
    }

    40% {
        transform: translate(-5px, -5px);
    }

    60% {
        transform: translate(5px, 5px);
    }

    80% {
        transform: translate(5px, -5px);
    }

    100% {
        transform: translate(0);
    }
}

body {
    background-color: var(--color-near-black);
    color: var(--color-near-white);
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('https://www.transparenttextures.com/patterns/concrete-wall.png');
}

.main-header, .main-footer {
    background-color: var(--color-dark-gray);
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid var(--color-crimson);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.main-nav li {
    margin: 0 1rem;
}

.main-nav a {
    color: var(--color-near-white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color var(--timing-mechanical) ease-in-out;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-crimson);
    text-shadow: 0 0 5px var(--color-crimson);
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    height: auto;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#jumpscare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.crt-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-near-black);
    opacity: 0;
    animation: crt-flicker 0.1s infinite;
    pointer-events: none;
    /* Fix: Allows clicks to pass through */
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 14px,
            rgba(0, 0, 0, 0.2) 15px,
            rgba(0, 0, 0, 0.2) 15px);
    pointer-events: none;
}

@keyframes crt-flicker {
    0%, 100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.1;
    }
}

.big-brother-eye {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/eye.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
    animation: pulse 10s infinite;
}

.big-brother-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--primary-color);
    opacity: 0;
    animation: fadeInOut 15s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }

    10%, 90% {
        opacity: 1;
    }
}

.showcase-section h2 {
    text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0%, 100% {
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
    }

    50% {
        text-shadow: none;
    }
}

body {
    background: black;
    overflow-y: auto;
    height: auto;
    color: white;
    font-family: "OCR A Std", monospace;
}

.slogan {
    position: fixed;
    white-space: nowrap;
    font-size: 2em;
    color: rgba(255, 255, 255, 0.08);
    animation: moveRight linear forwards;
}

@keyframes moveRight {
    from {
        transform: translateX(-100%);
        opacity: 0.7;
    }

    to {
        transform: translateX(110vw);
        opacity: 0;
    }
}


.table-styler {
    background: repeating-linear-gradient(45deg,
            #1a1a1a,
            #1a1a1a 10px,
            #1f1f1f 10px,
            #1f1f1f 20px);
}

.polaroid-switcher {
    position: relative;
    overflow-y: auto;
    height: auto;
}

.polaroid-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://i.imgur.com/r3c8dI3.jpeg') no-repeat center center/cover;
    opacity: 0.1;
    z-index: -1;
}

.polaroid-frame {
    border: 10px solid #000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

#polaroid-img {
    filter: grayscale(100%) sepia(30%);
}

.slogan {
    position: fixed;
    white-space: nowrap;
    font-size: 2em;
    color: rgba(255, 255, 255, 0.08);
    animation: moveRight linear infinite;
}

@keyframes moveRight {
    from {
        transform: translateX(-100%);
        opacity: 0.6;
    }

    to {
        transform: translateX(110vw);
        opacity: 0;
    }
}

/* .main-content::before {
    content: "WAR IS PEACE. FREEDOM IS SLAVERY. IGNORANCE IS STRENGTH.";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    z-index: -2;
    animation: typing 3s steps(40, end) infinite, blink-caret .75s step-end infinite;
} */

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent
    }

    50% {
        border-color: orange;
    }
}

.column-left h2 {
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
    }

    to {
        text-shadow: 0 0 20px #ff0000, 0 0 30px #ff0000, 0 0 40px #ff0000;
    }
}

.ministry {
    margin-bottom: 2rem;
    border: 1px solid #ff0000;
    padding: 1rem;
    box-shadow: 0 0 10px #ff0000;
}

.ministry img {
    max-width: 100%;
    margin-bottom: 1rem;
}

.service-list {
    margin-top: 2rem;
}

.service-item {
    background-color: #1a1a1a;
    border: 1px solid #ff0000;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.service-item h3 {
    color: #ff0000;
    margin-top: 0;
}

.security-overview {
    text-align: center;
    padding: 20px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    margin-bottom: 20px;
}

.security-section {
    background-color: #111;
    border: 1px solid #333;
    padding: 15px;
    margin-bottom: 15px;
}

.security-section img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}

.archive-intro {
    text-align: center;
    padding: 20px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    margin-bottom: 20px;
}

.archive-section {
    background-color: #111;
    border: 1px solid #333;
    padding: 15px;
    margin-bottom: 15px;
}

.big-brother-message {
    font-size: 1.5em;
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
    animation: flicker 1.5s infinite alternate;
}


.crt-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-near-black);
    opacity: 0;
    animation: crt-flicker 0.1s infinite;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 14px,
            rgba(0, 0, 0, 0.2) 15px,
            rgba(0, 0, 0, 0.2) 15px);
    pointer-events: none;
}

@keyframes crt-flicker {
    0%, 100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.1;
    }
}