html {
    color-scheme: light dark;
    background-color: #F7F8FC;
    color: #1B1F2A;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #F7F8FC;
    color: #1B1F2A;
}

/* Root element styles */
#root {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading indicator styles */
#loading {
    text-align: center;
    color: #5B6CFF;
    z-index: 1000;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #5B6CFF;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Language selector styles */
#language-selector {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

#language-selector button {
    padding: 5px 10px;
    margin-left: 5px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#language-selector button:hover {
    background-color: #e9ecef;
}

#language-selector button.active {
    background-color: #5B6CFF;
    color: white;
    border-color: #5B6CFF;
}

/* NoScript message */
.noscript-message {
    max-width: 600px;
    margin: 100px auto;
    padding: 20px;
    text-align: center;
    color: #333;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    html,
    body {
        background-color: #131314;
        color: #E3E1EE;
    }

    #loading {
        color: #BCC2FF;
    }

    .spinner {
        border-color: rgba(255, 255, 255, 0.16);
        border-left-color: #BCC2FF;
    }

    #language-selector button {
        background-color: #1D1D1F;
        color: #E2E2E5;
        border-color: #45464B;
    }

    #language-selector button:hover {
        background-color: #2D2D30;
    }

    #language-selector button.active {
        background-color: #3D52F6;
        color: #FFFFFF;
        border-color: #BCC2FF;
    }

    .noscript-message {
        color: #E2E2E5;
        background-color: #1D1D1F;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }
}
