/**
 * Rasheed Group - PWA & Professional Splash Screen Styles
 * Features:
 * - 3D Logo Rotation with Orbital Energy Rings & Ambient Glow
 * - Material 3 Footer PWA Download Button with Chrome & Android Icons
 * - Responsive PWA Installation Guide Modal
 */

/* ==========================================================================
   1. Professional Splash Screen Overlay
   ========================================================================== */
.rasheed-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 45%, #0e2a4a 0%, #081628 55%, #040b15 100%);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s ease, transform 0.55s ease;
    user-select: none;
    -webkit-user-select: none;
}

.rasheed-splash-screen.splash-fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.03);
}

/* Ambient Radial Glow */
.splash-ambient-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.32) 0%, rgba(14, 118, 188, 0.15) 45%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: splashGlowPulse 3s infinite ease-in-out;
    pointer-events: none;
}

/* Splash Content Centering */
.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 420px;
}

/* 3D Logo Stage */
.splash-logo-stage {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    perspective: 1000px;
}

/* Orbital Rings */
.splash-orbital-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.splash-orbital-ring.ring-outer {
    width: 160px;
    height: 160px;
    border: 2px dashed rgba(0, 174, 239, 0.45);
    box-shadow: 0 0 20px rgba(0, 174, 239, 0.25);
    animation: splashOrbitOuter 9s linear infinite;
}

.splash-orbital-ring.ring-mid {
    width: 140px;
    height: 140px;
    border: 1.5px solid rgba(14, 118, 188, 0.5);
    border-top-color: #00aeef;
    border-bottom-color: #00aeef;
    animation: splashOrbitInner 5s linear infinite;
}

.splash-orbital-ring.ring-inner {
    width: 118px;
    height: 118px;
    border: 1px dotted rgba(255, 255, 255, 0.25);
    animation: splashOrbitOuter 14s linear infinite reverse;
}

/* 3D Rotating Logo Card */
.splash-logo-card {
    position: relative;
    z-index: 3;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(14, 118, 188, 0.25) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 174, 239, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    animation: splashLogoSpin3D 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.splash-logo-img {
    max-width: 68px;
    max-height: 68px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 174, 239, 0.7));
    transform: translateZ(20px);
}

/* Brand Text */
.splash-brand-wrap {
    margin-bottom: 22px;
}

.splash-brand-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff 0%, #60a5fa 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: splashTextShine 3s linear infinite;
}

.splash-brand-tagline {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 600;
}

/* Progress Bar */
.splash-loader-bar {
    width: 170px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.splash-loader-progress {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, #0e76bc, #00aeef, #38bdf8);
    border-radius: 999px;
    box-shadow: 0 0 10px #00aeef;
    animation: splashProgressSweep 1.6s ease-in-out infinite;
}

/* Loading Dots */
.splash-loading-text {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.splash-dots i {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 1.5px;
    background: #00aeef;
    border-radius: 50%;
    animation: splashDotPulse 1.4s infinite ease-in-out both;
}
.splash-dots i:nth-child(1) { animation-delay: -0.32s; }
.splash-dots i:nth-child(2) { animation-delay: -0.16s; }

/* Splash Animations */
@keyframes splashLogoSpin3D {
    0% {
        transform: perspective(800px) rotateY(0deg) scale(0.96);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 174, 239, 0.3);
    }
    50% {
        transform: perspective(800px) rotateY(180deg) scale(1.05);
        box-shadow: 0 14px 40px rgba(0, 174, 239, 0.4), inset 0 0 30px rgba(0, 174, 239, 0.6);
    }
    100% {
        transform: perspective(800px) rotateY(360deg) scale(0.96);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 174, 239, 0.3);
    }
}

@keyframes splashOrbitOuter {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes splashOrbitInner {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes splashGlowPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

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

@keyframes splashProgressSweep {
    0% { right: -35%; }
    100% { right: 100%; }
}

@keyframes splashDotPulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}


/* ==========================================================================
   2. Footer PWA Download Button
   ========================================================================== */
.footer-pwa-install-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 18px 0;
}

.btn-pwa-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: linear-gradient(135deg, rgba(14, 118, 188, 0.18) 0%, rgba(12, 35, 64, 0.55) 100%);
    border: 1px solid rgba(0, 174, 239, 0.45);
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.18);
    position: relative;
    overflow: hidden;
}

.btn-pwa-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.btn-pwa-download:hover::before {
    left: 140%;
}

.btn-pwa-download:hover {
    background: linear-gradient(135deg, rgba(14, 118, 188, 0.35) 0%, rgba(12, 35, 64, 0.75) 100%);
    border-color: #00aeef;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.38);
    color: #ffffff;
}

.btn-pwa-download:active {
    transform: translateY(0);
}

.pwa-icons-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.pwa-icons-group .fa-chrome {
    color: #38bdf8 !important;
    filter: drop-shadow(0 2px 4px rgba(56, 189, 248, 0.4));
}

.pwa-icons-group .fa-android {
    color: #4ade80 !important;
    filter: drop-shadow(0 2px 4px rgba(74, 222, 128, 0.4));
}

.pwa-btn-label {
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.pwa-btn-badge {
    background: rgba(0, 174, 239, 0.2);
    color: #bae6fd;
    border: 1px solid rgba(0, 174, 239, 0.4);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
}

/* ==========================================================================
   3. Interactive PWA Installation Guide Modal
   ========================================================================== */
.pwa-guide-modal .modal-content {
    border-radius: 24px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.pwa-guide-header {
    background: linear-gradient(135deg, #0c2340 0%, #0e76bc 65%, #00aeef 100%);
    color: #ffffff;
    padding: 24px;
    position: relative;
}

.pwa-guide-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pwa-guide-avatar img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.pwa-nav-pills {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.pwa-nav-pills .nav-link {
    flex: 1;
    border-radius: 10px;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 12px;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
}

.pwa-nav-pills .nav-link.active {
    background: #0e76bc;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 118, 188, 0.25);
}

.pwa-step-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: transform 0.2s, background 0.2s;
}

.pwa-step-card:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    transform: translateX(-3px);
}

.pwa-step-number {
    width: 28px;
    height: 28px;
    background: #0e76bc;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.pwa-features-bar {
    display: flex;
    gap: 12px;
    justify-content: space-around;
    padding: 14px;
    background: #f1f5f9;
    border-radius: 16px;
    margin-top: 18px;
    text-align: center;
}

.pwa-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    gap: 4px;
}

.pwa-feature-item i {
    font-size: 1.1rem;
    color: #0e76bc;
}

