/* Reset defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Prevent body scroll */
    background-color: #1a1a1a;
    /* Dark background to focus on image */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    font-size: 1.5rem;
    z-index: 2000;
    /* On top of everything */
    transition: opacity 0.5s ease-out;
}

.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    /* Initially hidden */
    transition: opacity 1s ease-in;
}

.image-container.loaded {
    opacity: 1;
}

img {
    max-height: 100vh;
    max-width: 100%;
    /* Default to fit screen */
    object-fit: contain;
    display: block;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.image-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.image-container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Mobile/Vertical Specific Styles */
@media (orientation: portrait) {
    .image-container {
        display: block;
        /* Allow normal flow for scrolling */
        overflow-x: auto;
        /* Enable horizontal scroll */
        overflow-y: hidden;
        white-space: nowrap;
        /* Keep image in one line if we were using background, but for img tag: */
        text-align: center;
        /* Center if smaller */
    }

    img {
        max-width: none;
        /* Allow image to exceed screen width */
        height: 100vh;
        /* Fix height to screen height */
        width: auto;
        /* Allow width to grow based on aspect ratio */
        margin: 0 auto;
    }
}

/* Magnifying Glass */
.magnifier-lens {
    position: fixed;
    /* Fixed to follow mouse easily regardless of scroll */
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: none;
    /* Size of the lens */
    width: 150px;
    height: 150px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    pointer-events: none;
    /* Let events pass through to image */
    z-index: 1000;
    overflow: hidden;
    /* Ensure zoomed image stays in circle */
}

/* Hide actual cursor when hovering image for better effect? Optional */
.image-container img {
    cursor: crosshair;
}

/* Easter Egg: SOS Flash */
/* Changed to Grayscale as requested */
.sos-active {
    filter: grayscale(100%) contrast(1.2);
    transition: filter 10s ease-out;
    /* Slow fade into despair/grayscale */
}

/* Shake Effect helper */
.shake-active {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}