#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #f5f3ff 0%, #e0e7ff 40%, #ffffff 100%);
    transition: opacity 0.32s ease;
}

.dark #preloader {
    background: radial-gradient(circle at 30% 20%, #1e1b4b 0%, #0f172a 45%, #020617 100%);
}

.preloader-core {
    position: relative;
    width: 160px;
    height: 160px;
    display: grid;
    place-items: center;
}

.preloader-orbit {
    position: absolute;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    border: 3px solid rgba(79, 70, 229, 0.18);
    border-top-color: #4f46e5;
    border-left-color: #6366f1;
    animation: preloader-orbit 1s linear infinite;
}

.preloader-pulse {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4f46e5, #7c3aed);
    box-shadow: 0 0 24px rgba(79, 70, 229, 0.45);
    animation: preloader-pulse 1.2s ease-in-out infinite;
}

.preloader-dot-grid {
    position: absolute;
    bottom: 22px;
    display: flex;
    gap: 8px;
}

.preloader-dot-grid span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6366f1;
    opacity: 0.35;
    animation: preloader-dots 1.2s infinite ease-in-out;
}

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

.preloader-text {
    position: absolute;
    bottom: -6px;
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.02em;
    color: #4b5563;
}

.dark .preloader-text {
    color: #cbd5e1;
}

@keyframes preloader-orbit {
    to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes preloader-dots {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
    40% { transform: translateY(-5px); opacity: 1; }
}
