/* style.css */
body {
    font-family: 'Press Start 2P', cursive;
    background-color: #1a1a2e; /* Dark blue-purple background */
    color: #e0e0e0; /* Light grey text */
    line-height: 1.5;
    text-shadow: 2px 2px #000; /* Pixelated text shadow */
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.18;
    background-image:
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.05) 0,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 4px
        );
    animation: screenStatic 160ms steps(2, end) infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 998;
    opacity: 0.1;
    background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.35) 100%);
}
.pixel-border {
    border: 4px solid #00ff00; /* Green pixel border */
    box-shadow: 8px 8px 0px 0px #009900; /* Darker green shadow */
    border-radius: 8px; /* Slightly rounded corners for pixel effect */
}
.pixel-button {
    background-color: #00ff00; /* Green button */
    color: #1a1a2e; /* Dark text on button */
    padding: 12px 24px;
    font-size: 0.875rem; /* Smaller font for buttons */
    text-shadow: none;
    border: 4px solid #009900; /* Darker green border */
    border-radius: 8px;
    transition: all 0.1s ease-in-out;
    text-decoration: none; /* Remove underline for links */
    display: inline-block; /* Allow padding and margin */
}
.pixel-button:hover {
    transform: translate(2px, 2px); /* Simulate button press */
}
h1, h2 {
    color: #ffcc00; /* Gold-yellow for headings */
    text-shadow: 3px 3px #996600; /* Darker gold shadow */
}

.cursor {
    display: inline-block;
    font-weight: bold;
    color: #4f4f70;
    animation: blink 1.2s step-end infinite;
}
.social-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.social-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #00ff00;
    color: #1a1a2e;
    border: 4px solid #009900;
    border-radius: 6px;
    text-decoration: none;
    text-shadow: none;
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
    font-size: 1.1rem;
}
.social-icon i {
    text-shadow: none;
}
.social-icon-image {
    width: 20px;
    height: 20px;
    display: block;
}
.social-icon:hover,
.social-icon:focus-visible {
    transform: translate(2px, 2px);
    outline: none;
}
.section-title {
    background-color: #333366; /* Darker blue for section titles */
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
    border: 2px solid #666699;
}
.card {
    background-color: #2a2a4a; /* Slightly lighter dark blue for cards */
    border: 3px solid #666699; /* Blue-grey border */
    box-shadow: 6px 6px 0px 0px #1a1a2e; /* Dark shadow */
    border-radius: 8px;
}

.coop-level-button {
    width: 100%;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.coop-level-button-active {
    animation: pixelPulse 1.6s steps(2, end) infinite;
}

.coop-button-image-wrap {
    width: 100%;
    max-width: 220px;
    border: 3px solid #009900;
    background-color: #1a1a2e;
    box-shadow: 4px 4px 0px 0px #003f00;
}

.coop-button-image {
    width: 100%;
    height: auto;
    display: block;
}

.coop-level-button-locked {
    background-color: #0d0d16;
    color: #4f4f70;
    border-color: #22223c;
    box-shadow: 8px 8px 0px 0px #09090f;
    filter: grayscale(0.25);
    cursor: not-allowed;
    position: relative;
}

.coop-level-button-locked::after {
    content: "LOCKED";
    letter-spacing: 1px;
    color: #101010;
    background-color: #5f5f5f;
    border: 2px solid #2a2a2a;
    padding: 4px 8px;
}

.coop-level-button-locked:hover {
    transform: none;
}

.coop-module {
    position: relative;
    overflow: hidden;
    border-color: #00ff00;
    box-shadow: 0 0 0 3px #004d00, 8px 8px 0px 0px #1a1a2e;
}

.coop-module.revealing {
    animation: moduleReveal 420ms steps(5, end) both;
}

.coop-module-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        rgba(0, 255, 0, 0.08) 0,
        rgba(0, 255, 0, 0.08) 3px,
        transparent 3px,
        transparent 8px
    );
    mix-blend-mode: screen;
    animation: scanShift 3s linear infinite;
}

.coop-module-image {
    width: 100%;
    border: 3px solid #666699;
    border-radius: 4px;
    image-rendering: pixelated;
}

@keyframes moduleReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
        filter: brightness(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
}

@keyframes scanShift {
    0% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(8px);
    }
}

@keyframes pixelPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 #00ff00, 8px 8px 0px 0px #009900;
    }
    50% {
        box-shadow: 0 0 0 4px #003300, 8px 8px 0px 0px #009900;
    }
}

@keyframes screenStatic {
    0% {
        background-position: 0 0, 0 0;
    }
    25% {
        background-position: 0 1px, 1px 0;
    }
    50% {
        background-position: 0 -1px, -1px 0;
    }
    75% {
        background-position: 0 2px, 2px 0;
    }
    100% {
        background-position: 0 0, 0 0;
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }
}

