/* Code © 2021 Ke Er Zhang, revised by 2022 Xinyi Li */

:root {
    --opacityImg1: 1;
    --opacityImg2: 1;
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height:100vh;
    margin: 0 0;
    overflow-x:hidden;
    animation: fadeInAnimation ease 1.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

footer {
    color: #767676;
    font-size:small;
    margin-top:2em;
}

/*container holding images and range slider*/
.slider-container { 
    position: relative;
    top: 0;
    left: 0;
}

/*Change size of slider images here. Sizes are currently fixed (not adaptive to screen) - keep these width and height values proportional to the dimensions of uploaded images*/
img { 
    width: 670px;
    height: 850px;
}

/*Style attributes specifically for image 2, such as its position in the slider container and border stroke.*/
.img2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: var(--opacityImg2);
    border-radius: 5px; /*rounded corners*/
    border: 2px solid #000; /*stroke*/
}

/*Style attributes specifically for image 1, such as its position in the slider container and border stroke.*/
.img1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: var(--opacityImg1);
    border-radius: 5px; /*rounded corners*/
    border: 2px solid #000; /*stroke*/
}

/* Style attributes for the range slider, such as its position on the screen, colour, height, width */
.range {
    -webkit-appearance: none;
    appearance: none;  
    position: absolute;
    top: 366px;
    left: 49.7%;
    transform: translate(-50%, -0%);
    background: #dddddd;
    opacity: 1;
    border-radius: 30px;
    height: 5px;
    width: 275px;
    max-height: 10px;
}

/* Style attributes for the range slider's button */ 
.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    cursor: pointer;
    background: #000;
    width: 17px;
    height: 17px;
    border-radius: 50%;
}  

/* Style attributes for the range slider's button on hover */ 
.range:hover::-webkit-slider-thumb {
    background: #182852;
}
