/* Rabta — initial load splash screen (dual theme) */

html, body {
    min-height: 100vh;
    margin: 0;
}

#app {
    min-height: 100vh;
}

.rabta-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, #050d1a 0%, #0a1525 50%, #0d2137 100%);
}

/* Default + dark — before JS runs */
html:not([data-app-theme="light"]) .rabta-splash,
[data-app-theme="dark"] .rabta-splash {
    background: linear-gradient(145deg, #050d1a 0%, #0a1525 50%, #0d2137 100%);
}

.rabta-splash-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.rabta-splash-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.rabta-splash-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: splashShapeDrift 14s ease-in-out infinite;
}

.rabta-splash-shape-1 {
    width: 280px;
    height: 280px;
    top: 8%;
    left: 6%;
    background: radial-gradient(circle, rgba(0, 229, 212, 0.14) 0%, transparent 70%);
}

.rabta-splash-shape-2 {
    width: 180px;
    height: 180px;
    bottom: 12%;
    right: 8%;
    border: 1px solid rgba(99, 102, 241, 0.22);
    animation-delay: -5s;
}

.rabta-splash-shape-3 {
    width: 90px;
    height: 90px;
    top: 38%;
    right: 14%;
    background: rgba(0, 229, 212, 0.12);
    animation-delay: -9s;
}

@keyframes splashShapeDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(16px, -22px) rotate(120deg); }
    66% { transform: translate(-12px, 14px) rotate(240deg); }
}

.rabta-splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    animation: splashReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(24px) scale(0.96);
}

@keyframes splashReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rabta-splash-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: splashBrandFloat 6s ease-in-out infinite;
}

@keyframes splashBrandFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.rabta-splash-logo {
    position: relative;
    z-index: 1;
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 0 32px rgba(0, 229, 212, 0.4));
}

.rabta-splash-name-en {
    letter-spacing: 0.5em;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(0, 229, 212, 0.75);
    margin: 0.75rem 0 0.5rem;
}

.rabta-splash-tagline-ar {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 24px rgba(0, 229, 212, 0.25);
}

.rabta-splash-tagline-en {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.9);
    letter-spacing: 0.03em;
    margin-bottom: 2rem;
}

.rabta-splash-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: min(280px, 72vw);
}

.rabta-splash-loader-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    position: relative;
}

.rabta-splash-loader-bar {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #00e5d4, #0a75ad, #6366f1, transparent);
    animation: splashLoaderSlide 1.8s ease-in-out infinite;
}

@keyframes splashLoaderSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

.rabta-splash-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00e5d4;
    animation: splashLabelPulse 1.8s ease-in-out infinite;
}

@keyframes splashLabelPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.rabta-splash-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    margin-top: -130px;
    margin-left: -130px;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 212, 0.15);
    animation: splashRingPulse 3s ease-in-out infinite;
    pointer-events: none;
}

.rabta-splash-ring--outer {
    width: 300px;
    height: 300px;
    margin-top: -150px;
    margin-left: -150px;
    border-color: rgba(99, 102, 241, 0.12);
    animation-delay: -1.5s;
}

@keyframes splashRingPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.35; }
    50% { transform: scale(1.06); opacity: 0.75; }
}

/* Light theme */
[data-app-theme="light"] .rabta-splash {
    background: linear-gradient(145deg, #065a87 0%, #0a75ad 45%, #088da5 100%);
}

[data-app-theme="light"] .rabta-splash-tagline-ar {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

[data-app-theme="light"] .rabta-splash-tagline-en {
    color: rgba(255, 255, 255, 0.88);
}

[data-app-theme="light"] .rabta-splash-name-en {
    color: rgba(255, 255, 255, 0.85);
}

[data-app-theme="light"] .rabta-splash-label {
    color: #ffffff;
}

[data-app-theme="light"] .rabta-splash-loader-track {
    background: rgba(255, 255, 255, 0.28);
}

[data-app-theme="light"] .rabta-splash-logo {
    filter: drop-shadow(0 0 36px rgba(255, 255, 255, 0.35));
}

[data-app-theme="light"] .rabta-splash-shape-1 {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

[data-app-theme="light"] .rabta-splash-shape-2 {
    border-color: rgba(255, 255, 255, 0.25);
}

[data-app-theme="light"] .rabta-splash-shape-3 {
    background: rgba(255, 255, 255, 0.14);
}

[data-app-theme="light"] .rabta-splash-ring {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Dark theme */
html:not([data-app-theme="light"]) .rabta-splash-label,
[data-app-theme="dark"] .rabta-splash-label {
    color: #00e5d4;
}

html:not([data-app-theme="light"]) .rabta-splash-loader-track,
[data-app-theme="dark"] .rabta-splash-loader-track {
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
    .rabta-splash-logo {
        width: 180px;
        height: 180px;
    }

    .rabta-splash-ring {
        width: 210px;
        height: 210px;
    }

    .rabta-splash-ring--outer {
        width: 240px;
        height: 240px;
    }

    .rabta-splash-tagline-ar {
        font-size: 1.05rem;
    }
}
