html, body {
    overflow: hidden;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff; /* A light background for contrast */
}

#image-container {
    position: relative;
    width: 80%; /* Adjust as needed */
    max-width: 1200px; /* Optional: limit max size */
    perspective: 1000px; /* Add perspective for 3D effect */
}

#image-container img {
    display: block;
    width: 100%;
    height: auto;
}

.hover-zone {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

#blueprints {
    width: 19%;
    height: 7%;
    bottom: 13%;
    left: 40.5%;
}

#i_liked_blue_after_you {
    width: 34%;
    height: 7%;
    bottom: 23%;
    left: 17%;
}

#seeing_sound {
    width: 23%;
    height: 7%;
    bottom: 23%;
    right: 20%;
}

#roots {
    width: 17%;
    height: 7%;
    bottom: 34%;
    left: 8%;
}

#to_hold {
    width: 17%;
    height: 7%;
    bottom: 34%;
    right: 10%;
}

#image-container.zoomed img[alt="background"] {
    transform: scale(15);
    transition: transform 2s ease-in-out;
}


#meaple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%; /* Adjust size as needed */
    display: none; /* Hidden by default */
    transition: transform 2s ease-in-out;
}

#image-container.zoomed #meaple {
    transform: translate(-50%, -50%);
}

#meaple.rotate {
    display: block;
    animation: spin 2s linear;
}

#meaple.spin-and-move {
    display: block;
    animation: spin 2s linear, move-meaple 2s linear;
    animation-fill-mode: forwards; /* Keeps the meaple at the final position */
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(720deg);
    }
}

@keyframes move-meaple {
    from {
        top: 50%;
        left: 50%;
    }
    to {
        top: 46%;
        left: 67%;
    }
}

#arrow-right {
    position: absolute;
    top: 50%;
    right: 2%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 20px solid black;
    cursor: pointer;
    display: none; /* Hidden by default */
}

#arrow-left {
    position: absolute;
    top: 50%;
    left: 2%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 20px solid black;
    cursor: pointer;
    display: none; /* Hidden by default */
}

.rotate-x-animation {
    animation: rotate-x 0.8s linear;
}

@keyframes rotate-x {
    from {
        transform: rotateX(0deg);
    }
    to {
        transform: rotateX(360deg);
    }
}

#close-btn {
    position: fixed;
    top: 15%;
    right: 5%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: none; /* Hidden by default */
    z-index: 1000;
}

.fade-in-animation {
    animation: fade-in-scale 0.5s ease-in-out;
}

.fade-out-animation {
    animation: fade-out-scale 0.5s ease-in-out;
}

#close-btn::before, #close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: black;
}

#close-btn::before {
    transform: rotate(45deg);
}

#close-btn::after {
    transform: rotate(-45deg);
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-out-scale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.image-fade-out {
    animation: fade-out 0.4s ease-out forwards;
}

.image-fade-in {
    animation: fade-in 0.4s ease-in forwards;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
