/* Preloader-specific styles */
.preloader * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(230, 235, 252, 0.95);
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #1a2b6d;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.top-section {
    margin-bottom: 60px;
}

.logo-container {
    position: relative;
    text-align: center;
}
/* Add this to your existing preloader.css file */
.logo-text .space-character {
    width: 20px; /* Adjust this value to control the space width */
    display: inline-block;
}
.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 52px;
    font-weight: 700;
    color: #1a2b6d;
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    padding: 10px 20px;
    text-shadow: 0 0 15px rgba(26, 43, 109, 0.2);
}

.logo-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateY(90deg);
    filter: blur(10px);
}

.academy-badge {
    position: absolute;
    bottom: -30px;
    right: -20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #1a2b6d;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 15px;
    transform: rotate(5deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    letter-spacing: 1.5px;
}

.bottom-section {
    position: relative;
    width: 300px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
}

.geometric-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.hexagon {
    position: absolute;
    width: 60px;
    height: 104px;
    background: linear-gradient(135deg, #3a57e8 0%, #00c2ff 100%);
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0;
}

.hexagon::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 94px;
    background: rgba(255, 255, 255, 0.7);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    top: 5px;
    left: 5px;
}

.rotating-element {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px dashed rgba(58, 87, 232, 0.3);
    border-radius: 50%;
    top: 10px;
    left: 10px;
    opacity: 0;
}

.inner-geometry {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    top: 40px;
    left: 40px;
    opacity: 0;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3a57e8;
    border-radius: 50%;
    opacity: 0;
}

/* Position dots in a diamond shape */
.floating-element:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.floating-element:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: #00c2ff;
}

.floating-element:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #ff3860;
}

.floating-element:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: #ffd700;
}

.loading-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: #1a2b6d;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 20px;
    text-align: center;
    opacity: 0;
}

.loading-dots {
    display: inline-block;
    width: 40px;
    text-align: left;
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

.hexagon-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
}

.hex-grid-item {
    position: absolute;
    width: 40px;
    height: 46px;
    background: #3a57e8;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0;
}

/* Animation classes to be added by JavaScript */
.animate-pulse {
    animation: pulse 2.5s infinite ease-in-out !important;
    opacity: 0.8 !important;
}

.animate-rotate {
    animation: rotate 15s infinite linear !important;
    opacity: 1 !important;
}

.animate-rotate-reverse {
    animation: rotateReverse 10s infinite linear !important;
    opacity: 1 !important;
}

.animate-float {
    animation: floatDiamond 4s infinite ease-in-out !important;
    opacity: 0.6 !important;
}

.animate-float-delay-1 {
    animation: floatDiamond 4s infinite ease-in-out !important;
    animation-delay: 1s !important;
    opacity: 0.6 !important;
}

.animate-float-delay-2 {
    animation: floatDiamond 4s infinite ease-in-out !important;
    animation-delay: 2s !important;
    opacity: 0.6 !important;
}

.animate-float-delay-3 {
    animation: floatDiamond 4s infinite ease-in-out !important;
    animation-delay: 3s !important;
    opacity: 0.6 !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 0.9;
    }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes floatDiamond {
    0%, 100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(-25%, -25%) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-25%, -25%) scale(0.8);
        opacity: 0.8;
    }
}

@keyframes loadingDots {
    0% {
        content: '';
    }
    33% {
        content: '.';
    }
    66% {
        content: '..';
    }
    100% {
        content: '...';
    }
}

@keyframes letterAnimation {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateY(90deg);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px) rotateY(0deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0deg);
        filter: blur(0);
    }
}

@keyframes hexWave {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        opacity: 0.1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0.05;
        transform: translateY(-10px) scale(1.1);
    }
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Responsive styles */
@media (max-width: 768px) {
    .logo-text {
        font-size: 32px;
        letter-spacing: 3px;
    }
    
    .academy-badge {
        font-size: 12px;
        padding: 4px 12px;
        bottom: -25px;
    }
    
    .bottom-section {
        width: 250px;
        height: 180px;
    }
    
    .geometric-loader {
        width: 100px;
        height: 100px;
    }
    
    .hexagon {
        width: 50px;
        height: 86px;
    }
    
    .hexagon::before {
        width: 40px;
        height: 76px;
    }
    
    .rotating-element {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
    
    .inner-geometry {
        width: 30px;
        height: 30px;
        top: 35px;
        left: 35px;
    }
    
    .floating-element {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .academy-badge {
        font-size: 10px;
        padding: 3px 10px;
        bottom: -20px;
        right: -10px;
    }
    
    .bottom-section {
        width: 200px;
        height: 150px;
    }
    
    .geometric-loader {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    
    .hexagon {
        width: 40px;
        height: 69px;
    }
    
    .hexagon::before {
        width: 30px;
        height: 59px;
    }
    
    .rotating-element {
        width: 60px;
        height: 60px;
        top: 10px;
        left: 10px;
    }
    
    .inner-geometry {
        width: 20px;
        height: 20px;
        top: 30px;
        left: 30px;
    }
    
    .floating-element {
        width: 8px;
        height: 8px;
    }
    
    .loading-text {
        font-size: 12px;
    }
}