@font-face {
    font-family: 'BustinJieber';
    src: url('../fonts/BustinJieber.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.9)), url('../imgs/check.png');
    background-repeat: repeat;
    background-size: 100px 100px;
    background-position: center;
    animation: loop-down 180s linear infinite;
    position: relative;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background-image: url('../imgs/grade.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1;
}

body::after {
    background-image: url('../imgs/background.gif');
    background-size: 100px 100px;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.3;
    image-rendering: pixelated;
    animation: loop-up 180s linear infinite;
}

@keyframes loop-up {
    0% {
        background-position: center 0;
    }
    100% {
        background-position: center 1000px;
    }
}

@keyframes loop-down {
    0% {
        background-position: center 0;
    }
    100% {
        background-position: center -1000px;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'BustinJieber', 'Segoe UI', Arial, sans-serif;
    color: rgb(255, 255, 255);
}

img {
    image-rendering: pixelated;
}

.frame-container {
    aspect-ratio: 2 / 1;
    width: min(300vw, 900px);
    height: auto;
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.062);
}

.frame-img {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50.5%);
    width: min(330vw, 930px);
    height: 103%;
    background-size: cover;
    object-fit: cover;
    image-rendering: pixelated;
    border-image-source: url('../imgs/frame.png');
    border-image-slice: 40%;
    border-image-width: 30px 30px;
}

.site-title {
    position: absolute;
    top: -60px;
    left: 80px;
}

.site-mascot {
    position: absolute;
    top: -155px;
    left: -40px;
}

iframe.frame-container {
    border: none;
}

@media (max-width: 700px) {
    body {
        overflow-x: hidden;
    }

    .frame-container {
        width: 94vw;
        aspect-ratio: 3 / 4;
    }

    .iframe-frame {
        width: 100%;
        height: 100%;
        display: flex;
    }

    iframe.frame-container {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }

    .frame-img {
        width: 103%;
    }

    .site-title {
        top: -58px;
        left: 96px;
    }

    .site-title h1 {
        font-size: 1.4em;
        margin: 0;
        white-space: nowrap;
    }

    .site-mascot {
        top: -92px;
        left: 0;
    }

    .site-mascot img {
        width: 84px;
        height: auto;
    }
}