/* Instant splash — painted before any JS or external CSS loads.
      Removed when React calls dismissSplashScreen() on first render. */
body {
    margin: 0;
    padding: 0;
}

/* z-index: matches Z_INDEX.INTRO in config/zIndex.ts */
#inkpilot-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #1a1a2e;
    transition: opacity 0.35s ease;
}

#inkpilot-splash.splash-hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    animation: splash-pulse 2s ease-in-out infinite;
}

.splash-logo svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@keyframes splash-pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 8px 48px rgba(99, 102, 241, 0.7);
    }
}

.splash-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

.splash-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #94a3b8;
    animation: splash-fade 1.6s ease-in-out infinite alternate;
}

@keyframes splash-fade {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

.splash-bar-track {
    width: 160px;
    height: 3px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.splash-bar-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    animation: splash-bar 1.8s ease-in-out infinite;
}

@keyframes splash-bar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

/* Light mode override */
@media (prefers-color-scheme: light) {
    #inkpilot-splash {
        background: #f8fafc;
    }

    .splash-title {
        color: #1e293b;
    }

    .splash-subtitle {
        color: #64748b;
    }
}