body {
    margin: 0;
    overflow: hidden; /* Prevent scrollbars on body, container will handle scroll/pan */
    background-color: #f0f0f0; /* Or your site's background */
}

.content-hidden {
    opacity: 0;
    /* visibility: hidden; // Use if opacity alone isn't enough */
}

.content-visible {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000; /* Black background for the preloader */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensure it's on top of everything */
    opacity: 1;
    transform: translateY(0%); /* Initial vertical position */
    /* Updated transition for slide up and subtle fade */
    transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
}

#preloader.fade-out {
    opacity: 0; /* Fade to fully transparent */
    transform: translateY(-100%); /* Move up out of viewport */
}

#artworkContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #f0f0f0;
    touch-action: none; /* Pan / zoom with trackpad & touch without browser scroll */
}

#panLayer {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
}

#panLayer > img,
#panLayer > video {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    /* Box size matches computed aspect ratio; contain avoids rare decode/crop mismatch on video */
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    backface-visibility: hidden;
}

/* Style for the main content area if needed, initially hidden */
.main-content {
    /* opacity: 0; set by JS initially */
    /* transition: opacity 0.5s ease-in-out; set by .content-visible */
} 