/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh; /* Use dynamic viewport height for mobile navigation bars */
    background: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    /* Account for safe area insets to ensure perfect centering */
    padding-top: var(--safe-area-inset-top);
    padding-bottom: var(--safe-area-inset-bottom);
}

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

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-logo {
    width: 48px; /* Even smaller - very compact! */
    height: auto;
    margin: 0 auto 1rem; /* Center horizontally and add bottom gap */
    display: block; /* Ensure it's a block element for margin auto to work */
    opacity: 1; /* Show immediately - no animation */
    transform: translateY(0) scale(1); /* Final position - no animation */
    filter: brightness(0) invert(1); /* Make it white */
    max-width: 48px; /* Ensure it never gets bigger */
    image-rendering: crisp-edges; /* Keep it sharp */
}

.loading-bar-container {
    position: relative;
    display: block; /* Changed from inline-block to block for better centering */
    width: 80px; /* Proportional to the 48px logo */
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    overflow: hidden;
    margin: 0 auto; /* Explicit horizontal centering */
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 1px;
    animation: loading-progress 2s ease-out forwards;
}

@keyframes loading-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}
