﻿
.tg-fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #0f0f1f 50%, #1a0a2a 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    margin: 0;
    padding: 0;
    transition: all 0.4s ease;
}

/* Vignette effect for better focus */
.tg-fullscreen-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

/* Loader Container with Glassmorphism */
.tg-loader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 56px 64px;
    border-radius: 56px;
    background: rgba(20, 10, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 6, 100, 0.5);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: containerGlow 0.5s ease-out;
    z-index: 10;
}

@keyframes containerGlow {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Premium Spinner with Masking */
.tg-premium-spinner {
    position: relative;
    width: 140px;
    height: 140px;
}

/* SVG Spinner */
.tg-spinner-svg {
    width: 100%;
    height: 100%;
    animation: tgSpinSmooth 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes tgSpinSmooth {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Background ring */
.tg-spinner-bg {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 5;
    fill: none;
}

/* Gradient Stroke with color #600664 */
.tg-gradient-ring {
    stroke: url(#tgSpinnerGradient);
    stroke-width: 6;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 380;
    stroke-dashoffset: 100;
    animation: tgDashFlow 1.4s ease-in-out infinite;
}

@keyframes tgDashFlow {
    0% {
        stroke-dashoffset: 380;
    }

    50% {
        stroke-dashoffset: 95;
    }

    100% {
        stroke-dashoffset: 380;
    }
}

/* Inner decorative ring */
.tg-inner-ring {
    fill: none;
    stroke: rgba(138, 43, 142, 0.4);
    stroke-width: 2.5;
    stroke-dasharray: 5 6;
}

/* Center Core with Logo */
.tg-center-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #ffffff, #fef5ff);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(96, 6, 100, 0.3), inset 0 1px 0 rgba(255,255,255,0.9);
    z-index: 10;
    border: 2px solid rgba(96, 6, 100, 0.4);
    backdrop-filter: blur(2px);
}

    .tg-center-core .tg-text {
        font-size: 20px;
        font-weight: 800;
        background: linear-gradient(135deg, #600664, #8a2b8e, #b34eb8);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        line-height: 1;
    }

    .tg-center-core .tg-cst-text {
        font-size: 8px;
        font-weight: 700;
        color: #600664;
        letter-spacing: 1px;
        margin-top: 2px;
        opacity: 0.8;
    }

/* Loading Text */
.tg-loading-text {
    color: #fff;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #e6b422, #f5c542);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(230, 180, 34, 0.3);
    animation: tgTextPulse 1.8s ease-in-out infinite;
}

@keyframes tgTextPulse {
    0%, 100% {
        opacity: 0.7;
        letter-spacing: 2px;
    }

    50% {
        opacity: 1;
        letter-spacing: 3px;
    }
}

/* Department Name */
.tg-dept-name {
    text-align: center;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
    border-top: 1px solid rgba(96, 6, 100, 0.4);
    padding-top: 18px;
    width: 100%;
}

    .tg-dept-name span {
        color: #e6b422;
    }

/* Hide loader class */
.tg-fullscreen-loader.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .tg-loader-container {
        padding: 40px 48px;
        border-radius: 40px;
        gap: 24px;
    }

    .tg-premium-spinner {
        width: 110px;
        height: 110px;
    }

    .tg-center-core {
        width: 55px;
        height: 55px;
    }

        .tg-center-core .tg-text {
            font-size: 20px;
        }

    .tg-loading-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tg-loader-container {
        padding: 32px 36px;
        border-radius: 32px;
        gap: 20px;
    }

    .tg-premium-spinner {
        width: 90px;
        height: 90px;
    }

    .tg-center-core {
        width: 48px;
        height: 48px;
    }

        .tg-center-core .tg-text {
            font-size: 18px;
        }

    .tg-loading-text {
        font-size: 12px;
    }
}