/* ================================
   Fonts
   ================================ */

@font-face {
    font-family: "MS-PGOTHIC";
    src: url("fontfaces/ms-pgothic.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}


/* ================================
   Base
   ================================ */

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    font-family: "MS-PGOTHIC", sans-serif;

    background-image: url("/not_found/imgs/bg.gif");
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: auto;

    overflow-x: hidden;
}


/* ================================
   Text selection
   ================================ */

::selection {
    background-color: #defeff;
    color: #fff;
}

::-moz-selection {
    background-color: #defeff;
    color: #fff;
}


/* ================================
   Error heading
   ================================ */

.error-title {
    margin-top: 1em;
}

.error-title blink {
    animation: rainbow 0.5s linear infinite;
}

@keyframes rainbow {
    0% {
        color: #f54242;
    }

    25% {
        color: #f2bf3f;
    }

    50% {
        color: #61eb3b;
    }

    75% {
        color: #2895ed;
    }

    100% {
        color: #f54242;
    }
}


/* ================================
   Images
   ================================ */

img {
    pointer-events: none;
    max-width: 100%;
}

.main-image {
    width: 459px;
    height: 642px;
}

.main-image-table {
    height: 399px;
    width: 494px;
    margin-left: auto;
    margin-right: auto;
}

.main-image-cell {
    width: 484px;
    padding-left: 60px;
}


/* ================================
   Return button
   ================================ */

.return-button {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 70px;
    z-index: 50;
}

.return-button td {
    width: 70px;
    text-align: right;
}


/* ================================
   Bottom marquee
   ================================ */

.bottom-marquee {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
}


/* ================================
   Intro overlay
   ================================ */

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;

    display: block;
    width: 100vw;
    height: 100vh;

    background-image: url("/not_found/imgs/6.gif");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;

    animation: intro-fade 2s ease 0s 1 normal forwards;

    pointer-events: none;
}

@keyframes intro-fade {
    0%,
    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}


/* ================================
   Custom cursor
   ================================ */

* {
    cursor: url("https://cur.cursors-4u.net/cursors/cur-9/cur266.cur"), auto !important;
}


/* ================================
   Mobile / responsive
   ================================ */

@media (max-width: 600px) {

    body {
        background-attachment: scroll;
    }

    .error-title {
        font-size: 200px;
        margin-top: 0.75em;
        padding: 0 10px;
        text-align: left;
    }

    /* Prevent the table from forcing the page wider */
    .main-image-table {
        width: 100%;
        max-width: 494px;
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    /* Remove the large desktop-only left padding */
    .main-image-cell {
        width: auto;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    /* Scale the main image down while preserving its proportions */
    .main-image {
        width: min(459px, 90vw);
        height: auto;
        max-width: 100%;
    }

    /* Keep the return button from taking up too much space */
    .return-button {
        width: 55px;
    }

    .return-button td {
        width: 55px;
    }

    .bottom-marquee {
        width: 100%;
        max-width: 100vw;
    }
}


/* ================================
   Very small phones
   ================================ */

@media (max-width: 400px) {

    .main-image {
        width: 88vw;
    }

    .error-title {
        font-size: 0.9em;
    }

    .return-button {
        width: 45px;
    }

    .return-button td {
        width: 45px;
    }
}
