:root {
    --accent-color: 70, 95, 255;
}

/* Предотвращаем белый экран - устанавливаем фон body сразу */
html {
    background-color: #171717; /* Темная тема по умолчанию */
}

html:not(.dark) {
    background-color: #fafafa; /* Светлая тема */
}

body {
    margin: 0;
    padding: 0;
    background-color: inherit;
    transition: background-color 0.1s ease;
}
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/Roboto/static/Roboto-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

* {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 96px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: rgba(var(--accent-color));
}

.loader.dark {
    background: linear-gradient(135deg, #171717 0%, #171717 100%); /* ЧЕРНЫЙ фон для dark темы */
}

.loader.light {
    background: linear-gradient(135deg, #fafafa 0%, #fafafa 100%); /* БЕЛЫЙ фон для light темы */
}


.loader[data-accent] {
    color: rgba(var(--accent-color));
}

.loader span {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 4s ease-in-out infinite;
}

.loader span:nth-child(1) { animation-delay: 0s; }
.loader span:nth-child(2) { animation-delay: 0.1s; }
.loader span:nth-child(3) { animation-delay: 0.2s; }
.loader span:nth-child(4) { animation-delay: 0.3s; }
.loader span:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    0%, 100% {
        opacity: 0;
        transform: translateY(30px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateY(0);
    }
}