/* Loading Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #004499 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
}

.logo-circle {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-circle:nth-child(1) {
    animation: rotate-scale 2s ease-in-out infinite;
}

.logo-circle:nth-child(2) {
    animation: rotate-scale 2s ease-in-out infinite 0.2s;
    transform: scale(0.8);
}

.logo-circle:nth-child(3) {
    animation: rotate-scale 2s ease-in-out infinite 0.4s;
    transform: scale(0.6);
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    background: linear-gradient(90deg, #ffffff 0%, #0080ff 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 3s linear infinite;
}

/* Animated logo icon for loader */
.loader-logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.loader-logo-icon svg {
    width: 100%;
    height: 100%;
}

.loader-logo-icon path,
.loader-logo-icon circle {
    animation: logo-pulse 2s ease-in-out infinite;
}

.loader-logo-icon path:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-logo-icon path:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes logo-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 2rem auto 0;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, transparent, #0080ff, transparent);
    width: 40%;
    position: absolute;
    left: -40%;
    animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes rotate-scale {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
        border-color: rgba(0, 128, 255, 0.5);
    }
    50% {
        transform: rotate(180deg) scale(1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    75% {
        transform: rotate(270deg) scale(0.9);
        border-color: rgba(0, 102, 204, 0.5);
    }
}

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

@keyframes progress-slide {
    0% {
        left: -40%;
    }
    100% {
        left: 100%;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.1s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 4px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    border-color: var(--accent-blue);
    background: rgba(0, 128, 255, 0.1);
}

/* Hide default cursor */
body.custom-cursor-enabled * {
    cursor: none !important;
}

/* Mobile - disable custom cursor */
@media (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
    
    body.custom-cursor-enabled * {
        cursor: auto !important;
    }
}

/* Logo Styles */
.logo-svg {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.logo-svg:hover {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 2px 8px rgba(0, 102, 204, 0.3));
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand h1 {
    display: inline-block;
    margin-left: 0;
}

/* Favicon fallback */
.favicon-text {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    border-radius: 6px;
}

/* Loading state for images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Skeleton loader for content */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loader-logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .logo-text {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
    }
    
    .loader-progress {
        width: 150px;
    }
}