:root {
    --loader-primary: #947A6A;
    --loader-bg: rgba(15, 13, 12, 0.9);
}

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loader-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1), 
                visibility 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.loader-wrapper.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.loader-logo {
    width: 220px;
    margin-bottom: 40px;
    animation: logoEntrance 1.2s ease-out forwards, 
               logoPulse 3s ease-in-out infinite 1.2s;
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(148, 122, 106, 0.3));
    opacity: 0;
}

.dots-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards 0.8s;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: dotElastic 1.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }

.loading-text {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards 1.2s;
}

@keyframes logoEntrance {
    0% {
        transform: scale(0.8) translateY(20px);
        filter: brightness(0) invert(1) blur(10px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        filter: brightness(0) invert(1) blur(0);
        opacity: 1;
    }
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(148, 122, 106, 0.3)); }
    50% { transform: scale(1.03); filter: brightness(0) invert(1) drop-shadow(0 0 35px rgba(148, 122, 106, 0.5)); }
}

@keyframes dotElastic {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    33% { transform: translateY(-12px) scale(1.2); opacity: 1; }
    66% { transform: translateY(4px) scale(0.9); opacity: 0.6; }
}

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

body.loading {
    overflow: hidden !important;
    touch-action: none;
}
