/* Boot Loader */

#app-boot-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 40%, rgba(74, 222, 128, 0.06), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(74, 222, 128, 0.04), transparent 50%),
        #0a0a0a;
    transition: opacity 340ms ease, visibility 340ms ease;
    overflow: hidden;
}

#app-boot-loader.boot-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.boot-title {
    font: 600 18px/1.2 "JetBrains Mono", monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #4ade80;
    white-space: nowrap;
    min-height: 1.2em;
}

.boot-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.15em;
    background: #4ade80;
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.boot-subtitle {
    font: 400 15px/1.4 "DM Sans", sans-serif;
    color: #4ade80;
    opacity: 0;
    text-align: center;
    transition: opacity 0.6s ease;
    min-height: 1.4em;
}

.boot-subtitle.visible {
    opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
    .boot-cursor {
        animation: none;
        opacity: 1;
    }

    .boot-subtitle {
        transition: none;
    }
}

/* Light mode */
#app-boot-loader.boot-light {
    background:
        radial-gradient(circle at 30% 40%, rgba(74, 222, 128, 0.1), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(74, 222, 128, 0.06), transparent 50%),
        #fafcf8;
}

#app-boot-loader.boot-light .boot-title {
    color: #4ade80;
}

#app-boot-loader.boot-light .boot-cursor {
    background: #4ade80;
}

#app-boot-loader.boot-light .boot-subtitle {
    color: #4ade80;
}

#app-boot-loader.boot-light .boot-subtitle.visible {
    opacity: 0.6;
}

/* Larger text on desktop */
@media (min-width: 768px) {
    .boot-title {
        font-size: 24px;
    }

    .boot-subtitle {
        font-size: 18px;
    }
}
