/* ================================
   Base
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Anonymous+Pro:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    color: black;
    background-image: url("assets/Void_Big.png");
    image-rendering: pixelated;
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: auto;

    font-family: "Anonymous Pro", monospace;

    animation: backgroundScroll 30s linear infinite;
}

.pixelated {
    image-rendering: pixelated;
}

.video-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.embed-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.embed-text {
    flex: 1;
    margin-top: 0;
    min-width: 0;
}

.embed {
    flex: 0 0 552px;
    width: 552px;
    min-width: 552px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;

    width: 100%;
    margin: 30px 0;
}

.screenshot-grid .screenshot {
    width: 100%;
    height: auto;
    margin: 0;

    cursor: pointer;
}


/* ================================
   Main Section
   ================================ */

main {
    width: min(100%, 1000px);
    min-height: 100vh;

    margin: 0 auto;
    padding: 40px;

    background: #000;
    color: #fff;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

.screenshot {
    width: 384px;
    height: auto;
    margin: 0;
}

.screenshot-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.screenshot-row .screenshot {
    width: 480px;
    height: auto;
    margin: 0;
}


/* ================================
   Image Lightbox
   ================================ */

.screenshot {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.screenshot:hover {
    opacity: 0.8;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.9);

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    image-rendering: pixelated;

    cursor: default;
}


/* ================================
   Banner
   ================================ */

.banner {
    display: block;

    /* Escape the 40px main padding */
    width: calc(100% + 80px);
    margin-top: -40px;
    margin-left: -40px;
    margin-bottom: 40px;

    height: auto;
}


/* ================================
   Text
   ================================ */

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li {
    font-family: "Anonymous Pro", monospace;
}

a {
    color: #af5bfa;
}

a:hover {
    color: #7339a5;
}


/* ================================
   Background Animation
   ================================ */

@keyframes backgroundScroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 500px 500px;
    }
}


/* ================================
   Mobile Layout
   ================================ */

@media (max-width: 700px) {

    main {
        width: 100%;
        padding: 20px;
    }

    /* Stack embedded content vertically */
    .embed-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin: 20px 0;
    }

    .embed-text {
        width: 100%;
    }

    /* Make embeds fit the screen */
    .embed {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .embed iframe {
        width: 100%;
        max-width: 100%;
    }

    /* Turn screenshot grids into one column */
    .screenshot-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .screenshot-grid .screenshot {
        width: 100%;
    }

    /* Stack screenshot rows */
    .screenshot-row {
        flex-direction: column;
        gap: 15px;
        margin: 20px 0;
    }

    .screenshot-row .screenshot {
        width: 100%;
        max-width: 100%;
    }

    /* General screenshots should never overflow */
    .screenshot {
        width: 100%;
        max-width: 100%;
    }

    /* Banner should match the new mobile padding */
    .banner {
        width: calc(100% + 40px);
        margin-top: -20px;
        margin-left: -20px;
        margin-bottom: 20px;
    }

    p {
        font-size: 1rem;
    }
}
