/* splash-screen.css - Optimized Version */

/* 1. Full-screen Background Container */
.splash-screen {
    position: fixed;
    inset: 0; /* A more concise way to write top/left/right/bottom: 0 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    
    /* 🎨 REFINED: Enhanced transition effects with scaling and blur animations for a smoother disappearance */
    transition: opacity 0.5s ease-out, backdrop-filter 0.5s ease-out;
    background: rgba(255, 255, 255, 0.05); /* Slightly reduce background opacity */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px); /* ✨ NEW: Blur effect disappears synchronously when exiting */
    -webkit-backdrop-filter: blur(0px);
}

/* 2. Content Card (The glass effect remains largely unchanged as it's already good) */
.splash-content {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 2.5rem 2rem; /* Adjust padding to accommodate the new loader */
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* ✨ NEW: Add a subtle entrance animation to the content card itself */
    animation: content-fade-in 0.6s ease-out forwards;
    opacity: 0;
    width: fit-content;
    max-width: 90%;
    margin: 0 auto;
}

.splash-content-girl {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 2.5rem 2rem; /* Adjust padding to accommodate the new loader */
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* ✨ NEW: Add a subtle entrance animation to the content card itself */
    animation: content-fade-in 0.6s ease-out forwards;
    opacity: 0;
    /* 🎨 NEW: Limit the width and height to prevent it from taking up the full screen */
    width: fit-content;
    max-width: 60%;
    margin: 0 auto;
}

/* 3. ✨ NEW: Modern "Comet" Loading Animation */
.loader {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;

    /* Use conic-gradient to create a gradient ring */
    background: conic-gradient(#f9cbff, #edb2bc, transparent);
    border-radius: 50%;
    
    /* Use mask to hollow out the center and form a thin ring */
    -webkit-mask: radial-gradient(transparent 18px, white 19px);
    mask: radial-gradient(transparent 18px, white 19px);
    
    /* Animation */
    animation: spin 1.2s linear infinite;
}

/* 4. Text Style and Animation */
.splash-text {
    font-size: 1.2rem;
    color: #f9cbff;
    text-shadow: 0 0 10px rgba(249, 203, 255, 0.5); /* Add a soft halo effect */
    position: relative;
    z-index: 1;

    /* ✨ NEW: Add an entrance animation with a delay to the text to create a sense of hierarchy */
    opacity: 0; /* Initial state is transparent */
    animation: fade-in-up 0.6s ease-out 0.2s forwards; /* Execute with a 0.2s delay */
}

/* 5. Privacy Popup Styles */
.privacy-title {
    font-size: 1.5rem;
    color: #ff69b4;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out 0.1s forwards;
}

.privacy-text {
    font-size: 1rem;
    color: #f9cbff;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out 0.2s forwards;
}

.privacy-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out 0.3s forwards;
}

.privacy-link {
    color: #ffb6c1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #ff69b4;
    text-decoration: underline;
}

.privacy-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out 0.4s forwards;
}

.consent-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.consent-button.accept {
    background: rgba(255, 105, 180, 0.7);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.consent-button.accept:hover {
    background: rgba(255, 105, 180, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.6);
}

.consent-button.reject {
    background: rgba(255, 255, 255, 0.2);
    color: #f9cbff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.consent-button.reject:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 5. Animation Keyframes */

/* Remain unchanged: Rotation animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ✨ NEW: Content element fade-in and float-up animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✨ NEW: Overall fade-in animation for the content card */
@keyframes content-fade-in {
     from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Halo and noise pseudo-elements (Remain unchanged as the effect is good) */
.splash-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 25% 25%, rgba(255, 192, 203, 0.5), transparent 40%); /* 🎨 REFINED: Reduce halo opacity */
    animation: aurora-glow 20s ease-in-out infinite;
    transform-origin: center center;
}
.splash-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.75" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.05"/></svg>');
    pointer-events: none;
}
@keyframes aurora-glow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(0%, -50%) rotate(90deg) scale(0.9); }
    50% { transform: translate(0%, 0%) rotate(180deg) scale(1.1); }
    75% { transform: translate(-50%, 0%) rotate(270deg) scale(0.95); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media screen and (max-width: 768px) {
    .splash-content {
        width: 90%;
        padding: 2rem 1.5rem;
    }

    .privacy-title {
        font-size: 1.3rem;
    }

    .privacy-text {
        font-size: 0.9rem;
    }

    .splash-text {
        font-size: 1rem;
    }

    .privacy-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .consent-button {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .privacy-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .splash-content {
        padding: 1.5rem 1rem;
    }

    .privacy-title {
        font-size: 1.2rem;
    }

    .privacy-text {
        font-size: 0.85rem;
    }

    .loader {
        width: 40px;
        height: 40px;
    }
}