/*
 * app-shell.css — pre-app shell styles (loading screen, global resets).
 *
 * Loaded as an external stylesheet from index.html so the boot UI is styled
 * without an inline <style> block. Keeping these out of inline markup is the
 * first step toward dropping `style-src 'unsafe-inline'` from the CSP once the
 * React components are migrated off inline styles (see docs/architecture.md).
 */

:root {
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body,
#root {
    width: 100%;
    height: 100%;
}

body {
    background: #1a1a2e;
    color: #eee;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none !important;
    }
}

#loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    color: #eee;
    gap: 16px;
    z-index: 9999;
    transition: opacity 0.3s;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.noscript-msg {
    max-width: 32rem;
    padding: 1.5rem;
    background: #2a2a3e;
    border-radius: 12px;
    margin: 2rem auto;
    text-align: center;
    line-height: 1.6;
}

.noscript-title {
    margin-bottom: 0.5rem;
}

.loading-logo {
    font-size: 48px;
}

.loading-title {
    font-size: 20px;
    font-weight: 700;
}

.loading-hint {
    font-size: 13px;
    color: #888;
}
