@font-face {
    font-family: 'WalterTurncoat';
    src: url('WalterTurncoat.ttf') format('truetype'); /* Adjusted path */
    font-weight: normal;
    font-style: normal;
}

/*mobile*/

@media screen and (max-width: 500px) {
    /*mobile*/
body, html {
    background: linear-gradient(to bottom, #FF96BE 35%, #FFF496 50%);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    transition: background 1s ease-in-out; 
}

body.lock-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.fade-in-background {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.fade-in-background {
    opacity: 1;
}


:focus {
    outline: none;
    border: none; 
    -webkit-tap-highlight-color: transparent; 
}

.video-container {
    position: relative;
}

#video1, #video2, #video3, #video4 {
    width: 150vw !important;
    height: auto !important;
}


#video1, #video2, #video3, #video4 {
    width: 150%;
    position: fixed;     
    top: 41%;             
    left: 52%;            
    transform: translate(-50%, -50%); 
    z-index: 1000;        
    transition: opacity 2.5s ease-in-out;  // Increase from 0.5s to 1s
}

.controls-container {
    width: 140%; 
    text-align: center;
    position: fixed;  
    left: -10%;
    bottom: 30%; 
    z-index: 5000; 
    visibility: hidden; /* Initially hidden */
    opacity: 0; /* Initially fully transparent */
    transition: opacity 1s ease;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    max-width: 40%;
    -webkit-tap-highlight-color: transparent;
}

.volume-label {
    position: absolute;
    bottom: 0;
    left: 26%;
    width: 11%;
}

.volume-control {
    position: absolute;
    left: 35%; 
    bottom: 0;
    width: 50%; 
}

.volume-slide {
    position: absolute;
    width: 100%; 
    left: 15%; 
    padding-bottom: 3%;
}

.volume-knob {
    position: absolute; 
    width: 5%;
    transform: translateX(-50%); /* Center the knob */
}

.pause {
    position: absolute;
    left: 57%; 
    width: 3.5%;
}

.play {
    position: absolute;
    left: 63.5%;
    bottom: 0;
    width: 7%;
}


.volume-knob, .play, .pause {
    cursor: pointer;
    transition: transform 0.06s ease-out; /* Adjusted easing function and fixed duration */
    transform-origin: center center;
    backface-visibility: hidden; /* Prevent potential graphical glitches */
    transform: scale(1) translateX(-50%); /* Default transform value */
}

.volume-knob:active, .play:active, .pause:active {
    transform: scale(1.05) translateX(-50%);
}


.controls-image {
    position: absolute; /* Still absolute to center the image within the controls-container */
    bottom: 1%; 
    z-index: 1500;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 40%;
    display: none;
}

#video1, #video2, #video3, #video4 {
    position: fixed;
    width: 300px;
    opacity: 0;
/*    margin-left: -17%;
    margin-top: -50%;*/
    transition: opacity 2.5s ease-in-out;
    width: 100%;
    height: 100%;
    z-index: 1000;  /* Ensure video is above other elements */
}

.preload-image {
    opacity: 0; 
    transition: opacity 0.5s ease-in-out; 
}


.scene2-backdrop {
    position: absolute;
    width: 100vw;
    height: 100%;  
    overflow: hidden;
}

.scene2-background {
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;    
    height: 100%;   
    background-size: cover;   
    background-position: center;  
    overflow: hidden;  
}

.scene2-door {
    max-width: 350px;
    position: absolute;
    bottom: 56.7%;
    left: 3%;
    width: 25%;  
    z-index: 2;
}

.scene2-painting1 {
    max-width: 350px;
    position: absolute;
    top: 10%;
    left: 20%;
    width: 25%;  
    z-index: 2;
}

.scene2-painting2 {
    max-width: 350px;
    position: absolute;
    top: 15%;
    right: 20%;
    width: 25%;  
    z-index: 2;
}

.scene2-boot {
    max-width: 350px;
    position: absolute;
    bottom: 10%;
    left: 14%;
    width: 15%;  
    z-index: 2;
}

.scene2-lamp-mystery {
    position: absolute;
    bottom: 35.3%;
    left: 19.9%;
    width: 33.2%;  
    z-index: 3;
    cursor: pointer;
}

