*, *:before, *:after {
    box-sizing: inherit;
}

:root {
    --main-color-red: #be1717;
    --main-color-blue: #1776bb;
    --main-color-green: #B4D455;
    --main-color-yellow: #FAF000;
    --main-color-orange: #FFA600;
    --main-color-gray: #474747;
    --grid-border-style: 2px solid rgba(255, 255, 255, 0.2);
    --wrapper-width: 480px;
}

html {
    background-color: #171717;
    box-sizing: border-box;
}

body, html {
    padding: 0;
    margin: 0;
    /* text-shadow: 1px 1px 1px black; */
}

body {
    min-height: 100vh;
    background-image: url("../images/flag-black-stencil-bg.svg");
    background-size: cover;
    background-position: 20% center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: "JetBrains", Courier, monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #FFF;
}

h1, h2 {
    padding: 0;
    margin: 0;
    line-height: 1.2;
}

a, a:visited, a:hover {
    color: #BADA55;
    text-decoration: none;
}

blockquote {
    padding: 0;
    margin: 0;
}

hr {
    margin: 20px 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.wrapper-narrow {
    margin: 0 auto;
    max-width: 100%;
    width: var(--wrapper-width);
}

.wrapper-wide {
    margin: 0 auto;
    max-width: 100%;
}

main.main-full-video {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    border-radius: 4px;
    overflow: hidden;

    /* Has ad */
    &:has(#pac .progress[style*="display: block"]) {
        position: relative;
        z-index: 999999;
    }

    /* .video-contain {
        height: 100%;
        width: 177.77777778vh;
        min-width: 100%;
        min-height: 56.25vw;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
    } */

    /* No ad */
    &:not(:has(#pac .progress[style*="display: block"])) .video-frame.video-frame--rumble {
        width: 177.77777778vh;
        min-width: 100%;
        min-height: 56.25vw;
        max-height: 100vh;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .video-frame.video-frame--youtube {
        width: 100vw;
        height: 100vh;
        position: absolute;
        top: 0;
        left: 0;
        margin: auto;
        bottom: 0;
        right: 0;

        iframe {
            width: 100vw;
            height: 100vh;
        }
    }
}

main.main-text {
    width: 100%;
    max-width: 100%;
    padding: 10px 10px 200px;
    text-align: center;

    iframe {
        max-width: 100%;
        max-height: 100vh;
        /* border: var(--grid-border-style); */
    }
}

footer.cta {
    z-index: 9999;
    position: sticky;
    max-width: 100%;
    width: 100%;
    bottom: 10px;
    margin-top: 12px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    text-align: left;
    line-height: 1;
    border: var(--grid-border-style);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;

    &.cta-fixed {
        width: var(--wrapper-width);
        position: fixed;
        max-width: 100%;
        left: 0;
        right: 0;
        bottom: 10px;
        /* width: calc(var(--wrapper-width) - 20px);
        max-width: calc(100% - 20px);
        left: 10px;
        right: 10px; */
        margin: auto;
    }

    .small-heading {
        display: block;
        font-size: 11px;
        font-weight: normal;
    }

    .cta-row {
        display: flex;

        @media (max-width: 400px) {
            flex-wrap: wrap;
        }

        .cell {
            padding: 10px;
            align-content: center;

            & + .cell {
                border-left: var(--grid-border-style);
                padding-left: 10px;
            }
        }

        .cell-icon {
            flex: 0 1 auto;
            font-size: 45px;

            svg {
                width: 45px;
                height: auto;
                display: none;

                &.cross { 
                    path { fill: var(--main-color-blue); }
                    path.main { fill: #fff; }
                }

                &.flag {
                    path { fill: var(--main-color-blue); }
                    path.main { fill: var(--main-color-blue); }

                    animation-name: beat;
                    animation-duration: 1s;
                    animation-iteration-count: infinite;
                    animation-direction: alternate;
                    animation-timing-function: linear;
                }

                path:not(.main) {
                    animation-name: pulse;
                    animation-duration: 0.8s;
                    animation-iteration-count: infinite;
                    animation-direction: alternate;
                    animation-timing-function: linear;
                    animation-delay: 0s;
                }
            }

            svg:first-child {
                display: block;

                path:not(.main):nth-child(1) { animation-delay: 1s; }
                path:not(.main):nth-child(2) { animation-delay: 1.25s; }
                path:not(.main):nth-child(3) { animation-delay: 1.5s; }
                path:not(.main):nth-child(4) { animation-delay: 1.75s; }
                path:not(.main):nth-child(5) { animation-delay: 2s; }
                path:not(.main):nth-child(6) { animation-delay: 2.25s; }
                path:not(.main):nth-child(7) { animation-delay: 2.5s; }
            }

            &::after {
                /* Preload image */
                position: absolute;
                opacity: 0;
                pointer-events: none;
                content: url("../images/cursor-pray.svg");
            }

            &:hover,
            &.reveal {
                cursor: url("../images/cursor-pray.svg"), auto;
    
                svg:first-child {
                    display: none;
                }
                svg:last-child {
                    display: block;
                }
            }
        }

        .cell-heading {
            flex: 1 1 50%;
            font-size: 17px;
            font-weight: bold;
        }

        .cell-button {
            flex: 1 1 auto;

            @media (max-width: 400px) {
                border-left: none !important;
                border-top: var(--grid-border-style);
                padding-top: 10px;
            }

            a {
                padding: 10px 30px 10px 10px;
                display: block;
                position: relative;
                background-color: #be1717;
                outline: 1px solid #be1717;
                color: #fff;
                text-shadow: none;
                box-shadow: inset 0 0 12px rgb(0, 0, 0, 0.2), 0 0 10px rgba(0, 0, 0, 0.2);
                white-space: nowrap;
            }

            &:hover {
                .icon svg {
                    opacity: 1;
                }
            }

            .icon {
                width: 14px;
                height: 14px;
                display: block;
                position: absolute;
                right: 7px;
                top: 0;
                bottom: 0;
                margin: auto;

                svg {
                    width: 100%;
                    height: auto;
                    display: block;
                    opacity: 0.7;
                }
            }
        }
    }

    .cta-row-light {
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.05);
        border-top: var(--grid-border-style);
        color: rgba(255, 255, 255, 0.7);

        &.cta-row-flex-text {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }

        &.cta-row-notice {
            padding-top: 10px;
            border-top: var(--grid-border-style);
            border-top-style: dashed;
            font-size: 9px;
        }
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes beat {
    0%, 45% { transform: scale(1); }
    50% { transform: scale(1.05); }
    55%, 100% { transform: scale(1); }
}