/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-light) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Water Bubble Container */
.water-bubble {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    animation: float 3s ease-in-out infinite;
}

/* Logo in Bubble */
.bubble-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bubble-logo img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    border-radius: 50%;
}

/* Fallback Icon */
.bubble-logo .fallback-icon {
    font-size: 4rem;
    color: var(--emerald);
}

/* Water Fill Animation */
.water-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, 
        rgba(13, 122, 74, 0.6) 0%, 
        rgba(10, 92, 54, 0.8) 100%);
    animation: fillWater 2.5s ease-in-out forwards;
    z-index: 1;
}

/* Water Wave Effect */
.water-fill::before,
.water-fill::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 200%;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 45%;
    animation: wave 3s linear infinite;
}

.water-fill::after {
    top: -15px;
    opacity: 0.5;
    animation: wave 4s linear infinite reverse;
}

/* Loading Text */
.loading-text {
    margin-top: 40px;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

.loading-subtext {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 400;
}

/* Animated Dots */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* Animations */
@keyframes fillWater {
    0% {
        height: 0%;
    }
    100% {
        height: 100%;
    }
}

@keyframes wave {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Sparkle Effects */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 40%;
    left: 70%;
    animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
    top: 60%;
    left: 20%;
    animation-delay: 1s;
}

.sparkle:nth-child(4) {
    top: 80%;
    left: 60%;
    animation-delay: 1.5s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .water-bubble {
        width: 150px;
        height: 150px;
    }
    
    .bubble-logo {
        width: 90px;
        height: 90px;
    }
    
    .bubble-logo .fallback-icon {
        font-size: 3rem;
    }
    
    .loading-text {
        font-size: 1.2rem;
    }
    
    .loading-subtext {
        font-size: 0.9rem;
    }
}
