/* Islamic-themed loading animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 20, 28, 0.98);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: fadeIn 0.7s ease forwards;
    overflow: hidden;
    
    /* Enhanced background pattern with celestial elements */
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(58, 191, 248, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(58, 191, 248, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(13, 110, 253, 0.05) 0%, transparent 60%),
        linear-gradient(60deg, rgba(0, 8, 20, 0.95) 0%, rgba(16, 22, 30, 0.9) 100%);
    
    /* Subtle star background */
    position: relative;
}

/* Enhanced stars in the background */
.loading-overlay::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 25% 15%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 35%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 65%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 70%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(2px 2px at 15% 45%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        radial-gradient(2px 2px at 60% 75%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        radial-gradient(2px 2px at 90% 10%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        /* Add larger stars for more visibility */
        radial-gradient(2.5px 2.5px at 20% 20%, rgba(255, 255, 255, 1) 0%, transparent 100%),
        radial-gradient(2.5px 2.5px at 40% 70%, rgba(255, 255, 255, 1) 0%, transparent 100%),
        radial-gradient(2.5px 2.5px at 70% 40%, rgba(255, 255, 255, 1) 0%, transparent 100%),
        radial-gradient(2.5px 2.5px at 80% 80%, rgba(255, 255, 255, 1) 0%, transparent 100%);
    opacity: 0.7;
    z-index: -1;
    animation: twinkle 4s ease-in-out infinite alternate;
}

.loading-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
    border-radius: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(58, 191, 248, 0.4);
    box-shadow: 0 0 40px rgba(58, 191, 248, 0.25), inset 0 0 40px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    width: 500px;
    animation: contentAppear 0.8s cubic-bezier(0.17, 0.84, 0.44, 1) forwards;
    margin: 0 auto; /* Center horizontally */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100; /* Ensure loading content is above other elements */
    
    /* Enhanced Islamic decorative border with geometric pattern */
    background-image: 
        linear-gradient(45deg, rgba(58, 191, 248, 0.12) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(58, 191, 248, 0.12) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(58, 191, 248, 0.12) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(58, 191, 248, 0.12) 75%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30 30 60 0 30z' fill='none' stroke='rgba(58, 191, 248, 0.08)' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, 60px 60px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px, center center;
    backdrop-filter: blur(3px);
    
    /* Add subtle glow effect on hover */
    transition: box-shadow 0.5s ease, transform 0.5s ease;
    
    /* Ensure content stays within viewport */
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.loading-content:hover {
    box-shadow: 0 0 50px rgba(58, 191, 248, 0.25), inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.loading-spinner {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2.5rem;
    animation: floatAnimation 3s ease-in-out infinite, rotate 20s linear infinite;
}

/* Base Islamic pattern styling */
.islamic-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%233ABFF8' stroke-width='2' d='M60,10 L110,60 L60,110 L10,60 Z M30,60 L60,30 L90,60 L60,90 Z M10,60 A50,50 0 0,1 110,60 A50,50 0 0,1 10,60'/%3E%3C/svg%3E");
    background-size: contain;
    animation: rotate 4s linear infinite;
    filter: drop-shadow(0 0 8px rgba(58, 191, 248, 0.6));
}

/* Dream Source-specific patterns */
.pattern-rahmani {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%2372BB53' stroke-width='2' d='M60,10 L110,60 L60,110 L10,60 Z M30,60 L60,30 L90,60 L60,90 Z M10,60 A50,50 0 0,1 110,60 A50,50 0 0,1 10,60'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 8px rgba(114, 187, 83, 0.6));
}

.pattern-nafsani {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%233ABFF8' stroke-width='2' d='M60,10 L110,60 L60,110 L10,60 Z M30,60 L60,30 L90,60 L60,90 Z M10,60 A50,50 0 0,1 110,60 A50,50 0 0,1 10,60'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 8px rgba(58, 191, 248, 0.6));
}

.pattern-shaytani {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%23EF4444' stroke-width='2' d='M60,10 L110,60 L60,110 L10,60 Z M30,60 L60,30 L90,60 L60,90 Z M10,60 A50,50 0 0,1 110,60 A50,50 0 0,1 10,60'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

/* Symbol-specific patterns */
.pattern-water {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%2336D1DC' stroke-width='2' d='M30,40 Q60,20 90,40 T150,40 M30,60 Q60,40 90,60 T150,60 M30,80 Q60,60 90,80 T150,80' stroke-linecap='round'/%3E%3C/svg%3E");
    animation: wave 6s linear infinite;
}

.pattern-fire {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%23FF9966' stroke-width='2' d='M60,10 C70,30 80,20 60,40 C40,60 80,50 60,80 C40,110 80,90 60,110' stroke-linecap='round'/%3E%3C/svg%3E");
    animation: flicker 3s ease-in-out infinite;
}

.pattern-celestial {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%23FFD700' stroke-width='2' d='M60,10 L63,20 L70,20 L65,25 L68,35 L60,30 L52,35 L55,25 L50,20 L57,20 Z' /%3E%3Ccircle cx='90' cy='30' r='5' stroke='%23E0E0E0' fill='none' /%3E%3Ccircle cx='30' cy='90' r='10' stroke='%23C0C0C0' fill='none' /%3E%3C/svg%3E");
    animation: twinkle 4s ease infinite;
}

.pulse-ring {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border: 3px solid #3ABFF8;
    border-radius: 50%;
    opacity: 0;
    animation: pulse 2.5s ease-out infinite;
    box-shadow: 0 0 15px rgba(58, 191, 248, 0.4);
}

.inner-circle {
    position: absolute;
    top: 35%;
    left: 35%;
    width: 30%;
    height: 30%;
    background-color: #3ABFF8;
    border-radius: 50%;
    animation: pulse-opacity 2.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(58, 191, 248, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Ring colors for different dream sources */
.pulse-ring-rahmani {
    border-color: #72BB53;
    box-shadow: 0 0 15px rgba(114, 187, 83, 0.4);
}

.inner-circle-rahmani {
    background-color: #72BB53;
    box-shadow: 0 0 10px rgba(114, 187, 83, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.pulse-ring-shaytani {
    border-color: #EF4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.inner-circle-shaytani {
    background-color: #EF4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.loading-text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    animation: pulse-text 2s ease-in-out infinite;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.95);
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.loading-subtext {
    font-size: 0.95rem;
    opacity: 0.8;
    max-width: 400px;
    margin: 1rem auto;
    font-style: italic;
    line-height: 1.5;
    position: relative;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(58, 191, 248, 0.1);
}

/* Responsive adjustments for various device sizes */
/* Small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .loading-content {
        width: 94%;
        max-width: 320px;
        padding: 1.25rem;
        transform: translate(-50%, -50%) scale(0.95);
    }

    .loading-spinner {
        width: 90px;
        height: 90px;
        margin-bottom: 1.25rem;
    }

    .loading-text {
        font-size: 0.95rem;
        padding: 0 5px;
    }

    .loading-subtext {
        font-size: 0.8rem;
        max-width: 95%;
        padding: 0.5rem;
        margin: 0.75rem auto;
    }

    .bismillah {
        font-size: 1.9rem;
    }
    
    .quran-verse, .hadith-container {
        max-width: 95%;
        padding: 15px;
    }
    
    .verse-arabic {
        font-size: 1.3rem;
    }
    
    .verse-translation, .hadith-text {
        font-size: 0.85rem;
    }
}

/* Medium devices (tablets, between 577px and 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .loading-content {
        width: 85%;
        max-width: 400px;
        padding: 1.5rem;
    }
    
    .loading-spinner {
        width: 110px;
        height: 110px;
        margin-bottom: 1.75rem;
    }
    
    .loading-text {
        font-size: 1.1rem;
    }
    
    .quran-verse, .hadith-container {
        max-width: 90%;
    }
}

/* Large devices (desktops and laptops, between 769px and 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    .loading-content {
        width: 80%;
        max-width: 450px;
    }
}

/* Extra large devices (large desktops, 1201px and up) */
@media (min-width: 1201px) {
    .loading-content {
        max-width: 520px;
    }
    
    .loading-spinner {
        width: 150px;
        height: 150px;
    }
    
    .loading-text {
        font-size: 1.35rem;
    }
}

/* Handling extra small screens like older phones */
@media (max-width: 360px) {
    .loading-content {
        max-width: 280px;
        padding: 1rem;
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    .loading-spinner {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
    
    .bismillah {
        font-size: 1.7rem;
    }
    
    .verse-arabic {
        font-size: 1.2rem;
    }
}

/* Islamic educational content styles */
.quran-verse {
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    background-color: rgba(114, 187, 83, 0.1);
    border: 1px solid rgba(114, 187, 83, 0.15);
    border-left: 4px solid rgba(114, 187, 83, 0.5);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(114, 187, 83, 0.15);
    max-width: 450px;
    animation: slideInUp 1s cubic-bezier(0.17, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.quran-verse:hover {
    transform: translateZ(0) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 20px rgba(114, 187, 83, 0.2);
}

.quran-verse::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(114, 187, 83, 0.2)' d='M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2 M12,4c4.4,0,8,3.6,8,8s-3.6,8-8,8s-8-3.6-8-8S7.6,4,12,4 M15,6H9v2h6V6 M13.5,10h-3v2h3V10 M12,14c-1.7,0-3,1.3-3,3h2c0-0.6,0.4-1,1-1s1,0.4,1,1h2C15,15.3,13.7,14,12,14z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.3;
}

/* Add decorative corner flourishes to Quran verse box */
.quran-verse::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,120 C20,100 40,120 60,100 C80,80 100,100 120,80' stroke='rgba(114, 187, 83, 0.1)' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: bottom right;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.verse-arabic {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: 1.6rem;
    line-height: 1.8;
    text-align: right;
    margin-bottom: 15px;
    color: #fff;
    direction: rtl;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.verse-translation {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin-bottom: 10px;
    padding: 0 5px;
    position: relative;
}

.verse-reference {
    font-size: 0.8rem;
    color: rgba(114, 187, 83, 1);
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px dotted rgba(114, 187, 83, 0.3);
}

.hadith-container {
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    background-color: rgba(58, 191, 248, 0.1);
    border: 1px solid rgba(58, 191, 248, 0.15);
    border-right: 4px solid rgba(58, 191, 248, 0.5);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(58, 191, 248, 0.15);
    max-width: 450px;
    animation: slideInUp 1.2s cubic-bezier(0.17, 0.84, 0.44, 1);
    animation-fill-mode: both;
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hadith-container:hover {
    transform: translateZ(0) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 20px rgba(58, 191, 248, 0.2);
}

.hadith-container::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(58, 191, 248, 0.2)' d='M20,2H4C2.9,2,2,2.9,2,4v18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M20,16H5.2L4,17.2V4h16V16z M11,5h2v6h-2V5z M11,11h2v2h-2V11z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.3;
}

/* Add decorative corner flourishes to Hadith box */
.hadith-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120px;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M120,120 C100,100 80,120 60,100 C40,80 20,100 0,80' stroke='rgba(58, 191, 248, 0.1)' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: bottom left;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.hadith-text {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hadith-source {
    font-size: 0.8rem;
    color: rgba(58, 191, 248, 1);
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px dotted rgba(58, 191, 248, 0.3);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Enhanced Arabic Bismillah styling */
.bismillah-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    position: relative;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Create a subtle glow frame around the Bismillah */
.bismillah-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 4px;
    background: linear-gradient(
        45deg, 
        rgba(58, 191, 248, 0.1), 
        rgba(58, 191, 248, 0.3), 
        rgba(58, 191, 248, 0.1)
    );
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0.7;
    animation: glowPulse 3s ease-in-out infinite;
}

.bismillah {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 2.8rem;
    background: linear-gradient(45deg, #3ABFF8, #0dcaf0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    line-height: 1.5;
    text-shadow: 0 0 15px rgba(58, 191, 248, 0.4);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    animation: colorShift 8s ease-in-out infinite;
}

.bismillah:hover {
    text-shadow: 0 0 20px rgba(58, 191, 248, 0.6);
    transform: scale(1.05);
}

/* Add decorative elements around the Bismillah */
.bismillah::before, 
.bismillah::after {
    content: "❀";
    display: inline-block;
    font-size: 1.5rem;
    color: rgba(58, 191, 248, 0.5);
    margin: 0 10px;
    vertical-align: middle;
    text-shadow: 0 0 10px rgba(58, 191, 248, 0.3);
    animation: rotate 8s linear infinite;
}

.bismillah-meaning {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

@keyframes colorShift {
    0%, 100% { 
        background: linear-gradient(45deg, #3ABFF8, #0dcaf0); 
        background-clip: text; 
        -webkit-background-clip: text;
    }
    33% { 
        background: linear-gradient(45deg, #0dcaf0, #0d6efd); 
        background-clip: text; 
        -webkit-background-clip: text;
    }
    66% { 
        background: linear-gradient(45deg, #0d6efd, #3ABFF8); 
        background-clip: text; 
        -webkit-background-clip: text;
    }
}

/* Animations */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

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

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes contentAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

/* Symbol-specific animations */
@keyframes wave {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-5px) translateY(5px);
    }
    50% {
        transform: translateX(0) translateY(0);
    }
    75% {
        transform: translateX(5px) translateY(-5px);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

@keyframes flicker {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 155, 102, 0.6));
        transform: scale(1) rotate(0deg);
    }
    25% {
        filter: drop-shadow(0 0 12px rgba(255, 155, 102, 0.8));
        transform: scale(1.05) rotate(3deg);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 155, 102, 0.6));
        transform: scale(0.98) rotate(-2deg);
    }
    75% {
        filter: drop-shadow(0 0 10px rgba(255, 155, 102, 0.7));
        transform: scale(1.02) rotate(1deg);
    }
}

@keyframes twinkle {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
        opacity: 1;
    }
    25% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
        opacity: 0.7;
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
        opacity: 1;
    }
    75% {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
        opacity: 0.8;
    }
}
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* Geometric Loading Screen - Enhanced Islamic patterns */
.geometric-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(16, 20, 28, 0.98) 0%, rgba(24, 28, 36, 0.98) 100%);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.geometric-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    max-width: 90%;
    width: 400px;
    animation: contentFadeIn 0.8s ease forwards;
}

.geometric-pattern-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(58, 191, 248, 0.3));
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}