:root {
    --background: #000000;
    --box-background: #000000;
    --site-scale: 1;
    --base-page-gutter: 42px;
    --page-gutter: 42px;
    --site-shadow-size: 12px;
    --scaled-shadow-space: 12px;
    --site-box-width: 672px;
    --site-font: Comic Sans MS, Geneva, Tahoma, Arial, sans-serif;
    --preto: #000000;
    --cinza: #7e7e7e;
    --cinza-claro: #bebebe;
    --branco: #ffffff;
    --claro: #06ffff;
    --medio: #7e0000;
    --escuro: #000000;
    --borda: #00007e;
    --link: #ecd4d0;
    --sombra-escura: #047e7e;
    --sombra-profunda: #00007e;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--page-gutter);
    background-color: var(--background);
    background-image: url("gif-other/background1.gif");
    background-repeat: repeat;
    color: var(--branco);
    font-family: var(--site-font);
    box-sizing: border-box;
}

.site-box {
    width: var(--site-box-width);
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 10px groove var(--borda);
    background: var(--box-background);
    box-shadow: var(--site-shadow-size) var(--site-shadow-size) 0 var(--sombra-profunda);
    text-align: center;
    transform: scale(var(--site-scale));
    transform-origin: center;
    box-sizing: border-box;
}

h1,
p,
h2 {
    color: var(--branco);
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 88px;
    height: 31px;
    aspect-ratio: 88 / 31;
    margin-top: 20px;
    padding: 0;
    background: var(--claro);
    border: 4px solid var(--borda);
    border-radius: 0;
    box-shadow: 6px 6px 0 var(--sombra-escura);
    text-decoration: none;
    transition: transform 0.1s ease;
    animation: blink-red 1s infinite steps(1, end);
    box-sizing: border-box;
}

.action-button span {
    color: var(--preto);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    animation: text-flash 1s infinite steps(1, end);
}

.action-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--sombra-escura);
}

.button-box {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: start;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
    border-top: 2px dashed var(--borda);
}

.gif-button-grid {
    --gif-button-row-height: 31px;
    --gif-button-gap: 6px;
    --gif-button-columns: 4;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gif-button-gap);
    justify-self: center;
    width: min(100%, calc((88px * var(--gif-button-columns)) + (var(--gif-button-gap) * (var(--gif-button-columns) - 1))));
    min-height: calc((var(--gif-button-row-height) * 2) + var(--gif-button-gap));
    max-height: calc((var(--gif-button-row-height) * 2) + var(--gif-button-gap));
    overflow: hidden;
}

.button-box a {
    display: block;
    width: 88px;
    height: 31px;
}

.button-box img {
    display: block;
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
}

.button-box-page {
    width: 28px;
    height: 31px;
    padding: 0;
    background: var(--claro);
    border: 2px solid var(--borda);
    border-radius: 0;
    color: var(--preto);
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.button-box-page span {
    display: block;
}

.button-box-page:hover {
    background: var(--medio);
}

.button-box-page:disabled {
    cursor: default;
    opacity: 0.45;
}

.button-box-page:disabled:hover {
    background: var(--claro);
}

@keyframes blink-red {
    0% {
        background: var(--claro);
        border-color: var(--borda);
        box-shadow: 6px 6px 0 var(--sombra-escura);
    }
    50% {
        background: var(--medio);
        border-color: var(--escuro);
        box-shadow: 6px 6px 0 var(--sombra-profunda);
    }
    100% {
        background: var(--claro);
        border-color: var(--borda);
        box-shadow: 6px 6px 0 var(--sombra-escura);
    }
}

@keyframes text-flash {
    0% {
        color: var(--preto);
    }
    50% {
        color: var(--cinza);
    }
    100% {
        color: var(--preto);
    }
}