.scene2-lamp {
    max-width: 350px;
    position: absolute;
    bottom: 35%;
    left: 18%;
    width: 35%;  
    z-index: 2; /* Unchanged */
    visibility: hidden;
}

.scene2-rug-mystery {
    position: absolute;
    bottom: 14%;
    left: 20%;
    width: 50%;  
    z-index: 3;
    cursor: pointer;
}

.scene2-rug {
    max-width: 350px;
    position: absolute;
    bottom: 14%;
    left: 20%;
    width: 50%;  
    z-index: 2;
    visibility: hidden;
}

.scene2-sofa {
    max-width: 350px;
    position: absolute;
    bottom: 27%;
    left: 43%;
    width: 55%;  
    z-index: 2;
    visibility: hidden;
}

.scene2-sofa-mystery {
    position: absolute;
    bottom: 27%;
    left: 43%;
    width: 55%;  
    z-index: 3;
    cursor: pointer;
}

.scene2-bookcase {
    max-width: 350px;
    position: absolute;
    top: 24%;
    right: 3%;
    width: 26%;  
    z-index: 2;
    visibility: hidden;
}

.scene2-bookcase-mystery {
    position: absolute;
    top: 24%;
    right: 3%;
    width: 26%;  
    z-index: 2;
    cursor: pointer;
}

.scene2-lamp-mystery, .scene2-rug-mystery, .scene2-sofa-mystery, .scene2-bookcase-mystery {
    animation: growAndShrink 2s infinite ease-in-out;
}

.scene2-lamp-mystery, .scene2-rug-mystery, .scene2-sofa-mystery, .scene2-bookcase-mystery {
    opacity: 0;
    visibility: hidden; // Ensure they are not visible initially
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; // Smooth transition
}


/* Ensure regular items are initially hidden */
.scene2-lamp, .scene2-rug, .scene2-sofa, .scene2-bookcase {
    opacity: 0;
    visibility: hidden;
}



@keyframes growAndShrink {
  0%, 100% {
    transform: scale(1); /* Original size */
  }
  50% {
    transform: scale(1.02); /* Grown size */
  }
}

@keyframes fadeOutSpecial {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    21% {
        opacity: 0;
        transform: scale(0.95); /* Scales to 96%, creating the 4% outside-in effect */
    }
    100% {
        opacity: 0;
        transform: scale(0.95); /* Remain scaled and faded out */
    }
}



.mystery-fade-out-special {
    animation: fadeOutSpecial 2s forwards;
}




.fade-out {
    opacity: 0;  /* Adjust as needed */
    transition: opacity 1s ease-in-out;  /* Smooth fade-out transition */
}

body.fade-out {
    background: white;
    transition: background 0.5s ease-in-out; /* Smooth transition to the white background */
}
}


/*desktop*/

body {
    opacity: 0;
    animation: fadeIn 3s ease-in-out forwards;
}

body.fade-out {
    background-color: black;
    transition: background 1s ease-in-out; /* Adjust the transition duration as needed */
}


.loaded {
    opacity: 1;
}

.instruction-screen {
    position: absolute;
    top: 50%;
    right: calc((100vw - 800px) / 4 - 200px / 2); /* Adjusted for centering */
    width: 200px; /* Width of the rectangle */
    height: 400px; /* Height of the rectangle */
    background-color: white;
    z-index: 1;
    border-radius: 5px;
    transform: translateY(-50%);
    transition: opacity 2s ease-in-out;
    opacity: 1;
    display: flex; /* Flexbox for centering content */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    text-align: center; /* Center text horizontally */
    overflow: hidden; /* Prevents text from overflowing */
}

.instruction-text {
    padding: 10px; /* Padding for the text */
    font-size: 24px; /* Adjust font size as needed */
    cursor: default;
    color: black;
    font-family: 'WalterTurncoat', sans-serif;
}


.instructions-text-hidden {
    color: lightblue;
}



