/* ===================================
   MINIMALISTIC ARCHITECTURAL PAGE LOADER
   Professional & Clean Design
   =================================== */

/* Loader Container - Full Screen Overlay with Glassmorphism */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

/* Loader Content Container */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Logo/Brand Section */
.loader-brand {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 8px;
    color: #1a1a1a;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    animation: fadeInDown 0.8s ease;
}

/* Animated Line - Minimalistic Progress Indicator */
.loader-line {
    width: 200px;
    height: 2px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            #1a1a1a 50%,
            transparent 100%);
    animation: lineProgress 1.5s ease-in-out infinite;
}

/* Loading Text */
.loader-text {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #666;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    animation: pulse 2s ease-in-out infinite;
}

/* Percentage Display (Optional) */
.loader-percentage {
    font-size: 1rem;
    font-weight: 300;
    color: #999;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-width: 50px;
    text-align: center;
}

/* Progressive Status Messages */
.loader-status {
    max-width: 450px;
    text-align: center;
    margin-top: 20px;
    padding: 0 20px;
}

.loader-status-message {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    line-height: 1.5;
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    animation: statusFadeIn 0.4s ease;
    min-height: 20px;
}

/* Geometric Shape Animation - Architectural Element */
.loader-shape {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 10px;
}

.loader-shape::before,
.loader-shape::after {
    content: '';
    position: absolute;
    border: 2px solid #1a1a1a;
}

.loader-shape::before {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: rotateSquare 3s linear infinite;
}

.loader-shape::after {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    animation: rotateSquare 3s linear infinite reverse;
}

/* Animations */
@keyframes lineProgress {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes rotateSquare {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode Variant */
.page-loader.dark-mode {
    background: #1a1a1a;
}

.page-loader.dark-mode .loader-brand {
    color: #ffffff;
}

.page-loader.dark-mode .loader-line {
    background: #333;
}

.page-loader.dark-mode .loader-line::before {
    background: linear-gradient(90deg,
            transparent 0%,
            #ffffff 50%,
            transparent 100%);
}

.page-loader.dark-mode .loader-text {
    color: #999;
}

.page-loader.dark-mode .loader-percentage {
    color: #666;
}

.page-loader.dark-mode .loader-shape::before,
.page-loader.dark-mode .loader-shape::after {
    border-color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loader-brand {
        font-size: 1.5rem;
        letter-spacing: 6px;
    }

    .loader-line {
        width: 150px;
    }

    .loader-shape {
        width: 50px;
        height: 50px;
    }

    .loader-text {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .loader-status {
        max-width: 350px;
    }

    .loader-status-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .loader-brand {
        font-size: 1.25rem;
        letter-spacing: 4px;
    }

    .loader-line {
        width: 120px;
    }

    .loader-shape {
        width: 40px;
        height: 40px;
    }

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

    .loader-status {
        max-width: 280px;
    }

    .loader-status-message {
        font-size: 0.8rem;
    }
}

/* Alternative Loader Styles */

/* Minimal Dots Loader */
.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

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

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

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Circular Progress Loader */
.loader-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #f0f0f0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Architectural Grid Loader */
.loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 12px);
    grid-gap: 6px;
}

.loader-grid span {
    width: 12px;
    height: 12px;
    background: #1a1a1a;
    animation: gridPulse 1.2s ease-in-out infinite;
}

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

.loader-grid span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-grid span:nth-child(3) {
    animation-delay: 0.2s;
}

.loader-grid span:nth-child(4) {
    animation-delay: 0.1s;
}

.loader-grid span:nth-child(5) {
    animation-delay: 0.2s;
}

.loader-grid span:nth-child(6) {
    animation-delay: 0.3s;
}

.loader-grid span:nth-child(7) {
    animation-delay: 0.2s;
}

.loader-grid span:nth-child(8) {
    animation-delay: 0.3s;
}

.loader-grid span:nth-child(9) {
    animation-delay: 0.4s;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}