:root {
    --primary: #ff1e1e;
    --primary-glow: rgba(255, 30, 30, 0.4);
    --dark: #050505;
    --text: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-main);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Ambient Glow behind */
.ambient-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseGlow 4s ease-in-out infinite;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

/* Logo Styling */
.logo-wrapper {
    position: relative;
    margin-bottom: 2.5rem;
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.loader-logo {
    width: 150px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(255, 30, 30, 0.2));
    will-change: transform;
}

/* Brand Text */
.brand-text-loader {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 1s ease-out 0.2s forwards;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

/* Sophisticated Loader Line */
.loader-track {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s forwards;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #D32F2F, #1976D2);
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.5);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0;
    }
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .loader-logo { width: 110px; }
    .brand-text-loader { font-size: 1.4rem; }
    .ambient-glow { width: 250px; height: 250px; }
    .loader-track { width: 160px; }
}

@media (max-width: 480px) {
    .loader-logo { width: 90px; }
    .brand-text-loader { font-size: 1.2rem; }
    .loader-track { width: 140px; margin-top: 1.5rem; }
}
