* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: light-dark(#f8f9fa, #1a1a1a);
    --text-primary: light-dark(#2c3e50, #ffffff);
    --text-secondary: light-dark(#7f8c8d, #a0a0a0);
}

body {
    font-family: 'Overpass', system-ui, -apple-system, sans-serif;
    color-scheme: light dark;
    overflow-x: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    display: grid;
    place-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.background-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        url('/static/svg/logo_bg.svg'),
        url('/static/svg/logo_bg.svg');
    background-size: 
        80px 80px,
        80px 80px;
    background-position: 
        0 0,
        40px 40px;
    background-repeat: repeat;
    opacity: 0.08;
    animation: movePattern 30s linear infinite;
}

@keyframes movePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

.center-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 25%;
    bottom: 25%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--bg-color) 20%,
        var(--bg-color) 80%,
        transparent 100%
    );
    z-index: 1;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 30px);
    z-index: 2;
    animation: fadeIn 1.2s ease-out;
}

.main-logo {
    width: clamp(70px, 12vw, 100px);
    height: clamp(70px, 12vw, 100px);
    animation: pulse 3s ease-in-out infinite;
}

.text-content h1 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.05em;
    line-height: 0.9;
}

.text-content p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    margin-top: 0.5em;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.main-content {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.main-content.visible {
    opacity: 1;
}

@media (max-width: 600px) {
    .loading-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .background-pattern {
        background-size: 60px 60px, 60px 60px;
        background-position: 0 0, 30px 30px;
    }
}