/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: fixed;
    background-color: #000;
    color: #fff;
    font-family: 'Playfair Display', serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Hide SVG */
#filters {
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
}

/* Background Video */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

#backgroundVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

#backgroundVideo.visible {
    opacity: 1;
}

/* Stars Canvas */
#starsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Fog Canvas */
#fogCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

/* Main Container */
.main-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

/* Image Morphing Container */
.image-morph-container {
    position: relative;
    width: 400px;
    height: 400px;
    filter: url(#threshold) blur(0.5px);
    /* mix-blend-mode: luminosity; */
}

.morph-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* will-change: opacity, filter; */
}

#image1 {
    opacity: 1;
}

/* Text Morphing Container */
.text-morph-container {
    position: relative;
    width: 80%;
    max-width: 800px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: url(#threshold) blur(0.6px);
}

#text1,
#text2 {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.02em;
    user-select: none;
    will-change: opacity, filter;
}

#text1 {
    color: #fff;
}

#text2 {
    color: #fff;
}

/* Progress Dots */
.progress-container {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.progress-dots {
    display: flex;
    gap: 1rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.progress-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 157, 0.5);
    transition: transform 0.3s ease;
}

.progress-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.progress-dot.active {
    background: #ff6b9d;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
}

.progress-dot.active::after {
    transform: translate(-50%, -50%) scale(1);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Navigation Hint */
.nav-hint {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Ambient glow effect */
/* .main-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(147, 112, 219, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    animation: ambientGlow 8s ease-in-out infinite;
} */

@keyframes ambientGlow {

    0%,
    100% {
        background: radial-gradient(ellipse, rgba(100, 149, 237, 0.15) 0%, transparent 70%);
        transform: translate(-50%, -50%) scale(1);
    }

    25% {
        background: radial-gradient(ellipse, rgba(186, 85, 211, 0.15) 0%, transparent 70%);
        transform: translate(-50%, -50%) scale(1.1);
    }

    50% {
        background: radial-gradient(ellipse, rgba(255, 182, 193, 0.15) 0%, transparent 70%);
        transform: translate(-50%, -50%) scale(1);
    }

    75% {
        background: radial-gradient(ellipse, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .image-morph-container {
        width: 280px;
        height: 280px;
    }

    .text-morph-container {
        height: 200px;
        padding: 0 1rem;
    }

    #text1,
    #text2 {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }
}

/* Smooth page load */
body {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}