:root {
    --orange-095-100: #ffebe6ff;
    --orange-090-100: #ffd7ccff;
    --orange-085-100: #ffc3b3ff;
    --orange-080-100: #ffaf99ff;
    --orange-075-100: #ff9b80ff;
    --orange-070-100: #ff8766ff;
    --orange-065-100: #ff734dff;
    --orange-060-100: #ff5f33ff;
    --orange-055-100: #ff4b1aff;
    --orange-050-100: #ff3700ff;
    --orange-045-100: #e63200ff;
    --orange-040-100: #cc2c00ff;
    --orange-035-100: #b32700ff;
    --orange-030-100: #992100ff;
    --orange-025-100: #801c00ff;
    --orange-020-100: #661600ff;
    --orange-015-100: #4d1100ff;
    --orange-010-100: #330b00ff;
    --orange-005-100: #1a0600ff;
    --violet-095-100: #f0e6ffff;
    --violet-090-100: #e0ccffff;
    --violet-090-075: #e0ccffbf;
    --violet-085-100: #d1b3ffff;
    --violet-080-100: #c299ffff;
    --violet-080-025: #c299ff3f;
    --violet-080-012: #c299ff1f;
    --violet-080-006: #c299ff0f;
    --violet-075-100: #b380ffff;
    --violet-070-100: #a366ffff;
    --violet-065-100: #944dffff;
    --violet-060-100: #8533ffff;
    --violet-055-100: #751affff;
    --violet-050-100: #6600ffff;
    --violet-045-100: #5c00e6ff;
    --violet-040-100: #5200ccff;
    --violet-035-100: #4700b3ff;
    --violet-030-100: #3d0099ff;
    --violet-025-100: #330080ff;
    --violet-020-100: #290066ff;
    --violet-015-100: #1f004dff;
    --violet-010-100: #140033ff;
    --violet-005-100: #0a001aff;
}

@font-face {
    font-family: "Josefin";
    src: url("/ttf/josefin-sans.ttf");
    ascent-override: 80%;
    descent-override: 0%
}

@keyframes rotating {
    0% {
        transform: rotate(0deg);
        color: var(--violet-075-100);
    }

    40% {
        transform: rotate(144deg);
        color: var(--orange-075-100);
    }

    60% {
        transform: rotate(216deg);
        color: var(--orange-075-100);
    }

    100% {
        transform: rotate(360deg);
        color: var(--violet-075-100);
    }
}

* {
    box-sizing: border-box;
}

html, body {
    margin: unset;
    overflow: hidden;
    font-family: "Josefin";
    background-color: #0f0f0f;
}

svg.rotate {
    animation: rotating 1.5s linear infinite;
}

button {
    all: unset;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;

    &.primary {
        border: 1px solid var(--violet-080-025);
        padding: 10px 14px;
        font-size: 20px;
        color: var(--violet-080-100);
        background-color: var(--violet-080-012);
        border-radius: 8px;

        &:active, &:focus {
            background-color: var(--violet-080-025);
        }

        &.disabled {
            background-color: transparent;
            color: var(--violet-080-025);
        }
    }
}

main {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    align-items: center;

    & h1 {
        background-image: linear-gradient(45deg, var(--violet-070-100), var(--orange-070-100));
        color: rgba(0, 0, 0, 0);
        background-clip: text;
        width: fit-content;
        font-size: 22px;
        margin: 0;
        padding-block: 32px 16px;
    }

    & > section#loading {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;

        & > div#hash {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 16px;

            & > code {
                font-size: 18px;
                color: #bfbfbf;
                font-weight: bold;
            }
        }
    }

    & > section#app {
        overflow-y: auto;
        scrollbar-color: transparent transparent;
        padding: 3dvw;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 32px;

        & > div#board {
            display: grid;
            grid-template: repeat(5, 16dvw) / repeat(5, 16dvw);
            background-color: #ffffff07;
            border: 1px solid #ffffff1f;
            box-shadow: 0 0 3dvw #ffffff0f;
            border-radius: 3dvw;

            & div {
                width: 16dvw;
                height: 16dvw;
                border: solid #ffffff0f;
                border-width: 0 1px 1px 0;
                display: flex;
                justify-content: center;
                align-items: center;
                color: #9f9f9f;
                font-size: 3dvw;
                overflow-wrap: break-word;
                word-break: break-word;
                hyphens: auto;
                text-align: center;
                line-height: 1.1em;
                padding: 1dvw;
                transition: all 100ms ease;
                user-select: none;

                &:active {
                    background-color: var(--violet-080-025);
                }

                &:nth-of-type(1) {
                    border-radius: calc(3dvw - 1px) 0 0 0;
                }

                &:nth-of-type(5) {
                    border-radius: 0 calc(3dvw - 1px) 0 0;
                }

                &:nth-of-type(25) {
                    border-radius: 0 0 calc(3dvw - 1px) 0;
                }

                &:nth-of-type(21) {
                    border-radius: 0 0 0 calc(3dvw - 1px);
                }
            }
        }

        & > div#selected-cell-detail {
            border: 1px solid var(--violet-080-025);
            border-radius: 8px;
            box-shadow: 0 0 8px var(--violet-080-025);
            background-color: var(--violet-080-006);
            padding: 8px 12px;
            user-select: none;
            overflow-wrap: break-word;
            word-break: break-word;
            hyphens: auto;
            max-width: 80dvw;

            & > h2 {
                margin-block: 8px 16px;
                font-size: 18px;
                color: var(--violet-080-100);
            }

            & > article {
                & > p {
                    margin-block: 4px;
                    font-size: 16px;
                    line-height: 18px;
                    color: var(--violet-090-075);
                }
            }

            & > div#selected-cell-actions {
                display: flex;
                justify-content: flex-end;
                align-items: center;
                margin-block: 12px 4px;
            }
        }
    }
}
