* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#loader {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100vw;
    height: 100vh;
    background: #fafafa;
}

/* Спінер */
.loader-spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

.loader-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #FF3D00;
    border-right-color: #FF3D00;
    animation: spin 0.9s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    filter: drop-shadow(0 0 8px rgba(255, 61, 0, 0.35));
}

.loader-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: #FF3D00;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

/* Текст */
.loader-text {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 2px;
}

.dots span {
    animation: blink 1.4s infinite both;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

/* Анімації */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.6); opacity: 0.4; }
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
}

/* Темна тема */
@media (prefers-color-scheme: dark) {
    #loader { background: #111; }
    .loader-text { color: #eee; }
    .loader-ring { border-top-color: #FF6B3D; border-right-color: #FF6B3D; }
    .loader-dot  { background: #FF6B3D; }
}