.scene2-background-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    z-index: 0; /* Place it behind other elements */


}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@media screen and (min-width: 500px) {

body, html {
/*    background: linear-gradient(to bottom, #FF96BE 35%, #FFF496 50%);*/
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background 1s ease-in-out;
    background-color: black;
}

.preload-image {
    opacity: 0;   
    transition: opacity 0.5s ease-in-out; 
} 


@media screen and (min-resolution: 1dppx) {
.scene2-container {
    width: 700px;
    height: 450px;
    max-height: 100vh;
    max-width: calc(100vh * 16 / 9);
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    z-index: 4;
    }
}

@media screen and (min-resolution: 2dppx) {
.scene2-container {
    width: 800px;
    height: 500px;
    max-height: 100vh;
    max-width: calc(100vh * 16 / 9);
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    z-index: 4;
    }
}


.scene2-background {
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;    
    height: 100%;   
    background-size: cover;   
    background-position: center;  
}

.scene2-door {
    position: absolute;
    bottom: 56.5%;
    left: 6%;
    width: 12%;  
    min-width: 11.76%;  /* 98% of 12% */
    max-width: 15.3%;  /* 102% of 15% */
    z-index: 2;
}

.scene2-painting1 {
    position: absolute;
    top: 10%;
    left: 35%;
    width: 12%;  
    min-width: 11.76%;  /* 98% of 12% */
    max-width: 16.32%;  /* 102% of 16% */
    z-index: 2;
}

.scene2-painting2 {
    position: absolute;
    top: 15%;
    left: 55%;
    width: 12%;  
    min-width: 11.76%;  /* 98% of 12% */
    max-width: 18.36%;  /* 102% of 18% */
    z-index: 2;
}

.scene2-boot {
    position: absolute;
    bottom: 15%;
    left: 14%;
    width: 8%;  
    min-width: 7.84%;  /* 98% of 8% */
    max-width: 10.2%;  /* 102% of 10% */
    z-index: 2;
}

.scene2-lamp {
    position: absolute;
    bottom: 35%;
    left: 18%;
    width: 17%;  
    min-width: 14.7%;  /* 98% of 15% */
    max-width: 20.4%;  /* 102% of 20% */
    z-index: 2;
}

.scene2-lamp-mystery {
    max-width: 350px;
    position: absolute;
    bottom: 35.6%;
    left: 18.9%;
    width: 16%;  
    z-index: 3; 
    cursor: pointer;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scene2-lamp, .scene2-rug, .scene2-sofa, .scene2-bookcase {
    animation: popIn 1s forwards;
    transition: transform 0.5s ease-in-out;
    will-change: transform, opacity;
    cursor: pointer;
}


.scene2-rug {
    position: absolute;
    bottom: 1%;
    left: 33%;
    width: 18%;  
    min-width: 30.46%;  /* 98% of 27% */
    max-width: 17.6%;  /* 102% of 30% */
    z-index: 2;
}

.scene2-rug-mystery {
    position: absolute;
    bottom: 1%;
    left: 33%;
    width: 30.5%;  
    z-index: 3;
    cursor: pointer;
}

.scene2-sofa {
    position: absolute;
    bottom: 27%;
    left: 45%;
    width: 30%;  
    min-width: 27.44%;  /* 98% of 28% */
    max-width: 35.7%;  /* 102% of 35% */
    z-index: 2;
}

.scene2-sofa-mystery {
    position: absolute;
    bottom: 27%;
    left: 44.5%;
    width: 31%;  
    z-index: 3;
    cursor: pointer;
}

.scene2-bookcase {
    position: absolute;
    top: 4%;  
    right: 5%;
    width: 18%;  
    min-width: 14.7%;  /* 98% of 15% */
    max-width: 20.4%;  /* 102% of 20% */
    z-index: 2;
}

.scene2-bookcase-mystery {
    position: absolute;
    top: 3%;
    right: 4.7%;
    width: 18.5%;  
    z-index: 2;
    cursor: pointer;
}

.scene2-lamp-mystery, .scene2-rug-mystery, .scene2-sofa-mystery, .scene2-bookcase-mystery {
    animation: growAndShrink 2s infinite ease-in-out;
    animation-delay: 0s; /* Ensures all animations start simultaneously */
}


.scene2-lamp-mystery, .scene2-rug-mystery, .scene2-sofa-mystery, .scene2-bookcase-mystery,
.scene2-lamp, .scene2-rug, .scene2-sofa, .scene2-bookcase {
    transition: opacity 2s ease;
    opacity: 1;
}

/* Ensure regular items are initially hidden */
.scene2-lamp, .scene2-rug, .scene2-sofa, .scene2-bookcase {
    opacity: 0;
    visibility: hidden;
}



@keyframes growAndShrink {
  0%, 100% {
    transform: scale(1); /* Original size */
  }
  50% {
    transform: scale(1.02); /* Grown size */
  }
}

@keyframes fadeOutSpecial {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    21% {
        opacity: 0;
        transform: scale(0.95); /* Scales to 96%, creating the 4% outside-in effect */
    }
    100% {
        opacity: 0;
        transform: scale(0.95); /* Remain scaled and faded out */
    }
}



.mystery-fade-out-special {
    animation: fadeOutSpecial 2s forwards;
}


.fade-out {
    opacity: 0;
}


.scene2-backdrop.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-in-out; /* Smooth fade-out transition for the backdrop */
}

.scene2-backdrop.fade-in {
    opacity: 1;
    transition: opacity 1s ease-in-out; /* Smooth fade-out transition for the backdrop */
}


.video-container {
    position: relative;
}

.controls-container {
    width: 500px; 
    position: absolute;
    bottom: 10px;
    left: 20%;
    z-index: 1000;
    visibility: hidden; /* Initially hidden */
    opacity: 0; /* Initially fully transparent */
    transition: opacity 1s ease;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 40%;
}

.volume-label {
    position: absolute;
    bottom: 0;
    left: 26%;
    width: 11%;
}

.volume-control {
    position: absolute;
    left: 35%; 
    bottom: 0;
    width: 50%; 
}

.volume-slide {
    position: absolute;
    width: 100%; 
    left: 15%; 
    padding-bottom: 3%;
}

.volume-knob {
    position: absolute; 
    width: 4%;
    left: 500px;
    transform: translateX(-50%); /* Center the knob */
}

.pause {
    position: absolute;
    left: 57%; 
    width: 3.5%;
}

.play {
    position: absolute;
    left: 63.5%;
    bottom: 0;
    width: 7%;
}


.volume-knob, .play, .pause {
    cursor: pointer;
    transition: transform 0.06s ease-out; /* Adjusted easing function and fixed duration */
    transform-origin: center center;
    backface-visibility: hidden; /* Prevent potential graphical glitches */
    transform: scale(1) translateX(-50%); /* Default transform value */
}

.volume-knob:active, .play:active, .pause:active {
    transform: scale(1.05) translateX(-50%);
}


#video1, #video2, #video3, #video4 {
    width: 900px; /* fixed it to this */
    max-width: 1000px;
    position: fixed;      /* This will position the video relative to the viewport */
    top: 50%;             /* Set the top edge to 50% of the viewport height */
    left: 50%;            /* Set the left edge to 50% of the viewport width */
    transform: translate(-50%, -50%); /* This moves the video up and left by half its own height and width, respectively, centering it in the viewport */
    z-index: 900;        /* This ensures the video sits on top of other content */
    transition: opacity 2.5s ease-in-out;  // Increase from 0.5s to 1s
}

