/* Page Loader Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff; /* same as body background */
    z-index: 9999;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    animation: fadeInScale 0.6s ease;
    padding: 2rem;
}

.loader-logo {
    font-family: "Inter", sans-serif;
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -1px;
    line-height: 1;
}

.loader-g {
    font-weight: 800;
    font-size: 4.5rem;
    color: #1a4300;
    text-shadow: 3px 3px 6px rgba(26, 67, 0, 0.2);
    display: inline-block;
    animation: bounceG 1.5s ease-in-out infinite;
    margin-right: -0.1em;
}

.loader-rest {
    font-weight: 600;
    color: #1a1a1a;
    display: inline-block;
    animation: fadeInOut 2s ease-in-out infinite;
}

.loader-animation {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 1.5rem;
    height: 50px;
}

.loader-bar {
    width: 10px;
    height: 40px;
    background: linear-gradient(180deg, #1a4300 0%, #00e676 100%);
    border-radius: 5px;
    animation: barPulse 1.2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(26, 67, 0, 0.3);
}

.loader-bar:nth-child(1) {
    animation-delay: 0s;
}

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

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

.loader-bar:nth-child(4) {
    animation-delay: 0.6s;
}

.loader-text {
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    color: #666666;
    font-weight: 500;
    animation: textPulse 2s ease-in-out infinite;
    margin-top: 1rem;
}

/* Dark mode loader styles */
body.dark-mode .page-loader {
    background: linear-gradient(135deg, #0a1f0a 0%, #1a4300 100%);
}

body.dark-mode .loader-g {
    color: #00e676;
    text-shadow: 3px 3px 6px rgba(0, 230, 118, 0.3);
}

body.dark-mode .loader-rest {
    color: #ffffff;
}

body.dark-mode .loader-bar {
    background: linear-gradient(180deg, #00e676 0%, #1a4300 100%);
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.3);
}

body.dark-mode .loader-text {
    color: #b0b0b0;
}

/* Loader Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceG {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.15);
    }
}

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

@keyframes barPulse {
    0%,
    100% {
        transform: scaleY(0.6);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1.3);
        opacity: 1;
    }
}

@keyframes textPulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive loader */
@media (max-width: 768px) {
    .loader-logo {
        font-size: 2.5rem;
    }

    .loader-g {
        font-size: 3.5rem;
    }

    .loader-animation {
        height: 40px;
    }

    .loader-bar {
        width: 8px;
        height: 32px;
    }

    .loader-text {
        font-size: 0.95rem;
    }
}
