/**
 * Modern Loading Screen
 * Yaratıcı ve modern loading animasyonu
 */

/* Loading Screen Container */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    visibility: visible;
}

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

/* Animated Logo/Spinner */
.loading-screen__logo {
    width: 120px;
    height: 120px;
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-screen__spinner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-screen__spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.6);
    animation: spinnerRotate 1.5s linear infinite;
}

.loading-screen__spinner-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.7);
    animation-duration: 1.5s;
    animation-direction: normal;
}

.loading-screen__spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-top-color: rgba(255, 255, 255, 0.7);
    border-right-color: rgba(255, 255, 255, 0.5);
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.loading-screen__spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    border-top-color: rgba(255, 255, 255, 0.5);
    border-right-color: rgba(255, 255, 255, 0.3);
    animation-duration: 0.9s;
    animation-direction: normal;
}

.loading-screen__spinner-core {
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: corePulse 2s ease-in-out infinite;
    position: relative;
}

.loading-screen__spinner-core::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    animation: coreGlow 1.5s ease-in-out infinite;
}

/* Loading Text */
.loading-screen__text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    opacity: 0.9;
    animation: fadeInUp 0.6s ease-out;
}

.loading-screen__subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

/* Progress Bar */
.loading-screen__progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.loading-screen__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 1));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.loading-screen__progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Loading Dots */
.loading-screen__dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.loading-screen__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: dotPulse 1.4s ease-in-out infinite;
}

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

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

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

/* Particles Background */
.loading-screen__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.loading-screen__particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 8s infinite ease-in-out;
}

/* Animations */
@keyframes spinnerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes corePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 
            0 0 20px rgba(255, 255, 255, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 
            0 0 30px rgba(255, 255, 255, 0.5),
            inset 0 0 25px rgba(255, 255, 255, 0.2);
    }
}

@keyframes coreGlow {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

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

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .loading-screen__logo {
        width: 100px;
        height: 100px;
        margin-bottom: 2rem;
    }
    
    .loading-screen__spinner-ring {
        border-width: 3px;
    }
    
    .loading-screen__text {
        font-size: 1.25rem;
    }
    
    .loading-screen__progress {
        width: 250px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .loading-screen {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
}
