/* Full screen centering */
.loading-container {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #f9f9fb; z-index: 9999;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .loading-container { background: #0c0c0f; }
    .loading-text { color: #d9d9e3; }
}

/* Logo + spinner wrapper */
.loading-logo-wrap {
    width: 120px; height: 120px;
    position: relative;
    display: grid; place-items: center;
}

/* Logo */
.loading-logo {
    width: 78%; height: 78%;
    background-image: url('../resources/images/appicon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.18));
}

/* Elegant spinner ring */
.loading-logo-wrap::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.1);   /* light track */
    border-top-color: #5b67f1;           /* highlight */
    animation: spin 1s linear infinite;
}
@media (prefers-color-scheme: dark) {
    .loading-logo-wrap::before {
        border-color: rgba(255,255,255,0.12);
        border-top-color: #7a86ff;
    }
}

/* Text */
.loading-text {
    margin-top: 18px;
    font-size: 1.05rem;
    color: #333;
    letter-spacing: .3px;
    opacity: .9;
}

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%     { transform: scale(1.06); opacity: .92; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loading-logo-wrap::before,
    .loading-logo { animation: none; }
}
