@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #d45e9f;
    font-family: "Press Start 2P", monospace;
    opacity: 1;
    position: relative;
}

html, body {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:root {
    box-sizing: border-box;
    --scrollbar-track: transparent;
    --scrollbar-thumb: #d45e9f;
    --scrollbar-thumb-hover: #f3a9d6;
    --scrollbar-gutter: #0b0a0d;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html {
    background: #000;
}

html.instant-load .fade,
html.instant-load .stamp-layer {
    transition: none !important;
    clip-path: inset(0 0 0 0) !important;
}

.fade {
    opacity: 1;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 200ms ease-in-out;
    will-change: clip-path;
}

.fade.is-visible {
    clip-path: inset(0 0 0 0);
}

.fade.is-leaving {
    clip-path: inset(0 100% 0 0);
}

.stamp-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 200ms ease-in-out, opacity 200ms ease-in-out;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.stamp-layer.is-visible {
    clip-path: inset(0 0 0 0);
}

.stamp-layer.is-leaving {
    clip-path: inset(0 100% 0 0);
    opacity: 0.85;
}

.stamp {
    position: absolute;
    width: 82px;
    height: auto;
    opacity: 0.9;
    animation: none;
    transform: translate3d(0, 0, 0) rotate(var(--stamp-tilt, 0deg));
}

body > *:not(.stamp-layer):not(.lightbox) {
    position: relative;
    z-index: 1;
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

#particles-js canvas {
    display: block;
}

@keyframes stampFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(var(--stamp-tilt, 0deg));
        opacity: 0.25;
    }

    22% {
        opacity: 0.95;
    }

    50% {
        transform: translate3d(0, -10px, 0) rotate(calc(var(--stamp-tilt, 0deg) + 1deg));
        opacity: 0.7;
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(var(--stamp-tilt, 0deg));
        opacity: 0.25;
    }
}

.site-header {
    text-align: center;
    padding: 40px 0 20px 0;
}

.site-title {
    color: #b12c74;
    font-size: 22px;
    margin: 0;
    text-shadow: 0 0 2px #8a1f57;
}

.intro {
    width: 85%;
    margin: 0 auto;
    padding: 18px;
    border: 2px dashed #8a1f57;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.intro h2 {
    text-align: center;
    color: #d45e9f;
    font-size: 15px;
    margin-bottom: 10px;
}

.intro p {
    font-size: 11px;
    line-height: 1.7;
    color: #f3a9d6;
}

.intro a {
    color: #d45e9f;
    text-decoration: none;
}

.intro a:hover {
    text-decoration: underline;
}

.blinkie-button-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 25px 0;
}

.blinkie {
    height: 35px;
    image-rendering: pixelated;
}

.art-examples {
    width: 85%;
    margin: 30px auto;
    padding: 18px;
    border: 2px dashed #8a1f57;
    background: rgba(0, 0, 0, 0.55);
}

.art-examples h2 {
    text-align: center;
    font-size: 15px;
    color: #d45e9f;
    margin-bottom: 15px;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(3, 350px);
    justify-content: center;
    gap: 16px;
    justify-items: center;
}

.art-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #111012;
    border: 4px solid #b12c74;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: 350px 350px;
}

.art-box img {
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.art-box:hover {
    border-color: #d45e9f;
    transform: scale(1.02);
}

.panel {
    width: 85%;
    margin: 0 auto;
    padding: 18px;
    border: 2px dashed #8a1f57;
    background: rgba(0, 0, 0, 0.55);
}

.panel h2 {
    text-align: center;
    color: #d45e9f;
    font-size: 15px;
    margin-top: 0;
    margin-bottom: 12px;
}

.panel p,
.panel li {
    font-size: 11px;
    line-height: 1.7;
    color: #f3a9d6;
}

.info-list {
    padding-left: 18px;
    margin: 0;
    display: grid;
    gap: 8px;
}

.blinkie-home {
    display: flex;
    justify-content: center;
    margin: 20px 0 26px 0;
}

.pixel-footer {
    margin-top: 40px;
    padding: 15px 0;
    border-top: 2px dashed #8a1f57;
    background: rgba(0,0,0,0.6);
    text-align: center;
    width: 100%;
}

.pixel-footer p {
    color: #d45e9f;
    font-size: 8px;
    margin: 5px 0;
}

.pixel-footer a {
    color: #f3a9d6;
    text-decoration: none;
}

.pixel-footer a:hover {
    text-decoration: underline;
}

.pixel-footer .sparkles {
    font-size: 12px;
    color: #f3a9d6;
    letter-spacing: 3px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease-in-out;
    z-index: 10;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox__frame {
    background: #0d0c0f;
    border: 2px solid #b12c74;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    padding: 12px 12px 16px 12px;
    max-width: 96vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lightbox__image {
    max-width: 92vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid #d45e9f;
    background: #0d0c0f;
}

.lightbox__caption {
    margin: 0;
    font-size: 10px;
    color: #f3a9d6;
    text-align: center;
    max-width: 88vw;
}

.lightbox__close {
    align-self: flex-end;
    background: #b12c74;
    color: #0d0c0f;
    border: none;
    padding: 6px 10px;
    font-family: "Press Start 2P", monospace;
    font-size: 9px;
    cursor: pointer;
    border: 2px solid #d45e9f;
    text-transform: uppercase;
}

.lightbox__close:hover {
    background: #d45e9f;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .art-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        gap: 14px;
        justify-content: center;
    }
}

@media (max-width: 600px) {

    body {
        padding: 10px 0 18px;
    }

    .intro,
    .art-examples,
    .panel {
        width: 96%;
        padding: 18px;
        border-width: 2px;
    }

    .intro {
        gap: 12px;
    }

    .intro p,
    .intro h2,
    .art-examples h2,
    .panel h2,
    .panel p,
    .panel li {
        font-size: 12px;
        line-height: 1.8;
        letter-spacing: 0.01em;
    }

    .site-title {
        font-size: 16px;
    }

    .blinkie-button-row {
        gap: 15px;
        margin: 20px 0;
        flex-wrap: wrap;
    }

    .blinkie {
        height: 28px;
    }

    .art-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 14px;
    }

    .art-box {
        border-width: 2px;
    }


    .pixel-footer {
        padding: 10px 0;
    }

    .pixel-footer p {
        font-size: 9px;
    }

    .info-list {
        gap: 12px;
    }

    .blinkie-button-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin: 20px 0;
    }

    .blinkie {
        height: 32px;
    }

    .art-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .art-box {
        max-width: 190px;
        margin: 0 auto;
    }

    .lightbox__frame {
        width: 100%;
        padding: 10px 10px 14px 10px;
    }

    .lightbox__close {
        font-size: 10px;
    }
}
