@font-face {
    font-family: OpenSans;
    src: url("fonts/OpenSans-VariableFont_wdth\,wght.woff2") format("woff2");
}

@font-face {
    font-family: Jersey15;
    src: url("fonts/Jersey15-Regular.woff2") format("woff2");
}

@font-face {
    font-family: Jersey20;
    src: url("fonts/Jersey20-Regular.woff2") format("woff2");
}

@font-face {
    font-family: Jost;
    src: url("fonts/Jost-VariableFont_wght.woff2") format("woff2");
}

body, html {
    margin: 0;
    padding: 0;
}

html {
    background-color: black;
    --main: #00dddd;
    --secondary: #ab51ff;
    --emergency: #ff2121;
    --highlight: #ffff27;
    --formal: #3569da;
    --whoami: #416058;
    --fortune: #13cd13;
    --caution: #ff6700;
}

body {
    color: white;
    font-family: OpenSans, sans-serif;
}

.codeStyled {
    font-family: Jersey20, Jersey15, monospace, Arial, Helvetica, sans-serif;
    font-size: 1.25rem;

    @media screen and (width >= 720px) {
        font-size: 1.75rem;
    }
}

.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 8rem;
    font-family: Jost, OpenSans, sans-serif;
    font-size: 3rem;
    color: #e9e9e9;
    background-color: #04218b;
    border-bottom: 2px solid #e9e9e9;

    p {
        margin: 0;
        margin-left: 16px;
    }

    .topbarmenu {
        flex: 1;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        column-gap: 28px;

        a {
            font-size: 2rem;
            color: white;
            text-decoration: none;
            appearance: none;

            transition: color 100ms ease-in-out;
            &:hover {
                color: var(--secondary);
            }
            @media (hover: none) {
                &:hover {
                    color: inherit;
                }
            }
        }
    }

    @media screen and (width <= 550px) {
        height: 4rem;
        font-size: 1rem;

        .topbarmenu {
            a {
                font-size: 1rem;
            }

            .smallHide {
                display: none;
            }
        }
    }

    #langselect {
        margin-right: 16px;

        .chosen {
            display: flex;
            flex-direction: row;
            align-items: center;
            z-index: 51;

            padding: 0.15rem;

            width: 4.25rem;
            height: 1.5rem;
        
            color: black;
            background-color: white;
            border: 2px solid black;
            border-radius: 8px;

            img {
                height: 1.25rem;
                border: 1px solid black;
            }

            p {
                flex: 1;
                font-size: 1rem;
                text-align: center;
                margin: 0;
                padding: 0;
                margin-right: 8px;
            }

            transition: all 150ms ease-in-out;
            &:hover {
                background-color: #1d1d1d;
                border-color: white;
                color: #cccccc;
                cursor: pointer;
            }
            @media (hover: none) {
                &:hover {
                    background-color: white;
                    border-color: black;
                    color: black;
                    cursor: auto;
                }
            }
            
        }
        .options {
            position: absolute;
            z-index: 50;
            display: none;

            > div {
                display: flex;
                flex-direction: row;
                align-items: center;

                padding: 0.15rem;

                width: 4.25rem;
                height: 1.5rem;
            
                color: #cccccc;
                background-color: #1d1d1d;
                border: 2px dashed white;
                border-radius: 8px;

                margin-top: 6px;

                img {
                    height: 1.25rem;
                }

                p {
                    flex: 1;
                    font-size: 1rem;
                    text-align: center;
                    margin: 0;
                    padding: 0;
                    margin-right: 8px;
                }

                transition: all 150ms ease-in-out;
                
                &:hover {
                    background-color: #02124e;
                    border-color: rgb(82, 172, 46);
                    cursor: pointer;
                }
                @media (hover: none) {
                    &:hover {
                        background-color: #1d1d1d;
                        border-color: white;
                        cursor: auto;
                    }
                }
            }
        }

        &.active {
            .options {
                display: block;
            }
        }
    }
}

