/* ==========================================================================
   Nova OS Core Theme
   ========================================================================== */

:root {
    /* Color Palette */
    --surface-base: #0E0E11; /* Deep space black */
    --surface-glass: rgba(20, 20, 25, 0.4);
    --surface-glass-hover: rgba(30, 30, 35, 0.5);
    --surface-glass-active: rgba(40, 40, 45, 0.6);
    
    /* Neon Accents */
    --accent-primary: #6366F1; /* Indigo */
    --accent-secondary: #EC4899; /* Pink */
    --accent-tertiary: #10B981; /* Emerald */
    --accent-glow: rgba(99, 102, 241, 0.5);

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-disabled: rgba(255, 255, 255, 0.3);

    /* Borders */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-strong: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-ambient: 0 0 40px rgba(0, 0, 0, 0.5);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.7);
    --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-sans: 'Outfit', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Animations */
    --curve-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --curve-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 500ms;
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--surface-base);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ==========================================================================
   Fluid Mesh Background
   ========================================================================== */
#nova-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background: var(--surface-base);
    overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 95%);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 95%);
}

/* Glowing orbs for the mesh gradient effect */
.blob {
    position: absolute;
    filter: blur(120px);
    opacity: 0.6;
    animation: drift 20s infinite alternate var(--curve-smooth);
}

.blob-1 {
    width: 60vw; height: 60vw;
    background: var(--accent-primary);
    top: -10vw; left: -10vw;
}

.blob-2 {
    width: 50vw; height: 50vw;
    background: var(--accent-secondary);
    bottom: -10vw; right: -10vw;
    animation-delay: -5s;
}

.blob-3 {
    width: 40vw; height: 40vw;
    background: var(--accent-tertiary);
    top: 30vh; left: 30vw;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10vw, 5vh) scale(1.1); }
    100% { transform: translate(-5vw, 15vh) scale(0.9); }
}

.noise-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* ==========================================================================
   Boot Screen
   ========================================================================== */
.boot-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--surface-base);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s var(--curve-smooth);
}

.boot-logo {
    margin-bottom: 40px;
    animation: pulse 2s infinite alternate;
}

.boot-progress-bar {
    width: 200px;
    height: 4px;
    background: var(--surface-glass);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.boot-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 0.1s linear;
}

@keyframes pulse {
    from { filter: drop-shadow(0 0 10px var(--accent-glow)); transform: scale(0.98); }
    to { filter: drop-shadow(0 0 30px var(--accent-glow)); transform: scale(1.02); }
}

/* ==========================================================================
   Auto Light Mode
   ========================================================================== */
@media (prefers-color-scheme: light) {
    :root {
        --surface-base: #F8FAFC;
        --surface-glass: rgba(255, 255, 255, 0.6);
        --surface-glass-hover: rgba(255, 255, 255, 0.8);
        --surface-glass-active: rgba(255, 255, 255, 0.9);
        
        --text-primary: #0F172A;
        --text-secondary: rgba(15, 23, 42, 0.7);
        --text-disabled: rgba(15, 23, 42, 0.4);

        --border-glass: rgba(0, 0, 0, 0.08);
        --border-glass-strong: rgba(0, 0, 0, 0.15);

        --shadow-ambient: 0 0 40px rgba(0, 0, 0, 0.1);
        --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.15);
        --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.7);
    }
    
    .blob {
        opacity: 0.3;
    }
}
