@font-face {
    font-family: 'disc_black';
    font-style: normal; 
    font-weight: normal;
    src:url('font/disc_black.ttf.woff') format('woff'),
    url('font/disc_black.ttf.svg#disc_black') format('svg'),
    url('font/disc_black.ttf.eot'),
    url('font/disc_black.ttf.eot?#iefix') format('embedded-opentype');
}

html {
    margin: 0;
    padding: 0;
}

canvas {
    display: block;
    margin: 0;
    padding: 0;
}

body {
    align-items: center;
    display: flex;
    font-family: 'disc_black';
    justify-content: center;
    margin: 0;
    overflow: hidden;
    padding: 0; 
}

body > * {
    opacity: 0;        
    transition: opacity 0.1s 10ms linear;
}

body.loaded > * {
    opacity: 1;
}

body > &:nth-child(1) { transition-delay: calc(500ms + 100ms); }
body > &:nth-child(2) { transition-delay: calc(500ms + 200ms); }
body > &:nth-child(3) { transition-delay: calc(500ms + 300ms); }
body > &:nth-child(4) { transition-delay: calc(500ms + 400ms); }
body > &:nth-child(5) { transition-delay: calc(500ms + 500ms); }
body > &:nth-child(6) { transition-delay: calc(500ms + 600ms); }
body > &:nth-child(7) { transition-delay: calc(500ms + 700ms); }
body > &:nth-child(8) { transition-delay: calc(500ms + 800ms); }
body > &:nth-child(9) { transition-delay: calc(500ms + 900ms); }
body > &:nth-child(10) { transition-delay: calc(500ms + 1000ms); }
body > &:nth-child(11) { transition-delay: calc(500ms + 1100ms); }
body > &:nth-child(12) { transition-delay: calc(500ms + 1200ms); }

img {
    cursor: pointer;
    user-select: none;
}

.img-button {
    border-radius: 1.8rem;
    cursor: pointer;
    height: 55px;
    overflow: hidden;
    position: relative;
}

.img-button img {
    height: 100%;
    user-select: none;
}

.img-button:hover::before {
    opacity: .153;
}

.img-button::before {
    /* background: linear-gradient(90deg, black 20%, #ffb1b1 40%, #fff 60%, black 80%); */
    background: linear-gradient(0deg, black -10%, #565656 20%, #fffe 75%, black 110%);
    border-radius: 1.8rem;

    /* box-shadow: inset 0 0 10px 3px black; */
    content: "";
    inset: 0;
    mix-blend-mode: plus-lighter;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
}


#about-me {
    left: 25%;
    position: fixed;
    top: 30%;
    transition: opacity 150ms 100ms linear;
}

#work {
    position: fixed;
    right: 18%;
    top: 40%;
    transition: opacity 150ms 200ms linear;
}

#instagram {
    left: 15%;
    position: fixed;
    top: 65%;
    transition: opacity 150ms 300ms linear;
}

#mailto {
    position: fixed;
    right: 25%;
    top: 75%;
    transition: opacity 150ms 400ms linear;
}

@media (width <= 800px) {
    #mailto {
        right: 15%;
    }
}

/* Top right corner */

body:not(.loaded) #enableButton,
body:not(.loaded) #disableButton,
body:not(.loaded) #play {
    top: -32px;
}

#enableButton {
    cursor: pointer;
    height: 55px;
    position: absolute;
    right: 239px;
    top: 32px;
    transition: opacity 150ms 500ms linear, top 900ms 500ms cubic-bezier(0.11, 0.58, 0, 0.99);
}

#disableButton {
    cursor: pointer;
    height: 55px;
    position: absolute;
    right: 179px;
    top: 32px;
    transition: opacity 150ms 600ms linear, top 900ms 600ms cubic-bezier(0.11, 0.58, 0, 0.99);
}

#play {
    cursor: pointer;
    height: 55px;
    position: absolute;
    right: 44px;
    top: 32px;
    transition: opacity 150ms 700ms linear, top 900ms 700ms cubic-bezier(0.11, 0.58, 0, 0.99);
}

