/**
 * FOUC Prevention CSS
 * Loaded immediately to prevent white flash on page navigation
 * MUST be the first CSS file loaded in <head>
 */

/* Set default dark background immediately (before JavaScript) */
html, body {
    background: linear-gradient(135deg, #1a1d1e 0%, #2d3436 100%) !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Hide content until theme is applied (prevents FOUC) */
html:not([data-theme]) body {
    opacity: 0;
    transition: opacity 0.05s ease-in;
}

/* Show content once theme is set */
html[data-theme] body {
    opacity: 1;
}

/* Theme-specific backgrounds (will override once JavaScript loads) */
html[data-theme="light"] {
    background: linear-gradient(135deg, #faf7f5 0%, #f8f5f2 100%) !important;
}

html[data-theme="dark"],
html[data-theme="darkmodern"] {
    background: linear-gradient(135deg, #1a1d1e 0%, #2d3436 100%) !important;
}

html[data-theme="colors"] {
    background: linear-gradient(135deg, #e8f4ff 0%, #ffeef8 100%) !important;
}

/* Ensure body inherits background */
body {
    background: transparent !important;
}
