body {
    margin: 0; 
    padding: 0;
    overflow: hidden; 
}

/* Nice Overlay on Body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Overlay Container */
#overlayContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
}

#overlayContainer img {
    max-width: 70vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    opacity: 0.7;
    display: block;
    border-radius: 15px;
}

/* 1. Video Container Styling with FIXED Fallback Image */
#myVideo {
    /* FIXED Fallback Image for all videos (Space Nebula) */
    background-image: url('overlay.jpg');
    background-size: cover; 
    background-position: center; 
    
    /* Full-Screen Positioning and Layering */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    object-fit: cover;
    object-position: center;
}

/* BG Overlay */
#bgOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg2.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* 2. Combined Darker Grain/Pixel Overlay */
#myVideo::before {
    content: ''; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
    pointer-events: none; 

    /* --- Grain/Pixel Effect --- */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3C/rect%3E%3C/svg%3E");
    background-size: 150px; 
    filter: invert(1); 

    /* --- Darker Overlay & Blending --- */
    /* Increased opacity to 0.9 for a darker overlay */
    background-color: rgba(0, 0, 0, 0.9); 
    
    mix-blend-mode: overlay; 
    opacity: 1; 
}

/* 2.5. Raw Xerox Scan Overlay */
#myVideo::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;

    /* --- Xerox Scan Effect --- */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='xeroxFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.1' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23xeroxFilter)'/%3C/rect%3E%3C/svg%3E");
    background-size: 200px;
    filter: contrast(1000%) brightness(50%) invert(1);

    mix-blend-mode: multiply;
    opacity: 0.4;
}


/* 3. Content Styling */
.content {
    position: relative; 
    z-index: 1; 
    
    /* Center the content */
    height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Text styling for readability */
    color: white; 
    font-family: Arial, sans-serif;
    text-align: center;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8); 
}

.content h1 {
    font-size: 3em;
}

.content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.content button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.2); 
    border: 2px solid white;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.content button:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Social Links */
.social-links {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    opacity: 0.5;
}

.social-links a {
    color: white;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    padding: 10px;
}

.social-links a:hover {
    color: #ccc;
}

/* Responsive for social links */
@media (max-width: 768px) {
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    #overlayContainer img {
        max-height: 50vh;
    }
}