/* Loading Screen for Desa Wisata Andalan - Lembanna */

/* Loading Screen Container */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #133E87 0%, #608BC1 50%, #CBDCEB 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

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


/* Loading Content Container */
.loading-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

/* Logo Animation */
.loading-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.loading-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.loading-logo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: logoSpin 2s linear infinite;
    z-index: -1;
}

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

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.loading-title {
    font-family: 'Playfair Display SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: textGlow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.loading-subtitle {
    font-family: 'Karma', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: textFade 3s ease-in-out infinite;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(203, 220, 235, 0.6);
    }
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Loading Spinner - Custom Beach Theme */
.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 2rem auto;
}



/* Loading Progress Dots */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

.dot:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Loading Message */
.loading-message {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Karma', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    animation: messageSlide 4s ease-in-out infinite;
}

@keyframes messageSlide {
    0%, 25% {
        opacity: 1;
        transform: translateX(-50%) translateY(0px);
    }
    50%, 75% {
        opacity: 0.7;
        transform: translateX(-50%) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0px);
    }
}
/* Floating Particles */
.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 4s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 1.5s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 2.5s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 3.5s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }
    10% {
        transform: translateY(90vh) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(-10vh) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) scale(0);
        opacity: 0;
    }
}

/* Responsive Design - Comprehensive Breakpoints */

/* ========== ULTRAWIDE SCREENS (2560px+) ========== */
@media (min-width: 2560px) {
    .loading-content {
        transform: scale(1.3);
    }
    
    .loading-title {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }
    
    .loading-subtitle {
        font-size: 1.8rem;
        margin-bottom: 4rem;
    }
    
    .loading-logo {
        width: 160px;
        height: 160px;
        margin: 0 auto 3rem;
    }
    
    .loading-dots {
        gap: 16px;
        margin-top: 3rem;
    }
    
    .dot {
        width: 16px;
        height: 16px;
    }
    
    .loading-message {
        font-size: 1.4rem;
        bottom: 4rem;
    }
    
    .particle {
        width: 6px;
        height: 6px;
    }
}

/* ========== LARGE DESKTOP (1920px - 2559px) ========== */
@media (min-width: 1920px) and (max-width: 2559px) {
    .loading-content {
        transform: scale(1.2);
    }
    
    .loading-title {
        font-size: 3rem;
    }
    
    .loading-subtitle {
        font-size: 1.5rem;
    }
    
    .loading-logo {
        width: 140px;
        height: 140px;
        margin: 0 auto 2.5rem;
    }
    
    .loading-dots {
        gap: 14px;
        margin-top: 2.5rem;
    }
    
    .dot {
        width: 14px;
        height: 14px;
    }
    
    .loading-message {
        font-size: 1.2rem;
        bottom: 3.5rem;
    }
    
    .particle {
        width: 5px;
        height: 5px;
    }
}

/* ========== DESKTOP/LAPTOP (1200px - 1919px) ========== */
@media (min-width: 1200px) and (max-width: 1919px) {
    .loading-title {
        font-size: 2.8rem;
    }
    
    .loading-subtitle {
        font-size: 1.3rem;
    }
    
    .loading-logo {
        width: 130px;
        height: 130px;
    }
    
    .loading-message {
        font-size: 1.1rem;
    }
}

/* ========== SMALL LAPTOP (992px - 1199px) ========== */
@media (min-width: 992px) and (max-width: 1199px) {
    .loading-title {
        font-size: 2.5rem;
    }
    
    .loading-subtitle {
        font-size: 1.2rem;
    }
    
    .loading-logo {
        width: 120px;
        height: 120px;
    }
    
    .loading-message {
        font-size: 1rem;
    }
}

/* ========== TABLET LANDSCAPE (768px - 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {

    .loading-content {
        padding: 0 2rem;
        bottom: 8rem;
    }
    
    .loading-title {
        font-size: 2.2rem;
    }
    
    .loading-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .loading-logo {
        width: 110px;
        height: 110px;
        margin: 0 auto 2rem;
    }
    
    .loading-dots {
        gap: 10px;
        margin-top: 2rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .loading-message {
        font-size: 0.95rem;
        bottom: 8rem;
        padding: 0 2rem;
        text-align: center;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
}

/* ========== TABLET PORTRAIT (576px - 767px) ========== */
@media (min-width: 576px) and (max-width: 767px) {
    .loading-content {
        padding: 0 1.5rem;
        bottom: 8rem;
    }
    
    .loading-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .loading-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 2.5rem;
        line-height: 1.4;
    }
    
    .loading-logo {
        width: 100px;
        height: 100px;
        margin: 0 auto 1.5rem;
    }
    
    .loading-dots {
        gap: 8px;
        margin-top: 1.5rem;
    }
    
    .dot {
        width: 9px;
        height: 9px;
    }
    
    .loading-message {
        font-size: 0.9rem;
        bottom: 8rem;
        padding: 0 1.5rem;
        text-align: center;
        line-height: 1.3;
    }
}

