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

html, body {
    background-color: black;
    height: 100vh;
}

body {
    border: 2vw solid brown;
    border-image: url('images/border.jpg') 30 round;
}

/* slide general
================================================================ */

.slide {
    display: none !important;

    position: fixed;
    top: 2vw;
    left: 2vw;
    width: 96vw;
    height: calc(100vh - 4vw);

    border: 1vw solid cyan;

    transform: scale3d(1, 1, 1);
    transition: 0.5s;

    @starting-style {
        transform: scale3d(0, 0, 0);
        border-radius: 100%;
    }

    &.is-hidden {
        scale: 0;
        border-radius: 100%;    
    }

    &.is-visible {
        display: grid !important;
    }

    &.time-over {
        border: 1vw solid red;
    }

    &.yellow {
        background-color: yellow;
    }

    &.blue {
        background-color: blue;
    }

    &.magenta {
        background-color: magenta;

        .circle {
            border-color: black !important;
        }

        .text {
            color: yellow !important;
        }

        .timer .minutes {
            color: black !important;
        }
    }

    &.green {
        background-color: green;

        .timer .minutes {
            color: yellow !important;
        }
    }

    &.white {
        background-color: white;
    }
}

/* slide title
================================================================ */

.slide.title {
    background-image: url('images/vibe-coding-battle.gif');
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 80%;

    filter: hue-rotate(100deg);
}

/* slide fullscrenn iframe
================================================================ */

.slide.has-fullscreen-iframe {

    iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        border-radius: 50%;

        &.no-border-radius {
            border-radius: 0;
        }
    }

    .caption {
        position: absolute;
        bottom: 0;
        left: 0;
        background: #fff;
        font-family: Courier New;
        font-size: 1.35vw;
    }
}

/* slide image
================================================================ */

.slide.has-image {
    height: calc(100vh - 4vw);
    width: 96vw;

    &.is-visible {
        display: block !important;
    }

    img {
        height: 100%;
        width: 100%;
        border-radius: 50%;
        border: 1px solid cyan;
    }

    &.contain img {
        object-fit: contain;
    }

    .caption {
        position: absolute;
        bottom: 0;
        left: 0;
        background: #fff;
        font-family: Courier New;
        font-size: 1.35vw;
    }
}

/* slide task
================================================================ */

.slide.task {
    display: grid;
    align-items: center;
    text-align: center;

    .text {
        color: rgb(0, 255, 81);
        font-size: 8vw;
        line-height: 0.95;
        font-family: Astloch;
        font-weight: bold;
        /* text-shadow: 1px 1px 20px magenta; */
        position: relative;
        z-index: 9999;

        animation: animate-text 3s infinite alternate forwards;
        animation-timing-function: linear;

        /* background: yellow; */
        left: 7vw;
        width: 80vw;
        top: 2vh;

        .lesbar {
            font-family: monospace;
            font-weight: normal;
            font-size: 0.85em;
        }

        .tipp {
            font-weight: normal;
            font-size: 0.5em;
        }
    }

    .circle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        height: calc(100vh - 8vw);
        width: 92vw;
        border: 2px solid rgb(255, 121, 255);
        border-radius: 100%;
        pointer-events: none;
    }
    
    .timer {
        position: absolute;
        top: 2vw;
        left: 43.5vw;

        .clock {
            background: repeating-conic-gradient(from 0deg, #ff72f3, #ff000850 10%, #00ffd020 10%, #00ff80 20%);
            height: 7vw;
            width: 7vw;
            border-radius: 100%;
            cursor: pointer;

            &:hover {
                outline: 1px solid yellow;
                box-shadow: 0 0 1vw magenta;
            }
        }

        .minutes {
            position: fixed;
            bottom: 2vw;
            left: 0;
            width: 100%;
            text-align: center;
            color: magenta;
            font-family: Astloch;
            font-size: 3vw;
            font-weight: bold;
        }

        &.on {
            .clock {
                animation: rotation 2s linear infinite forwards;
            }
        }
    }

    &.time-over {
        background: black !important;

        * {
            animation: flash 0.3s infinite alternate;
            animation-iteration-count: 40;
            animation-delay: 0.5s;
        }

        .text {
            color: red;
            text-shadow: none;
            animation: none
        }

        .circle {
            border: 1px solid red;
        }

        .timer {
            .clock {
                background: red;
            }

            .minutes {
               color: red;
            }
        }
    }
}

 @keyframes animate-text {
    from {
        transform:
            perspective(100vw)
            rotateY(-25deg)
            rotateX(12deg);
    }
    to {
        transform:
            perspective(100vw)
            rotateY(25deg)
            rotateX(-12deg);
    }
 }

 @keyframes rotation {
    from { rotate: 0; }
    to { rotate: 360deg;}
 }

 @keyframes flash {
    from { opacity: 0; }
    to { opacity: 1; }
 }

 /* inner-slideshow
================================================================ */

.inner-slideshow {

    .btn {
        position: fixed;
        color: fuchsia;
        font-size: 5vw;
        line-height: 1;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        background: yellow;
        padding: 5vw 1vw;
        margin: 0 0.5vw;
        border-radius: 100%;
        z-index: 99999;

        &.next {
            left: auto;
            right: 0;
        }

        &:hover {
            background-color: magenta;
            color: black;
        }
    }

    .inner-slide {
        display: none;

        &.is-visible {
            display: block;
        }

        .text {
            position: fixed;
            top: 0;
            left: 50%;
            width: 70vw;
            transform: translateX(-50%);
            height: calc(100vh - 6vw);
            display: grid;
            align-items: center;
            justify-content: center;
        }

        .text {
            color: #fff;
            font-size: 6vw;
            line-height: 1.05;
            text-align: center;
        }

        .image-contain {
            position: absolute;
            left: 8vw;
            top: 0;
            width: calc(100% - 16vw);
            height: 100%;

            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
        }

        iframe {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
    }
}



 /* button
================================================================ */

.button {
    background-color: white;
    display: inline-grid;
    clip-path: polygon(14% 36%, 6% 8%, 31% 26%, 55% 9%, 60% 29%, 95% 12%, 83% 42%, 95% 55%, 75% 64%, 96% 94%, 61% 79%, 36% 97%, 30% 79%, 5% 85%, 24% 68%, 3% 55%);
    padding: 4.5vw 3vw 3vw;
    width: 30vw;
    height: 15vw;
    align-items: center;
    text-align: center;

    font-family: Astloch;
    font-size: 2vw;
    line-height: 1;
    font-weight: bold;
    background-color: rgb(254, 85, 254);
    color: black;

    cursor: pointer;
    transition: 0.15s;

    &:hover {
        scale: 1.1;
        clip-path: polygon(3% 38%, 19% 34%, 22% 10%, 47% 28%, 59% 13%, 74% 30%, 90% 12%, 81% 52%, 96% 59%, 78% 78%, 64% 97%, 56% 69%, 44% 93%, 34% 69%, 6% 100%, 15% 57%);
        color: yellow;
    }
}

 /* misc
================================================================ */

.center-center {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
}