/*.scene2-lamp:focus, .scene2-rug:focus, .scene2-sofa:focus, .scene2-bookcase:focus {
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.scene2-lamp:active, .scene2-rug:active, .scene2-sofa:active, .scene2-bookcase:active {
    outline: none;
    border: none;
}*/

.circle-container {
        position: absolute;
        top: 50%;
        /* Calculate the left position */
        left: calc((100vw - 800px) / 4 - 21.5px); /* Half the width of .circle subtracted */
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 50px;
        z-index: 1000;
    }

    /* Styles for each circle */
    .circle {
        width: 43px; /* Circle size */
        height: 43px;
        background-color: #0065ce; /* Circle color */
        border-radius: 50%; /* Makes it round */
        cursor: pointer;
        transition: background-color 0.5s ease; /* Smooth transition for background color */
        position: relative; /* Position relative to allow absolute positioning inside */
        z-index: 1000; /* Ensure it's above other elements */
    }

    /* Hover effect for circles */
    .circle:hover {
        background-color: #68c450; /* Color on hover */
    }

    /* Styles for the anchor tag inside each circle */
    .circle a.scene-button {
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background: transparent; /* No background color */
        border-radius: 50%; /* Maintain the round shape */
        z-index: 1000; /* Ensure links are clickable */
        pointer-events: auto; /* Ensure they can be clicked */
    }



}
