/*==================================================================================
  LOBBY — Brand Splash Loader (Full-screen overlay shown on cache miss)
  ==================================================================================*/

.lobby-splash-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.lobby-splash-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lobby-splash-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, #0f1f3d 0%, #0a1628 50%, #060e1b 100%);
}

.lobby-splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ---- Logo ---- */
.lobby-splash-logo-row {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(15px);
    animation: splashFadeInDown 0.8s ease 0.2s forwards;
}

/* Gold shimmer sweep — only visible on the actual SVG shapes (letters + diamond), not empty space */
.lobby-splash-logo-row::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(194, 167, 111, 0.2) 45%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(194, 167, 111, 0.2) 55%,
        transparent 65%
    );
    background-size: 200% 100%;
    animation: splashLogoShimmer 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    /* Mask with the SVG itself — shimmer only shows through the filled shapes */
    -webkit-mask-image: url('/images/DR-stacked-logo.svg');
    mask-image: url('/images/DR-stacked-logo.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

@keyframes splashLogoShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.lobby-splash-logo-img {
    width: 380px;
    max-width: 90vw;
    max-height: 250px;
    object-fit: contain;
}

.lobby-splash-logo-fallback {
    font-size: 28px;
    font-weight: 800;
    color: #e3eeff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 20px rgba(194, 167, 111, 0.3);
}

.lobby-splash-logo-fallback span {
    color: #c2a76f;
}

@keyframes splashFadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Loading Text ---- */
.lobby-splash-text-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 12px;
    opacity: 0;
    animation: splashFadeInUp 0.6s ease 0.4s forwards;
}

@keyframes splashFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lobby-splash-text {
    color: #8aa0c0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: opacity 0.4s ease;
}

.lobby-splash-text.fade-out {
    opacity: 0;
}

/* ---- Particles ---- */
.lobby-splash-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.lobby-splash-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c2a76f;
    box-shadow: 0 0 4px rgba(194, 167, 111, 0.6);
    animation: splashParticleFloat linear forwards;
}

.lobby-splash-particle.large {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 8px rgba(194, 167, 111, 0.8);
}

.lobby-splash-particle.tiny {
    width: 2px;
    height: 2px;
    box-shadow: none;
    background: rgba(194, 167, 111, 0.5);
}

@keyframes splashParticleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-180px) scale(0.3);
    }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .lobby-splash-logo-img {
        width: 200px;
        max-width: 85vw;
        max-height: 120px;
    }

    .lobby-splash-logo-fallback {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .lobby-splash-text {
        font-size: 12px;
    }

}