/* ========== MOBILE LANDSCAPE (480px - 575px) ========== */
@media (min-width: 480px) and (max-width: 575px) {
    .loading-content {
        padding: 0 1rem;
        bottom: 8rem;
    }
    
    .loading-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
        margin-bottom: 2rem;
        line-height: 1.3;
    }
    
    .loading-logo {
        width: 85px;
        height: 85px;
        margin: 0 auto 1.2rem;
    }
    
    .loading-dots {
        gap: 7px;
        margin-top: 1.2rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .loading-message {
        font-size: 0.85rem;
        bottom: 8rem;
        padding: 0 1rem;
        text-align: center;
        line-height: 1.2;
    }
}

/* ========== MOBILE PORTRAIT (360px - 479px) ========== */
@media (min-width: 360px) and (max-width: 479px) {
    .loading-content {
        padding: 0 0.8rem;
         bottom: 8rem;
    }
    
    .loading-title {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }
    
    .loading-subtitle {
        font-size: 0.8rem;
        padding: 0 0.5rem;
        margin-bottom: 1.8rem;
        line-height: 1.2;
    }
    
    .loading-logo {
        width: 75px;
        height: 75px;
        margin: 0 auto 1rem;
    }
    
    .loading-logo::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
    
    .loading-dots {
        gap: 6px;
        margin-top: 1rem;
    }
    
    .dot {
        width: 7px;
        height: 7px;
    }
    
    .loading-message {
        font-size: 0.8rem;
        bottom: 8rem;
        padding: 0 0.8rem;
        text-align: center;
        line-height: 1.1;
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
}

/* ========== SMALL MOBILE (320px - 359px) ========== */
@media (min-width: 320px) and (max-width: 359px) {
    .loading-content {
        padding: 0 0.5rem;
         bottom: 8rem;
    }
    
    .loading-title {
        font-size: 1.4rem;
        margin-bottom: 0.2rem;
        line-height: 1.1;
    }
    
    .loading-subtitle {
        font-size: 0.7rem;
        padding: 0 0.3rem;
        margin-bottom: 1.5rem;
        line-height: 1.1;
    }
    
    .loading-logo {
        width: 65px;
        height: 65px;
        margin: 0 auto 0.8rem;
    }
    
    .loading-logo::before {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
    }
    
    .loading-dots {
        gap: 5px;
        margin-top: 0.8rem;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .loading-message {
        font-size: 0.7rem;
        bottom: 8rem;
        padding: 0 0.5rem;
        text-align: center;
        line-height: 1;
    }
}

/* ========== EXTRA SMALL MOBILE (280px - 319px) ========== */
@media (max-width: 319px) {
    .loading-content {
        padding: 0 0.3rem;
         bottom: 8rem;
    }
    
    .loading-title {
        font-size: 1.2rem;
        margin-bottom: 0.1rem;
        line-height: 1;
    }
    
    .loading-subtitle {
        font-size: 0.6rem;
        padding: 0 0.2rem;
        margin-bottom: 1.2rem;
        line-height: 1;
    }
    
    .loading-logo {
        width: 55px;
        height: 55px;
        margin: 0 auto 0.6rem;
    }
    
    .loading-logo::before {
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
    }
    
    .loading-logo img {
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
    
    .loading-dots {
        gap: 4px;
        margin-top: 0.6rem;
    }
    
    .dot {
        width: 5px;
        height: 5px;
    }
    
    .loading-message {
        font-size: 0.6rem;
        bottom: 0.8rem;
        padding: 0 0.3rem;
        text-align: center;
        line-height: 0.9;
    }
    
    .particle {
        width: 1.5px;
        height: 1.5px;
    }
}

/* ========== RESPONSIVE ANIMATIONS ========== */
@media (max-width: 767px) {
    @keyframes logoFloat {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-5px);
        }
    }
}

@media (max-width: 479px) {
    @keyframes logoFloat {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-3px);
        }
    }
}

/* ========== RESPONSIVE WAVES ========== */
@media (max-width: 991px) {
    .wave {
        height: 80px;
    }
    
    .wave:nth-child(2) {
        height: 60px;
    }
    
    .wave:nth-child(3) {
        height: 40px;
    }
}

@media (max-width: 575px) {
    .wave {
        height: 60px;
    }
    
    .wave:nth-child(2) {
        height: 45px;
    }
    
    .wave:nth-child(3) {
        height: 30px;
    }
}

@media (max-width: 359px) {
    .wave {
        height: 40px;
    }
    
    .wave:nth-child(2) {
        height: 30px;
    }
    
    .wave:nth-child(3) {
        height: 20px;
    }
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */
@media (prefers-reduced-motion: reduce) {
    .loading-logo,
    .loading-title,
    .loading-subtitle,
    .loading-message,
    .dot,
    .particle,
    .wave {
        animation: none !important;
    }
    
    .loading-logo::before {
        animation: none !important;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    .loading-screen {
        background: linear-gradient(135deg, #000080 0%, #0066cc 50%, #ffffff 100%);
    }
    
    .loading-title,
    .loading-subtitle,
    .loading-message {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .loading-logo img {
        border: 4px solid #ffffff;
    }
    
    .dot,
    .particle {
        background: #ffffff;
    }
}