* {
    box-sizing: border-box;
}

/* Video Background */
.video-background {
    background: #000;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -99;
}

.video-foreground,
.video-background iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Blurred Overlay */
.blurred-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 75%); /* Semi-transparent white */
    z-index: -50; /* Above the video but below the content -50*/
}

/* Preload Overlay */
.preload-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

.preload-content {
    text-align: center;
    color: white;
}

.glitch-icon {
    margin: 0 auto;
    width: 100px;
    height: 100px;
    cursor: pointer;
    position: relative;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 80px;
    color: white;
    animation: pulse 2s infinite;
}

.glitch-icon::before,
.glitch-icon::after {
    content: "!";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-icon::before {
    color: #0ff;
    z-index: -1;
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch-icon::after {
    color: #f0f;
    z-index: -2;
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes glitch-anim2 {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(3px, -3px);
    }
    40% {
        transform: translate(3px, 3px);
    }
    60% {
        transform: translate(-3px, -3px);
    }
    80% {
        transform: translate(-3px, 3px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

/* Content Styling */
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

.content h1 {
    font-family: 'Bebas Neue', sans-serif;
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    mix-blend-mode:luminosity;
}

.content p {
    display:block;
    margin: 10px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 3px;
}

.content nav a {
    display: inline-block;
    margin: 10px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 3px;
}

/* Aspect Ratio Adjustments for Video */
@media (min-aspect-ratio: 16/9) {
    .video-foreground { 
        height: 300%; 
        top: -100%; 
    }
}

@media (max-aspect-ratio: 16/9) {
    .video-foreground { 
        width: 300%; 
        left: -100%; 
    }
}

/* Responsive Design for Smaller Screens */
@media all and (max-width: 600px) {
    .content nav a {
        margin: 5px;
        font-size: 0.8em;
    }
}

@media all and (max-width: 500px) {
    .content nav a {
        padding: 3px;
    }
}

/* Style for the Image Icon */
#image-icon {
    position: fixed;
    left: 50%;
    bottom: 5px; /* Adjust the bottom spacing as needed */
    transform: translateX(-50%);
    cursor: pointer;
    width: 100px;
    height: 100px;
    opacity: 0%;
}

#image-icon img {
    width: 50px;
    height: 50px;
    object-fit: cover; /* Keeps the aspect ratio of the image */
}

/* Style for the Popup Window */
#image-popup {
    position: fixed;
    left: 50%;
    bottom: 120px; /* Position slightly above the icon */
    transform: translate(-50%, 0);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translate(-50%, 30px) scale(0); /* Start off-screen */
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent background matching h1 */
    border-radius: 5px; /* Match the h1 style */
    text-align: center; /* Center-align the contents */
}

#image-popup.open {
    transform: translate(-50%, 0) scale(1);
}

#image-popup img {
    width: 250px;
    height: 250px;
    object-fit: contain; /* Keeps the aspect ratio without cropping */
    border-radius: 10px; /* Optional: for rounded corners */
    margin-bottom: 10px; /* Spacing between the image and the refresh button */
}

/* Style for the Refresh Button */
#refresh-button {
    font-family: 'Bebas Neue', sans-serif; /* Matching the font of your h1 */
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
    color: white; /* Text color */
    border: none; /* Removing the default border */
    padding: 10px 20px; /* Adding some padding */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Cursor changes to pointer on hover */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

#refresh-button:hover {
    background-color: rgba(0, 0, 0, 0.4); /* Slightly darker on hover */
}