#content {
    padding: 1rem 2.5rem 1rem 2.5rem;

    @media screen and (width <= 500px) {
        padding: 1rem 1rem 1rem 1rem;
    }

    color: #e9e9e9;
    
    p {
        font-size: 1rem;

        @media screen and (width >= 720px) {
            font-size: 1.5rem;
        }
    }

    a {
        color: var(--main);
        &:hover {
            cursor: pointer;
        }
        @media (hover: none) {
            &:hover {
                cursor: auto;
            }
        }
    }

    .centered {
        margin: auto;
        width: fit-content;
        text-align: center;
    }

    .code-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        
        > div:first-child {
            position: relative;
        }

        input[type="image"] {
            position: relative;
            width: 32px;
            height: 32px;
            margin-right: 4px;
            z-index: 7;
        }

        p {
            position: absolute;
            text-align: center;
            margin: 0;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9;
            padding: 4px;
            background-color: #212121;
            border: 1px solid white;

            opacity: 0;
            transition: opacity 100ms ease-out;

            @media screen and (width <= 550px) {
                transform: none;
                left: 0;
            }
        }

        input[type="image"]:hover ~ p {
            opacity: 1;
        }
        @media (hover: none) {
            input[type="image"]:hover ~ p {
                opacity: 0;
            }
        }
    }

    .code {
        position: relative;
        font-family: Jersey20, Jersey15, monospace, Arial, Helvetica, sans-serif;
        font-size: 1.25rem;
        padding: 0.5rem;
        border: 2px solid white;
        overflow: auto;
        width: fit-content;
        white-space: pre;
        word-break: keep-all;
        z-index: 8;

        @media screen and (width >= 720px) {
            font-size: 1.75rem;
        }
    }

    h1 {
        margin: 0;
        text-align: center;
        font-family: Jersey20, Jersey15, monospace, Arial, Helvetica, sans-serif;
        font-weight: normal;
        font-size: 3rem;

        @media screen and (width <= 720px) {
            font-size: 2.5rem;
        }
    }

    h2 {
        font-size: 1.5rem;

        @media screen and (width >= 720px) {
            font-size: 2rem;
        }
    }

    .time {
        text-align: center;
        margin: 0;
        color: #484848;
        transition: color 100ms ease-in-out;
        &:hover {
            color: #d1d1d1;
        }
        @media (hover: none) {
            &:hover {
                cursor: #484848;
            }
        }
    }

    .error {
        width: fit-content;
        max-width: 800px;
        margin: auto;
        margin-top: 4pc;
        --c: #f03c3c;
        -webkit-box-shadow:0px 0px 50px 8px var(--c);
        -moz-box-shadow: 0px 0px 50px 8px var(--c);
        box-shadow: 0px 0px 50px 8px var(--c);
        border: 2px solid var(--c);
        border-radius: 16px;
        color: var(--c);
        background-color: black;
        padding: 1.5rem;
    }

    .entry {
        width: fit-content;
        max-width: 720px;
        margin: auto;
        margin-top: 4pc;
        --dc: #e0e0e0;
        --c: #e0e0e0;
        -webkit-box-shadow:0px 0px 10px 4px var(--c);
        -moz-box-shadow: 0px 0px 10px 4px var(--c);
        box-shadow: 0px 0px 10px 4px var(--c);
        border: 2px solid var(--c);
        border-radius: 16px;
        color: var(--c);
        background-color: black;
        padding: 1.5rem;
        display: flex;
        flex-direction: row;

        img {
            aspect-ratio: 1 / 1;
            margin-right: 1rem;
        }

        > div {
            > h2 {
                margin: 0;
                font-size: 1.5rem;
                font-weight: bold;
            }

            > p {
                margin: 0.75rem 0rem;
                font-size: 1rem;
                font-weight: normal;
            }

            > div {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                column-gap: 8px;

                @media screen and (width <= 550px) {
                    flex-direction: column;
                    align-items: flex-start;
                }

                > a {
                    text-decoration: none;
                    --c: var(--secondary);
                    border: solid 2px var(--c);
                    -webkit-box-shadow:0px 0px 10px 1px var(--c);
                    -moz-box-shadow: 0px 0px 10px 1px var(--c);
                    box-shadow: 0px 0px 10px 1px var(--c);
                    border-radius: 8px;
                    color: white;
                    background-color: black;
                    font-weight: normal;
                    font-size: 1.5rem;
                    font-family: Jersey15, monospace, Arial, Helvetica, sans-serif;
                    padding: 4px;
                    &:hover {
                        cursor: pointer;
                    }
                    @media (hover: none) {
                        &:hover {
                            cursor: auto;
                        }
                    }
                }

                > p {
                    margin: 8px 0px 0px 0px;
                    font-size: 0.85rem;
                    color: #484848;
                    transition: color 100ms ease-in-out;
                    &:hover {
                        color: #d1d1d1;
                    }
                    @media (hover: none) {
                        &:hover {
                            cursor: #484848;
                        }
                    }
                }
            }
        }

        &.info {

        }

        &.news {
            --c: var(--formal);

            > div > p {
                color: var(--dc);
            }
        }

        &.report {
            --c: var(--emergency);
            color: var(--dc);
            -webkit-box-shadow: none;
            -moz-box-shadow: none;
            box-shadow: none;
            border-width: 4px;
        }

        &.warning {
            --c: var(--caution);
            @supports at-rule(@keyframes) {
                animation: 0.6667s ease-in-out 0s infinite alternate both blink;
                img {
                    filter: var(--f);
                }
            }
        }

        &.star {
            --c: var(--highlight);

            > div > p {
                color: white;
            }
        }

        &.high_priority {
            --c: var(--fortune);
            -webkit-box-shadow: none;
            -moz-box-shadow: none;
            box-shadow: none;
            border-width: 4px;

            > div > p {
                color: var(--dc);
            }
        }

        &.emergency {
            --c: var(--emergency);
            -webkit-box-shadow: none;
            -moz-box-shadow: none;
            box-shadow: none;
            border-width: 4px;
            border-radius: 0px;
            border-style: dashed;

            > div > p {
                color: white;
            }
        }
    }

    .post {
        width: 80%;
        margin: auto;

        @media screen and (width <= 720px) {
            width: 100%;
        }

        img {
            max-width: 400px;
            @media screen and (width <= 500px) {
                max-width: 80%;
            }
            height: auto;

            &.larger {
                max-width: 600px;
                @media screen and (width <= 500px) {
                    max-width: 85%;
                }   
            }

            &:hover {
                cursor: zoom-in;
            }
            @media (hover: none) {
                &:hover {
                    cursor: auto;
                }
            }
        }

        .m {
            font-family: Jersey20, Jersey15, monospace, Arial, Helvetica, sans-serif;
            font-size: 1.25rem;

            @media screen and (width >= 720px) {
                font-size: 1.75rem;
            }
        }

        li {
            font-size: 1rem;

            @media screen and (width >= 720px) {
                font-size: 1.5rem;
            }
        }
    }
}

@keyframes blink {
    from { 
        --c: white;
        --f: grayscale(1) brightness(2);
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        img {
            filter: var(--f);
        }
    }
    to {
        --c: var(--caution);
        --f: none;
        -webkit-box-shadow:0px 0px 18px 2px var(--c);
        -moz-box-shadow: 0px 0px 18px 2px var(--c);
        box-shadow: 0px 0px 18px 2px var(--c);
    }
}

#imgZoom {
    z-index: 100;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    img {
        width: 90%;
        height: 90%;
        object-fit: contain;
    }
    cursor: zoom-out;
    @supports at-rule(@keyframes) {
        animation: 150ms ease-out 0s 1 normal forwards showImgZoom running;
    }
}

@keyframes showImgZoom {
    from { 
        filter: opacity(0);
    }
    to {
        filter: opacity(1);
    }
}