/* ============================================================
   DRAMICBOX — PREMIUM SPLASH SCREEN
   ============================================================ */

#db-splash-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #07080f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow: hidden;
}

/* Animated gradient background */
#db-splash-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(124, 58, 237, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(219, 39, 119, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: splashBgPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Floating particles */
#db-splash-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 15% 20%, rgba(167,139,250,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(236,72,153,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 80%, rgba(139,92,246,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(236,72,153,0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 50%, rgba(167,139,250,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 10% 85%, rgba(139,92,246,0.6) 0%, transparent 100%);
    pointer-events: none;
}

@keyframes splashBgPulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Logo container */
.splash-logo-wrap {
    position: relative;
    margin-bottom: 32px;
    animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes splashLogoIn {
    from { opacity: 0; transform: scale(0.5) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.splash-logo-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.5) 0%, transparent 70%);
    animation: splashGlowPulse 2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes splashGlowPulse {
    from { opacity: 0.4; transform: scale(0.9); }
    to { opacity: 0.8; transform: scale(1.1); }
}

.splash-logo-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.6));
}

/* Brand name */
.splash-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: splashBrandIn 0.8s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes splashBrandIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
    animation: splashBrandIn 0.8s 0.35s both;
}

/* Loading bar */
.splash-bar-wrap {
    width: 220px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
    animation: splashBrandIn 0.5s 0.5s both;
}

.splash-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #ec4899, #7c3aed);
    background-size: 200% 100%;
    border-radius: 99px;
    animation: splashBarGrow 1.4s 0.6s ease-out forwards, splashBarShimmer 1.2s 0.6s linear infinite;
}

@keyframes splashBarGrow {
    from { width: 0%; }
    to { width: 100%; }
}

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

/* Loading dots */
.splash-dots {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    animation: splashBrandIn 0.5s 0.7s both;
}

.splash-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.6);
    animation: splashDotBounce 1.2s ease-in-out infinite;
}
.splash-dot:nth-child(2) { animation-delay: 0.15s; }
.splash-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes splashDotBounce {
    0%, 80%, 100% { transform: scale(1); opacity: 0.5; }
    40% { transform: scale(1.5); opacity: 1; background-color: #a78bfa; }
}

/* Hide state */
#db-splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Quick return (non-first-visit) */
#db-splash-screen.splash-quick {
    animation: splashQuick 0.4s ease-out forwards;
}

@keyframes splashQuick {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
