/* NxtVidya - AI-Powered School Management System */
/* Preloader & Base Styles */

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #0A0E21;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.theme-dark {
    background-color: #0A0E21;
}

body.theme-light {
    background-color: #FFFFFF;
}

/* ===== NxtVidya Premium Preloader ===== */
.preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A0E21 0%, #1A1F3A 50%, #0A0E21 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    overflow: hidden;
}

/* Animated Background */
.preloader::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(123, 47, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 0, 229, 0.1) 0%, transparent 50%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Floating Particles */
.educational-equipment {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.equipment-item {
    position: absolute;
    font-size: 28px;
    opacity: 0;
    animation: floatParticle 12s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(123, 47, 255, 0.5));
}

.equipment-item:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.equipment-item:nth-child(2) { top: 20%; right: 15%; animation-delay: 1.5s; }
.equipment-item:nth-child(3) { top: 60%; left: 8%; animation-delay: 3s; }
.equipment-item:nth-child(4) { top: 70%; right: 10%; animation-delay: 4.5s; }
.equipment-item:nth-child(5) { top: 30%; left: 85%; animation-delay: 6s; }
.equipment-item:nth-child(6) { top: 85%; left: 60%; animation-delay: 7.5s; }
.equipment-item:nth-child(7) { top: 15%; left: 50%; animation-delay: 9s; }
.equipment-item:nth-child(8) { top: 45%; right: 85%; animation-delay: 10.5s; }

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(-30px) translateX(15px) scale(1.1);
        opacity: 0.6;
    }
    90% {
        opacity: 0.8;
    }
}

/* Main Loader Container */
.school-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

/* Logo Container with Glow */
.logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nxtvidya-logo {
    width: 180px;
    height: auto;
    animation: logoFloat 3s ease-in-out infinite, logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(123, 47, 255, 0.5));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes logoPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(123, 47, 255, 0.5))
                drop-shadow(0 0 40px rgba(0, 212, 255, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 40px rgba(123, 47, 255, 0.8))
                drop-shadow(0 0 60px rgba(0, 212, 255, 0.5));
    }
}

/* Orbital Rings */
.orbital-rings {
    position: absolute;
    width: 280px;
    height: 280px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    opacity: 0.5;
}

.ring-1 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-top-color: #7B2FFF;
    border-right-color: #7B2FFF;
    animation: spinRing 3s linear infinite;
}

.ring-2 {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-bottom-color: #00D4FF;
    border-left-color: #00D4FF;
    animation: spinRing 2.5s linear infinite reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #FF00E5;
    border-bottom-color: #FF00E5;
    animation: spinRing 2s linear infinite;
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AI Tagline */
.ai-tagline {
    font-size: 16px;
    font-weight: 600;
    color: #00D4FF;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 30px;
    animation: taglinePulse 2s ease-in-out infinite;
}

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

/* Loading Text */
.loading-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    margin-top: 10px;
}

.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: dotBounce 1.4s ease-in-out infinite;
    display: inline-block;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* Progress Bar */
.progress-container {
    width: 260px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7B2FFF 0%, #00D4FF 50%, #FF00E5 100%);
    border-radius: 10px;
    animation: progressLoad 2.5s ease-in-out infinite;
    position: relative;
}

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

@keyframes progressLoad {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Forbes Badge */
.forbes-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    margin-top: 25px;
    animation: badgePulse 3s ease-in-out infinite;
}

.forbes-badge span {
    font-size: 12px;
    color: #FFD700;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes badgePulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
        transform: scale(1.02);
    }
}

/* Hidden elements from old design */
.school-building,
.floating-books,
.building-base,
.building-roof,
.building-door,
.building-window,
.book {
    display: none;
}

/* Fade Out */
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ===== Header Placeholder ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: none;
}

@media (min-width: 1200px) {
    .header {
        display: block;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background-color: rgba(10, 14, 33, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header .logo {
    max-height: 40px;
}

.placeholder {
    height: 12px;
    width: 60px;
    background: linear-gradient(90deg, rgba(123, 47, 255, 0.3), rgba(0, 212, 255, 0.3));
    border-radius: 6px;
    animation: placeholderPulse 1.5s ease-in-out infinite;
}

.placeholder-wide {
    width: 150px;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Utility Classes ===== */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.flex-column { flex-direction: column; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .nxtvidya-logo {
        width: 140px;
    }
    
    .orbital-rings {
        width: 220px;
        height: 220px;
    }
    
    .ai-tagline {
        font-size: 12px;
        letter-spacing: 2px;
    }
    
    .progress-container {
        width: 200px;
    }
    
    .equipment-item {
        font-size: 20px;
    }
    
    .forbes-badge span {
        font-size: 10px;
    }
}

/* ===== Theme Variations ===== */
.theme-dark .header-container {
    background-color: rgba(10, 14, 33, 0.98);
}

.theme-light .preloader {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.theme-light .preloader::before {
    background: 
        radial-gradient(circle at 20% 20%, rgba(123, 47, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
}

.theme-light .ai-tagline {
    color: #7B2FFF;
}

.theme-light .loading-text {
    color: rgba(0, 0, 0, 0.5);
}

.theme-light .progress-container {
    background: rgba(0, 0, 0, 0.1);
}
