/**
 * Loading Animation - Ana Sayfa Açılış Animasyonu
 * Gelişmiş özellikler ile güncellendi
 */

/* Loading Screen Overlay */
.crypto-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.crypto-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.crypto-loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Ana içerik container */
.crypto-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

/* Logo */
.crypto-loading-logo {
    margin-bottom: 10px;
}

.crypto-loading-logo img {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
    transition: transform 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* === SPINNER ANIMATION === */
.crypto-loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px 0;
}

.crypto-loading-spinner.spinner .crypto-loading-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.crypto-loading-spinner.spinner .crypto-loading-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    animation: centerPulse 2s ease-in-out infinite;
}

/* === DOTS ANIMATION === */
.crypto-loading-spinner.dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.crypto-loading-dot {
    width: 16px;
    height: 16px;
    background-color: #FFD700;
    border-radius: 50%;
    animation: bouncing 1.4s ease-in-out infinite both;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.crypto-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.crypto-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.crypto-loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes bouncing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* === PROGRESS RING ANIMATION === */
.crypto-loading-progress-ring {
    width: 120px;
    height: 120px;
    border: 6px solid rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.crypto-loading-progress-ring-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(#FFD700 0deg, transparent 0deg);
    border-radius: 50%;
    animation: progressFill 3s ease-in-out infinite;
}

@keyframes progressFill {
    0% { background: conic-gradient(#FFD700 0deg, transparent 0deg); }
    100% { background: conic-gradient(#FFD700 360deg, transparent 360deg); }
}

/* === PULSE ANIMATION === */
.crypto-loading-spinner.pulse {
    display: flex;
    align-items: center;
    justify-content: center;
}

.crypto-loading-pulse-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid #FFD700;
    border-radius: 50%;
    animation: pulseRing 2s ease-in-out infinite;
}

.crypto-loading-pulse-core {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    animation: pulseCore 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
}

@keyframes pulseRing {
    0%, 100% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

@keyframes pulseCore {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* === WAVE ANIMATION === */
.crypto-loading-wave {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.crypto-loading-wave-bar {
    width: 8px;
    height: 20px;
    background: linear-gradient(to top, #FFD700, #FFA500);
    border-radius: 4px;
    animation: waveBar 1.2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.crypto-loading-wave-bar:nth-child(1) { animation-delay: 0s; }
.crypto-loading-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.crypto-loading-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.crypto-loading-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.crypto-loading-wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveBar {
    0%, 40%, 100% {
        transform: scaleY(1);
    }
    20% {
        transform: scaleY(2);
    }
}

/* === CRYPTO COIN ANIMATION === */
.crypto-loading-coin {
    width: 80px;
    height: 80px;
    position: relative;
    animation: coinFlip 2s ease-in-out infinite;
    transform-style: preserve-3d;
}

.crypto-loading-coin-front,
.crypto-loading-coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: #FFD700;
    background: radial-gradient(circle, #1a1a2e, #0f3460);
    border: 4px solid #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    backface-visibility: hidden;
}

.crypto-loading-coin-back {
    transform: rotateY(180deg);
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* Loading Text */
.crypto-loading-text {
    color: #FFD700;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: textGlow 2s ease-in-out infinite;
    margin: 10px 0;
}

.crypto-loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    margin: 10px 0;
    animation: fadeInOut 3s ease-in-out infinite;
    min-height: 20px;
}

/* Progress Bar */
.crypto-loading-progress-container {
    width: 300px;
    margin: 20px 0;
}

.crypto-loading-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.crypto-loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 3px;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.crypto-loading-percentage {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* Skip Button */
.crypto-loading-skip-container {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.crypto-loading-skip-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.crypto-loading-skip-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Ana Animasyonlar */
@keyframes spin {
    0% { 
        transform: rotate(0deg);
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(15deg);
    }
    100% { 
        transform: rotate(360deg);
        filter: hue-rotate(0deg);
    }
}

@keyframes centerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 165, 0, 0.4);
        transform: scale(1.02);
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Parçacık Efektleri (opsiyonel) */
.crypto-loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.crypto-loading-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #FFD700;
    border-radius: 50%;
    animation: float 4s ease-in-out infinite;
    opacity: 0.6;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

.crypto-loading-particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.crypto-loading-particle:nth-child(2) { top: 80%; left: 30%; animation-delay: 0.5s; }
.crypto-loading-particle:nth-child(3) { top: 30%; left: 80%; animation-delay: 1s; }
.crypto-loading-particle:nth-child(4) { top: 70%; left: 70%; animation-delay: 1.5s; }
.crypto-loading-particle:nth-child(5) { top: 50%; left: 10%; animation-delay: 2s; }
.crypto-loading-particle:nth-child(6) { top: 10%; left: 60%; animation-delay: 2.5s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-10px) translateX(5px);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px) translateX(-5px);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-15px) translateX(10px);
        opacity: 1;
    }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .crypto-loading-spinner {
        width: 100px;
        height: 100px;
    }
    
    .crypto-loading-text {
        font-size: 24px;
    }
    
    .crypto-loading-subtext {
        font-size: 14px;
    }
    
    .crypto-loading-progress-container {
        width: 250px;
    }
    
    .crypto-loading-skip-container {
        bottom: 30px;
    }
    
    .crypto-loading-logo img {
        max-width: 80px !important;
        max-height: 80px !important;
    }
}

@media (max-width: 480px) {
    .crypto-loading-spinner {
        width: 80px;
        height: 80px;
    }
    
    .crypto-loading-text {
        font-size: 20px;
    }
    
    .crypto-loading-subtext {
        font-size: 13px;
    }
    
    .crypto-loading-progress-container {
        width: 200px;
    }
    
    .crypto-loading-skip-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .crypto-loading-logo img {
        max-width: 60px !important;
        max-height: 60px !important;
    }
}

/* Dark mode için ek stiller */
@media (prefers-color-scheme: dark) {
    .crypto-loading-overlay {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    }
}

/* Performance optimizasyonları */
.crypto-loading-overlay * {
    will-change: transform, opacity;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .crypto-loading-overlay * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .crypto-loading-text {
        text-shadow: none;
        font-weight: 900;
    }
    
    .crypto-loading-skip-btn {
        border-width: 3px;
    }
} 