@font-face {
    font-family: "SplashFont";
    src: url("graphics/splashfont.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "MainFont";
    src: url("graphics/mainfont.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: "MainFont", sans-serif;

    background-image: url("graphics/bg.jpg");
    background-repeat: repeat;
    background-position: top left;

    overflow-x: hidden;
}

#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;

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

    background: rgba(255, 255, 255, 0.10);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    opacity: 1;
    visibility: visible;

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

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loading-text {
    font-family: "MainFont", sans-serif;
    font-size: 1.5rem;
    color: #3B3529;

    padding: 18px 24px;

    background: #FFE89A;

    box-shadow:
        3px 5px 8px rgba(0, 0, 0, 0.28);

    transform: rotate(-1deg);
}

#loading-dots {
    display: inline-block;
    width: 1.5em;
    text-align: left;
}

.infoblock {
    position: absolute;

    width: fit-content;
    max-width: 460px;

    padding: 28px 32px 32px;

    color: #3B3529;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;

    background:
        linear-gradient(
            to bottom,
            rgba(255, 215, 100, 0.28) 0,
            rgba(255, 215, 100, 0.28) 42px,
            transparent 42px
        ),
        #FFE89A;

    box-shadow:
        3px 5px 8px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    transform: rotate(var(--rotation, 0deg));
}

.infoblock::before {
    content: "";

    position: absolute;
    top: 8px;
    left: 50%;

    width: 16px;
    height: 16px;

    transform: translateX(-50%);
    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #ff8a8a 0%,
            #ff3030 25%,
            #d40000 60%,
            #790000 100%
        );

    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.45),
        inset 1px 1px 2px rgba(255, 255, 255, 0.5),
        inset -1px -1px 2px rgba(80, 0, 0, 0.5);

    z-index: 2;
}

.infoblock h1,
.infoblock h2,
.infoblock h3,
.infoblock h4,
.infoblock h5,
.infoblock h6,
.infoblock p {
    font-family: "MainFont", sans-serif;
}

.infoblock h1 {
    text-align: center;
}

.infoblock h2 {
    margin-bottom: 8px;
}

.infoblock p {
    line-height: 1.35;
}

.infoblock img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 5px;
}

.image {
    padding: 0;
    max-width: 420px;
    background: none;

    box-shadow:
        3px 5px 8px rgba(0, 0, 0, 0.32);

    color: inherit;
}

.image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0;
}

.image::before {
    top: -8px;
}

.sticker {
    padding: 0;

    width: auto;
    max-width: 160px;

    background: none;
    box-shadow: none;

    color: inherit;
}

.sticker::before {
    display: none;
}

.sticker img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

#header {
    top: 30px;
    left: 50%;

    width: max-content;
    max-width: calc(100vw - 40px);

    z-index: 10;

    transform:
        translateX(-50%)
        rotate(var(--rotation, 0deg));
}

#splashblock {
    z-index: 11;
    max-width: 420px;

    padding: 20px 26px 24px;

    transform:
        rotate(var(--rotation, 0deg));
}

#splash {
    position: relative;
    z-index: 1;

    min-height: 1.5em;
    margin-top: 10px;

    font-family: "SplashFont", sans-serif;
    font-size: 1.3rem;

    color: #FFD400;

    white-space: nowrap;
    text-align: center;

    -webkit-text-stroke: 1px #000000;
    paint-order: stroke fill;

    transform-origin: center;

    animation:
        splash-pulse
        1.5s
        ease-in-out
        infinite;
}

@keyframes splash-pulse {
    0%,
    100% {
        transform:
            rotate(-3deg)
            scale(1);
    }

    50% {
        transform:
            rotate(-3deg)
            scale(1.06);
    }
}

@media (max-width: 700px) {
    .infoblock {
        max-width: calc(100vw - 56px);
        padding: 24px 20px 26px;

        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .infoblock::before {
        top: 7px;
        width: 14px;
        height: 14px;
    }

    .infoblock img {
        max-width: 100%;
        height: auto;
    }

    .image {
        padding: 0;
        max-width: calc(100vw - 56px);
    }

    .image::before {
        top: -7px;
    }

    .sticker {
        padding: 0;
        max-width: 120px;

        background: none;
        box-shadow: none;
    }

    #header {
        top: 20px;
        max-width: calc(100vw - 32px);
    }

    #header h1 {
        font-size: 1.6rem;
    }

    #splashblock {
        max-width: calc(100vw - 40px);
        padding: 17px 18px 20px;
    }

    #splash {
        max-width: calc(100vw - 72px);
        font-size: 1.05rem;

        white-space: normal;
        overflow-wrap: anywhere;

        line-height: 1.2;
    }

    #loading-screen {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    #loading-text {
        font-size: 1.15rem;
        padding: 14px 18px;
    }
}

@media (max-width: 420px) {
    .infoblock {
        max-width: calc(100vw - 48px);
        padding: 22px 16px 24px;
    }

    .image {
        padding: 0;
        max-width: calc(100vw - 48px);
    }

    .sticker {
        padding: 0;
        max-width: 100px;

        background: none;
        box-shadow: none;
    }

    #header {
        max-width: calc(100vw - 24px);
    }

    #header h1 {
        font-size: 1.35rem;
    }

    #splashblock {
        max-width: calc(100vw - 32px);
        padding: 16px 15px 18px;
    }

    #splash {
        max-width: calc(100vw - 56px);
        font-size: 0.95rem;
    }
}