@media (width <= 800px) {
    #enableButton,
    #disableButton,
    #play {
        top: 1rem;
    }

    #enableButton {
        right: 13.5rem;
    }

    #disableButton {
        right: 9.5rem;
    }

    #play {
        right: 1rem;
    }
}


#popup-container {
    background-color: #D9D9D9;
    border: 20px solid #FF00E5;
    border-radius: 50px;
    box-shadow: 0 0 100px 0 #FF00E5;
    display: none;
    flex-shrink: 0;
    font-family: 'disc_black';
    height: 830px;
    left: 50%;
    max-height: 80%;
    max-width: 80%;
    overflow: hidden;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1098px;
    z-index: 1000; 
}

#popup-container--inner {
    box-sizing: border-box;
    height: 100%;
    margin-right: -15px;
    overflow: auto;
    padding: 20px;
    padding-right: 35px;
}

@media (width <= 800px) {
    #popup-container--inner {
        padding: 3.5rem .5rem .5rem;
    }
}

#video-popup-container { 
    align-items: center;
    background-color: #D9D9D9;
    border: 20px solid #FF00E5;
    border-radius: 50px;
    box-shadow: 0 0 100px 0 #FF00E5;
    display: none; 
    display: flex;
    flex-shrink: 0;
    height: 375px; 
    justify-content: center;
    left: 50%;
    overflow: hidden;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    z-index: 1000; 
}

@media (width <= 600px) {
    #video-popup-container {
        box-sizing: border-box;
        height: calc(100% - 2rem);
        left: 1rem;
        top: 1rem;
        transform: none;
        width: calc(100% - 2rem);
    }
}

#webcam-video { 
    border-radius: 10px;
    height: 100%; 
    object-fit: cover; 
    opacity: 0; 
    pointer-events: none;
    transition: opacity 200ms;
    width: 100%;
    z-index: -1;
}

@media (width <= 800px) and (orientation: portrait) {
    #webcam-video {
        width: auto;
    }
}

#webcam-video.in {
    opacity: 1;
}

h2, p {
    font-family: "disc_black", sans-serif; 
    font-size: 30px;
    margin-bottom: 15px;
    padding: 10px;
}

@media (width <= 800px) {
    h2, p {
        font-size: 16px;
    }
}

#close-button {
    cursor: pointer;
    height: 50px;
    position: absolute;
    right: 10px;
    top: 10px;
}

#video-close-button {
    cursor: pointer;
    height: 50px;
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 1;
}

#flower-cam {
    height: 100px;
    left: 50px;
    position: absolute;
    top: 200px;
}

#heart-cam {
    height: 70px;
    left: 130px;
    position: absolute;
    top: 50px;
}

#quadrifoglio-cam {
    bottom: 150px;
    height: 70px;
    position: absolute;
    right: 100px;
}

#star-cam {
    bottom: 50px;
    height: 50px;
    left: 350px;
    position: absolute;
}

#star-cam-2 {
    height: 30px;
    position: absolute;
    right: 400px;
    top: 150px;
}

#star-cam-3 {
    height: 30px;
    left: 300px;
    position: absolute;
    top: 20px;
}

#rainbow-cam {
    height: 50px;
    position: absolute;
    right: 25px;
    top: 75px;
}

#rotating-image-container {
    inset: 0;
    position: absolute;
}

.rotating-image {
    opacity: 1; 
    pointer-events: none;
    position: absolute; 
    transition: opacity 0.5s ease-in-out;
}


@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.rotating-image {
    animation: rotate 5s linear infinite; 
}

@media (width <= 600px) {
    #flower-cam {
        bottom: 0.5rem;
        height: 100px;
        left: calc(50% - 50px);
        pointer-events: auto;
        position: absolute;
        top: auto;
    }

    #heart-cam {
        left: 6rem;
        top: 2rem;
    }
    
    img#quadrifoglio-cam {
        bottom: 29%;
        height: 6rem;
        right: 5rem;
    }
    
    #rainbow-cam {
        height: 4rem;
        right: 1rem;
        top: 34%;
    }

    #star-cam-3 {
        height: 4rem;
        left: 8%;
        top: 27%;
    }
}
