/* Loading Screen Styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #0047AB 50%, #00D4FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hide {
    opacity: 0;
    visibility: hidden;
}

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

/* 3D Cube Animation */
.cube-container {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 30px;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 4s infinite linear;
}

.cube .face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00D4FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    color: #00D4FF;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.cube .front {
    transform: translateZ(50px);
}

.cube .back {
    transform: rotateY(180deg) translateZ(50px);
}

.cube .right {
    transform: rotateY(90deg) translateZ(50px);
}

.cube .left {
    transform: rotateY(-90deg) translateZ(50px);
}

.cube .top {
    transform: rotateX(90deg) translateZ(50px);
}

.cube .bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(90deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(270deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Glitch Effect for Title */
.loader-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 20px 0 10px;
    position: relative;
    letter-spacing: 3px;
}

.glitch {
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00D4FF;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #0047AB;
    z-index: -2;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 212, 255, 0.5),
            0 0 20px rgba(0, 71, 171, 0.5),
            0 0 30px rgba(0, 212, 255, 0.3);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(0, 212, 255, 0.7),
            0 0 25px rgba(0, 71, 171, 0.7),
            0 0 35px rgba(0, 212, 255, 0.5);
    }
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-1px, 1px);
    }
    80% {
        clip-path: inset(40% 0 10% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(2px, -2px);
    }
    40% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(-2px, 2px);
    }
    60% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(1px, -1px);
    }
    80% {
        clip-path: inset(10% 0 40% 0);
        transform: translate(-1px, 1px);
    }
}

/* Subtitle */
.loader-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

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

/* Progress Bar */
.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00D4FF, #0047AB, #00D4FF);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressAnimation 2.5s ease forwards, shimmer 1s linear infinite;
    width: 0;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

@keyframes progressAnimation {
    to {
        width: 100%;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cube-container {
        width: 80px;
        height: 80px;
    }
    
    .cube .face {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .cube .front { transform: translateZ(40px); }
    .cube .back { transform: rotateY(180deg) translateZ(40px); }
    .cube .right { transform: rotateY(90deg) translateZ(40px); }
    .cube .left { transform: rotateY(-90deg) translateZ(40px); }
    .cube .top { transform: rotateX(90deg) translateZ(40px); }
    .cube .bottom { transform: rotateX(-90deg) translateZ(40px); }
    
    .loader-title {
        font-size: 32px;
    }
    
    .loader-subtitle {
        font-size: 16px;
    }
    
    .progress-bar {
        width: 250px;
    }
}