/* ========== ENHANCED LOADING SCREEN - ULTRA ATTRACTIVE ========== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 152, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 87, 34, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0d00 25%, #2d1810 50%, #3e2723 75%, #1a0d00 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-in-out;
    overflow: hidden;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255, 152, 0, 0.03) 49%, rgba(255, 152, 0, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 87, 34, 0.03) 49%, rgba(255, 87, 34, 0.03) 51%, transparent 52%);
    background-size: 60px 60px;
    animation: gridMove 8s linear infinite;
}

.loading-background-effects {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 152, 0, 0.1), rgba(255, 87, 34, 0.1));
    animation: floatingElements 12s ease-in-out infinite;
    filter: blur(2px);
}

.element-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.element-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 20%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.element-3 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 10%;
    animation-delay: 6s;
    animation-duration: 12s;
}

.element-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    animation-delay: 9s;
    animation-duration: 20s;
}

.element-5 {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
    animation-delay: 12s;
    animation-duration: 14s;
}

.loading-content {
    text-align: center;
    z-index: 2;
    animation: contentEntrance 2s ease-out;
    position: relative;
}

.loading-content::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: 
        radial-gradient(circle, rgba(255, 152, 0, 0.1) 0%, rgba(255, 87, 34, 0.05) 30%, transparent 70%);
    border-radius: 50%;
    animation: contentAura 6s ease-in-out infinite alternate;
}

.loading-logo {
    position: relative;
    margin-bottom: 3rem;
    display: inline-block;
}

.logo-outer-ring, .logo-inner-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-outer-ring {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #ff9800, #ff5722, #f44336, #ff9800);
    background-size: 400% 400%;
    animation: outerRingRotate 6s linear infinite;
    filter: blur(1px);
}

.logo-inner-ring {
    width: 100px;
    height: 100px;
    background: linear-gradient(-45deg, #f44336, #ff5722, #ff9800, #f44336);
    background-size: 400% 400%;
    animation: innerRingRotate 4s linear infinite reverse;
    filter: blur(0.5px);
}

.logo-animate {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 3;
    animation: logoAdvanced 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 152, 0, 0.8)) 
            drop-shadow(0 0 60px rgba(255, 87, 34, 0.6))
            drop-shadow(0 0 90px rgba(244, 67, 54, 0.4));
    border-radius: 50%;
}

.logo-pulse-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 152, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulsatingGlow 3s ease-in-out infinite;
    z-index: 1;
}

.loading-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.letter {
    display: inline-block;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(255, 152, 0, 0.8),
        0 0 40px rgba(255, 87, 34, 0.6),
        0 0 60px rgba(244, 67, 54, 0.4);
    animation: letterDance 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.letter:nth-child(1) { animation-delay: 0.1s; }
.letter:nth-child(2) { animation-delay: 0.2s; }
.letter:nth-child(3) { animation-delay: 0.3s; }
.letter:nth-child(4) { animation-delay: 0.4s; }
.letter:nth-child(5) { animation-delay: 0.5s; }
.letter:nth-child(6) { animation-delay: 0.6s; }
.letter:nth-child(8) { animation-delay: 0.8s; }
.letter:nth-child(9) { animation-delay: 0.9s; }
.letter:nth-child(10) { animation-delay: 1.0s; }
.letter:nth-child(11) { animation-delay: 1.1s; }
.letter:nth-child(12) { animation-delay: 1.2s; }

.loading-subtitle {
    font-size: 1.4rem;
    color: #ff9800;
    margin-bottom: 1rem;
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
    animation: subtitleGlow 3s ease-in-out infinite alternate;
}

.loading-tagline {
    margin-bottom: 3rem;
    opacity: 0.9;
}

.tagline-text {
    font-size: 1rem;
    color: #ffffff;
    font-style: italic;
    opacity: 0.8;
    animation: taglineShimmer 4s ease-in-out infinite;
}

.loading-progress {
    width: 350px;
    margin-top: 2rem;
}

.progress-container {
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 152, 0, 0.2);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.3), transparent);
    animation: progressPreloader 2s linear infinite;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800 0%, #ff5722 25%, #f44336 50%, #ff5722 75%, #ff9800 100%);
    background-size: 200% 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
    position: relative;
    animation: progressAdvanced 3s linear infinite;
    box-shadow: 
        0 0 20px rgba(255, 152, 0, 0.8),
        0 0 40px rgba(255, 87, 34, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.progress-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.5), transparent);
    border-radius: 20px;
    filter: blur(5px);
    animation: progressGlowWave 2s linear infinite;
}

.progress-percentage {
    display: flex;
    align-items: baseline;
    min-width: 60px;
    justify-content: center;
}

.progress-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ff9800;
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
    animation: numberGlow 2s ease-in-out infinite alternate;
}

.percentage-symbol {
    font-size: 1.2rem;
    color: #ffffff;
    margin-left: 2px;
    opacity: 0.8;
}

.loading-status {
    margin-top: 1.5rem;
}

.status-text {
    font-size: 0.9rem;
    color: #ffffff;
    opacity: 0.7;
    animation: statusPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.loading-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.loading-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ff9800 0%, #ff5722 50%, transparent 100%);
    border-radius: 50%;
    animation: advancedParticleFloat 6s linear infinite;
    opacity: 0.8;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
}

.loading-particle:nth-child(odd) {
    background: radial-gradient(circle, #ff5722 0%, #f44336 50%, transparent 100%);
    animation-duration: 7s;
    width: 6px;
    height: 6px;
}

.loading-particle:nth-child(3n) {
    background: radial-gradient(circle, #f44336 0%, #ff9800 50%, transparent 100%);
    animation-duration: 8s;
    width: 4px;
    height: 4px;
}

.loading-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 152, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 152, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridOverlayMove 10s linear infinite;
    z-index: 0;
}

/* ========== TYPING TEXT FIX ========== */
.typing-text {
    min-height: 1.5em;
    display: inline-block;
    font-weight: 600;
    color: #ff9800;
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
    border-right: 3px solid transparent;
    animation: blinkCursor 0.75s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    /* Ensure clean start - no content initially */
    content: '';
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 1rem 0 1.5rem 0;
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Cursor Blinking */
@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: #ff9800; }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Fix for text visibility and clean initialization */
.hero-hidden .typing-text {
    opacity: 0;
    content: '';
}

.hero-hidden .typing-text::before {
    content: '';
}

.hero:not(.hero-hidden) .typing-text {
    opacity: 1;
}

/* Ensure typing text starts empty */
.typing-text::before {
    content: '';
}

/* Hide any placeholder or initial content */
.typing-text:empty::before {
    content: '';
}

/* ========== ENHANCED KEYFRAME ANIMATIONS ========== */
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes floatingElements {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(20px, -30px) rotate(90deg) scale(1.1); }
    50% { transform: translate(-15px, -20px) rotate(180deg) scale(0.9); }
    75% { transform: translate(30px, 10px) rotate(270deg) scale(1.05); }
}

