:root {
    --cyan: #26dad6;
    --purple: #b017fa;
    --red: #bd1e1e;
}

/* unsupported browsers */

.no-transition > p {
    font-size: 3.5vw;
    background: linear-gradient(to right, #26dad6, #b017fa, #bd1e1e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* resets */

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

/* layout */

body {
    background: radial-gradient(circle, #1b1b1b, #000000);
    background-repeat: no-repeat;
    min-height: 100vh;
}

.container {
    max-width: 90dvw;

    margin: 0 auto;
    color: whitesmoke;
    overflow: hidden;
}

main {
    display: flex;
}

img {
    user-select: none;

}

.centered {
    margin: auto;
}

.thumbs img {
    display: block;
    margin: 10px;
    border-radius: 7px;
    opacity: 0.7;
    width: 16dvh;
    height: 9dvh;
    -webkit-user-drag: none;
}

a {
    outline: 0;
    -webkit-user-drag: none;
}

.thumbs a:hover img,
.thumbs a:focus img {
    opacity: 1;
}

.thumbs img:first-child {
    margin-top: 0px;
}

.selected img {
    /* animated rainbow border */
    background-image: linear-gradient(white, white),
    linear-gradient(to right, var(--cyan), var(--purple), var(--red), var(--cyan));
    background-origin: border-box;
    background-clip: content-box, border-box;
    border: solid 1px transparent;
}

.gallery-view {
    display: flex;
    max-height: 78dvh;
    align-items: center;
    padding: 10px;
    justify-content: center;
}

.gallery-view img {
    max-width: 100%;
    max-height: 75dvh;
    border-radius: 8px;
}

.sliding-window .arrow {
    rotate: 90deg;
    font-size: 3dvh;
    width: 1vw;
    margin: auto;
    cursor: pointer;
    user-select: none;
}

figcaption {
    position: absolute;
    padding: 5px 10px;
    background-color: rgb(0 0 0 / 50%)
}

figure {
    position: relative;
}

figcaption {
    top: 0px;
    right: 0px;
    border: 1px solid #999;
    border-radius: 0 7px 0 7px;
}

/* text */

h1,
figcaption,
a,
p {
    font-family: Arial, Helvetica, sans-serif;
}

h1 {
    text-align: center;
    width: fit-content;
    font-size: 4dvh;
    margin-top: 1vh;
    margin-bottom: 1vh;
    background: linear-gradient(to right, #26dad6, #b017fa, #bd1e1e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: auto;
    margin-right: auto;
}

/* media queries */

@media (max-width: 980px) {
    .sliding-window {
        display: flex;
        justify-content: center;
        gap: 5px;
    }

    .sliding-window .arrow {
        width: auto;
    }

    #sliding-window-content {
        display: flex;
        gap: 2px;
    }

    .sliding-window .arrow {
        rotate: none;
    }

    .container {
        width: 90%;
    }


    .container {
        width: 98%;
    }

    main {
        flex-direction: column;
    }

    .thumbs {
        display: flex;
        gap: 3px;
        justify-content: center;
    }

    .thumbs img {
        margin: 0 0 10px 0;
    }
}

/* View Transitions CSS */

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.5s;
}

figcaption {
    view-transition-name: figure-caption;
}

.thumbs {
    view-transition-name: thumbs;
}

::view-transition-old(thumbs),
::view-transition-new(thumbs) {
    animation-duration: 0.5s;
}

/* Simple final style */

::view-transition-old(figure-caption),
::view-transition-new(figure-caption) {
    height: 100%;
}

/* glowing effect */
.glowing {
    border: none;
    outline: none;
    position: relative;
    z-index: 0;
    border-radius: 10px;
}

.glowing::before {
    content: '';
    background: linear-gradient(to right, var(--cyan), var(--purple), var(--red), var(--cyan));
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 1px);
    animation: glowingAnimation 20s linear infinite;
}




@keyframes glowingAnimation {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}