@keyframes contentEntrance {
    0% { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes contentAura {
    0% { opacity: 0.3; transform: translateX(-50%) scale(1) rotate(0deg); }
    100% { opacity: 0.6; transform: translateX(-50%) scale(1.2) rotate(360deg); }
}

@keyframes outerRingRotate {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg);
        background-position: 0% 50%;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg);
        background-position: 100% 50%;
    }
}

@keyframes innerRingRotate {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg);
        background-position: 0% 50%;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(-360deg);
        background-position: 100% 50%;
    }
}

@keyframes logoAdvanced {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 30px rgba(255, 152, 0, 0.8)) 
                drop-shadow(0 0 60px rgba(255, 87, 34, 0.6));
    }
    25% { 
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 40px rgba(255, 152, 0, 1)) 
                drop-shadow(0 0 80px rgba(255, 87, 34, 0.8));
    }
    50% { 
        transform: scale(1.05) rotate(0deg);
        filter: drop-shadow(0 0 50px rgba(255, 152, 0, 0.9)) 
                drop-shadow(0 0 90px rgba(244, 67, 54, 0.7));
    }
    75% { 
        transform: scale(1.1) rotate(-5deg);
        filter: drop-shadow(0 0 40px rgba(255, 152, 0, 1)) 
                drop-shadow(0 0 80px rgba(255, 87, 34, 0.8));
    }
}

@keyframes pulsatingGlow {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 0.7; 
        transform: translate(-50%, -50%) scale(1.3); 
    }
}

@keyframes letterDance {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
        text-shadow: 
            0 0 20px rgba(255, 152, 0, 0.8),
            0 0 40px rgba(255, 87, 34, 0.6);
    }
    50% { 
        transform: translateY(-10px) rotate(2deg) scale(1.05);
        text-shadow: 
            0 0 30px rgba(255, 152, 0, 1),
            0 0 60px rgba(255, 87, 34, 0.8),
            0 0 80px rgba(244, 67, 54, 0.6);
    }
}

@keyframes subtitleGlow {
    0% { 
        text-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
        opacity: 0.9;
    }
    100% { 
        text-shadow: 
            0 0 30px rgba(255, 152, 0, 1),
            0 0 50px rgba(255, 87, 34, 0.8);
        opacity: 1;
    }
}

@keyframes taglineShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes progressPreloader {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes progressAdvanced {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes progressGlowWave {
    0% { opacity: 0; left: -100%; }
    50% { opacity: 1; }
    100% { opacity: 0; left: 100%; }
}

@keyframes numberGlow {
    0% { 
        text-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
        transform: scale(1);
    }
    100% { 
        text-shadow: 
            0 0 30px rgba(255, 152, 0, 1),
            0 0 50px rgba(255, 87, 34, 0.8);
        transform: scale(1.05);
    }
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes advancedParticleFloat {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg) scale(0);
        opacity: 0;
    }
}

@keyframes gridOverlayMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}
