/**
 * DXR Store — Ramadan Splash Screen 🌙
 * Cyan (logo) + Gold (Ramadan) dual-tone theme
 * Version: 4.0 — Ramadan × DXR Edition
 */

/* ============================
   CSS VARIABLES
   ============================ */
:root {
    /* Gold — Ramadan warmth */
    --rm-gold: #F5C842;
    --rm-gold-light: #FFE08A;
    --rm-gold-dark: #BF953F;
    --rm-gold-glow: rgba(245, 200, 66, 0.4);
    /* Cyan — DXR brand (matches logo) */
    --rm-cyan: #00D4FF;
    --rm-cyan-deep: #00A8CC;
    --rm-cyan-glow: rgba(0, 212, 255, 0.35);
    /* Teal accent */
    --rm-teal: #10b981;
    --rm-teal-glow: rgba(16, 185, 129, 0.3);
    /* Night sky */
    --rm-night-1: #000000;
    --rm-night-2: #020208;
    --rm-night-3: #04040e;
    --rm-warm: #FFF8E7;
}

/* ============================
   SPLASH OVERLAY
   ============================ */
#splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100vh; height: 100svh;
    background: var(--rm-night-1);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

/* Deep sky — gold center aura + cyan edge hints */
#splash-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 35% at 50% 40%, rgba(245,200,66,0.035) 0%, transparent 60%),
        radial-gradient(ellipse 70% 45% at 50% 90%, rgba(191,149,63,0.02) 0%, transparent 40%),
        radial-gradient(ellipse 40% 30% at 15% 20%, rgba(0,212,255,0.015) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 85% 25%, rgba(0,212,255,0.015) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================
   STARFIELD + GOLDEN DUST
   ============================ */
.splash-starfield {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Stars twinkle gold/white/cyan */
.splash-star {
    position: absolute;
    width: 2px; height: 2px;
    background: var(--rm-gold-light);
    border-radius: 50%;
    opacity: 0;
    animation: rmStarTwinkle 3s ease-in-out infinite;
}

.splash-star.white {
    background: rgba(255,255,255,0.8);
}

.splash-star.cyan {
    background: var(--rm-cyan);
    box-shadow: 0 0 4px var(--rm-cyan-glow);
}

/* Golden dust particles — falling slowly */
.splash-dust {
    position: absolute;
    width: 3px; height: 3px;
    background: var(--rm-gold);
    border-radius: 50%;
    opacity: 0;
    filter: blur(0.5px);
    animation: rmDustFall linear infinite;
}

/* Cyan dust variant */
.splash-dust.cyan-dust {
    background: var(--rm-cyan);
    filter: blur(0.8px);
}

@keyframes rmStarTwinkle {
    0%, 100% { opacity: 0.12; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.3); }
}

@keyframes rmDustFall {
    0% { opacity: 0; transform: translateY(-20px) scale(0.5); }
    15% { opacity: 0.7; }
    85% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(100vh) scale(0.2); }
}

/* ============================
   LOADER CONTENT
   ============================ */
.splash-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
}

/* ============================
   LOGO + RINGS
   ============================ */
.splash-logo-container {
    position: relative;
    width: 180px; height: 180px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rotating rings around logo */
.splash-ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
}

/* Ring 1 — Primary Cyan (matches logo ring) */
.splash-ring.ring-1 {
    width: 158px; height: 158px;
    border-top-color: var(--rm-cyan);
    border-right-color: rgba(0,212,255,0.3);
    animation: rmRingRotate 4s linear infinite;
    filter: drop-shadow(0 0 8px var(--rm-cyan-glow));
}

/* Ring 2 — Gold Ramadan */
.splash-ring.ring-2 {
    width: 170px; height: 170px;
    border-bottom-color: var(--rm-gold);
    border-left-color: rgba(245,200,66,0.2);
    animation: rmRingRotate 6s linear infinite reverse;
    filter: drop-shadow(0 0 6px var(--rm-gold-glow));
}

/* Ring 3 — Inner teal subtle */
.splash-ring.ring-3 {
    width: 140px; height: 140px;
    border-top-color: rgba(16,185,129,0.35);
    border-right-color: rgba(16,185,129,0.12);
    animation: rmRingRotate 5s linear infinite;
}

@keyframes rmRingRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Logo glow — cyan glow matching logo's own ring */
.splash-logo {
    width: 100px; height: 100px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 20px var(--rm-cyan-glow)) drop-shadow(0 0 40px rgba(0,212,255,0.15));
    animation: rmLogoPulse 2.8s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes rmLogoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--rm-cyan-glow)) drop-shadow(0 0 40px rgba(0,212,255,0.15));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 30px rgba(0,212,255,0.5)) drop-shadow(0 0 55px rgba(0,212,255,0.2));
    }
}

/* ============================
   CRESCENT MOON — Orbiting arc
   ============================ */
.splash-crescent {
    position: absolute;
    width: 32px; height: 32px;
    z-index: 3;
    /* Remove static positioning — orbit handles placement */
    top: 50%; left: 50%;
    margin-top: -16px; margin-left: -16px;
    animation: rmCrescentOrbit 8s linear infinite;
    filter: drop-shadow(0 0 10px var(--rm-gold-glow)) drop-shadow(0 0 3px rgba(245,200,66,0.7));
}

/* Crescent inner glow pulse */
.splash-crescent path {
    animation: rmCrescentGlow 3s ease-in-out infinite;
}

@keyframes rmCrescentOrbit {
    0%   { transform: rotate(0deg)   translateX(94px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(94px) rotate(-360deg); }
}

@keyframes rmCrescentGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(245,200,66,0.4)); }
    50%      { filter: drop-shadow(0 0 14px rgba(245,200,66,0.7)); }
}

/* ============================
   TITLES
   ============================ */
.splash-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 6px;
    margin: 0 0 6px;
    background: linear-gradient(180deg, #ffffff 0%, var(--rm-cyan) 50%, #ffffff 100%);
    background-size: 100% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rmTitleShimmer 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0,212,255,0.3));
}

@keyframes rmTitleShimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

.splash-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.65);
    margin: 0 0 10px;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(0,212,255,0.12);
}

/* Ramadan greeting — gold glow */
.splash-ramadan-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--rm-gold);
    margin: 0 0 6px;
    text-shadow: 0 0 20px var(--rm-gold-glow);
    animation: rmTextGlow 3s ease-in-out infinite;
    position: relative;
}

/* Decorative dots around ramadan text */
.splash-ramadan-text::before,
.splash-ramadan-text::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.4;
    animation: rmStarSpin 6s linear infinite;
}
.splash-ramadan-text::before {
    left: -24px;
    color: var(--rm-cyan);
}
.splash-ramadan-text::after {
    right: -24px;
    color: var(--rm-gold);
    animation-direction: reverse;
}

@keyframes rmStarSpin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes rmTextGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(245,200,66,0.3); }
    50% { text-shadow: 0 0 30px rgba(245,200,66,0.55), 0 0 60px rgba(245,200,66,0.15); }
}

/* ============================
   RAMADAN DAY DISPLAY
   ============================ */
.splash-ramadan-day {
    font-size: 13px;
    color: var(--rm-gold-light);
    margin-top: 4px;
    opacity: 0;
    animation: rmFadeIn 0.5s ease-out 0.5s forwards;
    letter-spacing: 0.3px;
    text-shadow: 0 0 12px var(--rm-gold-glow);
}

@keyframes rmFadeIn {
    to { opacity: 0.8; }
}

/* ============================
   COUNTERS — 3 Professional Cards
   ============================ */
.splash-counters {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin-top: 16px;
    direction: ltr;
    /* Glass card background */
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 16px 8px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 24px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Single counter card */
.splash-ctr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 4px 6px;
    min-width: 0;
}

/* FA Icon styling */
.splash-ctr i {
    font-size: 15px;
    color: var(--rm-cyan);
    filter: drop-shadow(0 0 8px var(--rm-cyan-glow));
    margin-bottom: 2px;
}

.splash-ctr.accent i {
    color: var(--rm-teal);
    filter: drop-shadow(0 0 8px var(--rm-teal-glow));
}

.splash-ctr.ramadan i {
    color: var(--rm-gold);
    filter: drop-shadow(0 0 8px var(--rm-gold-glow));
}

/* Counter number — big & bold */
.splash-ctr-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--rm-cyan);
    text-shadow: 0 0 14px var(--rm-cyan-glow);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.5px;
    direction: ltr;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

.splash-ctr.accent .splash-ctr-num {
    color: var(--rm-teal);
    text-shadow: 0 0 14px var(--rm-teal-glow);
}

.splash-ctr.ramadan .splash-ctr-num {
    color: var(--rm-gold);
    text-shadow: 0 0 14px var(--rm-gold-glow);
}

/* Label text under number */
.splash-ctr-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Vertical divider between cards */
.splash-ctr-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255,255,255,0.08) 20%,
        rgba(0,212,255,0.12) 50%,
        rgba(255,255,255,0.08) 80%,
        transparent 100%
    );
    flex-shrink: 0;
}

/* ============================
   LOADER BAR — Enhanced with glow effects
   ============================ */
.splash-loader {
    width: 100%;
    max-width: 320px;
    margin: 18px auto 0;
    padding: 0 10px;
}

.splash-loader-bar {
    width: 100%;
    height: 6px;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 19px,
            rgba(255,255,255,0.03) 19px,
            rgba(255,255,255,0.03) 20px
        ),
        rgba(255,255,255,0.04);
    border-radius: 10px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.splash-loader-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg,
        var(--rm-cyan-deep) 0%,
        var(--rm-cyan) 50%,
        #4DDDFF 75%,
        var(--rm-gold) 100%
    );
    transition: width 0.3s ease-out;
    position: relative;
    box-shadow:
        0 0 12px var(--rm-cyan-glow),
        0 0 4px rgba(0,212,255,0.5);
}

/* Glow dot at leading edge */
.splash-loader-fill::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--rm-cyan) 50%, transparent 70%);
    box-shadow:
        0 0 6px 2px #fff,
        0 0 14px 4px var(--rm-cyan),
        0 0 28px 8px var(--rm-cyan-glow);
    z-index: 2;
}

/* Shimmer sweep */
.splash-loader-fill::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,0.35),
        transparent
    );
    animation: rmLoaderShimmer 1.6s ease-in-out infinite;
    border-radius: 10px;
    clip-path: inset(0 0 0 0 round 10px);
}

@keyframes rmLoaderShimmer {
    0%   { left: -60px; }
    100% { left: 100%; }
}

/* Info row below bar */
.splash-loader-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    direction: ltr;
}

/* Status Text */
.splash-status {
    font-size: 13px;
    color: rgba(0,212,255,0.5);
    letter-spacing: 0.3px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.splash-status.ready {
    color: var(--rm-gold);
    text-shadow: 0 0 12px rgba(245,200,66,0.4);
}

/* Percentage */
.splash-loader-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--rm-cyan);
    text-shadow: 0 0 8px var(--rm-cyan-glow);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* ============================
   LANTERNS (decorative) — Larger with stronger glow
   ============================ */
.splash-lantern {
    position: absolute;
    z-index: 0;
    opacity: 0;
    transform-origin: top center;
    animation: rmLanternSwing 5s ease-in-out infinite, rmLanternFadeIn 2.5s ease-out forwards;
}

/* Default size — bigger base with animated glow */
.splash-lantern svg {
    width: 52px; height: 94px;
    filter:
        drop-shadow(0 0 14px rgba(245,200,66,0.35))
        drop-shadow(0 0 35px rgba(245,200,66,0.15))
        drop-shadow(0 0 8px rgba(0,212,255,0.15));
    animation: rmLanternBodyGlow 3s ease-in-out infinite;
}

@keyframes rmLanternBodyGlow {
    0%, 100% {
        filter:
            drop-shadow(0 0 10px rgba(245,200,66,0.25))
            drop-shadow(0 0 25px rgba(245,200,66,0.1))
            drop-shadow(0 0 6px rgba(0,212,255,0.1));
    }
    50% {
        filter:
            drop-shadow(0 0 18px rgba(245,200,66,0.45))
            drop-shadow(0 0 40px rgba(245,200,66,0.2))
            drop-shadow(0 0 12px rgba(0,212,255,0.2));
    }
}

.splash-lantern.left {
    top: 2%; left: 5%;
    animation-delay: 0s;
}

.splash-lantern.right {
    top: 0%; right: 5%;
    animation-delay: 1.2s;
}

/* Strong light cone under lantern — gold core + cyan edge */
.splash-lantern::after {
    content: '';
    position: absolute;
    bottom: -20px; left: 50%;
    transform: translateX(-50%);
    width: 55px; height: 90px;
    background:
        radial-gradient(ellipse 45% 80% at 50% 10%, rgba(245,200,66,0.22) 0%, rgba(245,200,66,0.08) 35%, transparent 65%),
        radial-gradient(ellipse 55% 70% at 50% 30%, rgba(255,224,138,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 30% 50% at 50% 90%, rgba(0,212,255,0.05) 0%, transparent 60%);
    pointer-events: none;
    animation: rmLanternLight 2.5s ease-in-out infinite;
}

/* Inner flame flicker — multi-layer */
.splash-lantern::before {
    content: '';
    position: absolute;
    top: 40%; left: 50%;
    transform: translateX(-50%);
    width: 10px; height: 18px;
    background:
        radial-gradient(ellipse 50% 70% at 50% 60%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse, rgba(245,200,66,0.7) 0%, rgba(255,224,138,0.35) 40%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: rmFlameFlicker 1.2s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
    filter: blur(0.3px);
}

@keyframes rmLanternSwing {
    0%, 100% { transform: rotate(-3.5deg); }
    50% { transform: rotate(3.5deg); }
}

@keyframes rmLanternFadeIn {
    from { opacity: 0; transform: translateY(-25px) rotate(0deg); }
    to { opacity: 0.8; transform: translateY(0) rotate(-2deg); }
}

@keyframes rmLanternLight {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes rmFlameFlicker {
    0% { transform: translateX(-50%) scaleY(1) scaleX(1); opacity: 0.7; }
    33% { transform: translateX(-48%) scaleY(1.1) scaleX(0.9); opacity: 0.9; }
    66% { transform: translateX(-52%) scaleY(0.95) scaleX(1.05); opacity: 0.8; }
    100% { transform: translateX(-50%) scaleY(1.05) scaleX(0.95); opacity: 1; }
}

/* ============================
   MOSQUE SILHOUETTE (bottom)
   ============================ */
.splash-mosque {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    z-index: 0;
    opacity: 0.04;
    pointer-events: none;
}

/* Subtle gradient from gold to cyan on mosque */
.splash-mosque svg {
    fill: url(#mosqueGrad);
}

/* ==========================================
   SHOOTING STAR — Realistic Cinematic Meteor
   ==========================================
   Structure:
   .splash-meteor          → container (position + animation path)
     .meteor-head          → white-hot burning core
     .meteor-trail         → long fading gradient tail
     .meteor-glow          → wide atmospheric bloom
     .meteor-sparks        → scattered debris particles
   ========================================== */

/* --- Meteor Container (path + timing) --- */
/*
 * KEY FIX for smooth motion:
 *   1. Separate transform (move) from opacity (fade) into TWO animations
 *   2. Use translate3d() to force GPU compositing — no jank
 *   3. will-change hints for the browser to pre-allocate layers
 *   4. Linear movement + independent ease-out fade = no stepping artifacts
 */
.splash-meteor {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    will-change: transform, opacity;
}

/* First meteor — top-right arc, appears at 3.2s */
.splash-meteor.meteor-1 {
    top: 8%;
    right: -60px;
    /* Two separate animations: move (linear) + fade (custom ease) */
    animation:
        rmMeteorMove1 1.8s linear 3.2s forwards,
        rmMeteorFade1 1.8s ease-out 3.2s forwards;
}

/* Second meteor — mid-right, faster & smaller, appears at 7.5s */
.splash-meteor.meteor-2 {
    top: 22%;
    right: -40px;
    animation:
        rmMeteorMove2 1.3s linear 7.5s forwards,
        rmMeteorFade2 1.3s ease-out 7.5s forwards;
}

/* --- Meteor Head — white-hot burning core --- */
.splash-meteor .meteor-head {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    background: radial-gradient(circle at 40% 40%,
        #fff 0%,
        #fff 25%,
        #fffbe6 40%,
        var(--rm-gold) 65%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow:
        0 0 3px 1px #fff,
        0 0 6px 2px rgba(255,255,255,0.9),
        0 0 12px 4px var(--rm-gold),
        0 0 22px 6px var(--rm-gold-glow),
        0 0 35px 8px rgba(245,200,66,0.1);
    will-change: transform;
    animation: rmMeteorHeadPulse 0.2s ease-in-out infinite alternate;
}

/* Head micro-flicker — gentler for smoother look */
@keyframes rmMeteorHeadPulse {
    0%   { transform: translateY(-50%) scale3d(1, 1, 1); }
    100% { transform: translateY(-50%) scale3d(1.1, 1.1, 1); }
}

/* --- Meteor Trail — long gradient tail (multiple layers) --- */
.splash-meteor .meteor-trail {
    position: absolute;
    right: 3px; top: 50%;
    transform: translateY(-50%);
    width: 100px; height: 2px;
    border-radius: 0 3px 3px 0;
    /* Core trail: white-hot → gold → transparent */
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,200,66,0.03) 10%,
        rgba(245,200,66,0.12) 25%,
        rgba(255,224,138,0.3) 45%,
        rgba(255,251,230,0.6) 70%,
        rgba(255,255,255,0.9) 90%,
        #fff 100%
    );
    filter: blur(0.3px);
}

/* Second trail layer — wider, softer bloom */
.splash-meteor .meteor-trail::before {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 75px; height: 5px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,200,66,0.02) 15%,
        rgba(245,200,66,0.08) 35%,
        rgba(255,224,138,0.18) 55%,
        rgba(255,255,255,0.25) 80%,
        rgba(255,255,255,0.4) 100%
    );
    filter: blur(1.5px);
}

/* Third trail layer — gold atmospheric glow */
.splash-meteor .meteor-trail::after {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 55px; height: 10px;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,200,66,0.01) 20%,
        rgba(245,200,66,0.05) 50%,
        rgba(255,224,138,0.1) 75%,
        rgba(255,255,255,0.12) 100%
    );
    filter: blur(4px);
}

/* --- Meteor Glow — wide atmospheric bloom behind --- */
.splash-meteor .meteor-glow {
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    background: radial-gradient(circle,
        rgba(255,255,255,0.15) 0%,
        rgba(245,200,66,0.1) 25%,
        rgba(0,212,255,0.04) 50%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(6px);
    will-change: transform;
    animation: rmMeteorGlowPulse 0.3s ease-in-out infinite alternate;
}

@keyframes rmMeteorGlowPulse {
    0%   { transform: translateY(-50%) scale3d(1, 1, 1); }
    100% { transform: translateY(-50%) scale3d(1.08, 1.08, 1); }
}

/* --- Meteor Sparks — scattered debris particles --- */
.splash-meteor .meteor-sparks {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 4px;
    background: transparent;
    border-radius: 50%;
    /* Spark particles via box-shadow — scattered around the head */
    box-shadow:
        /* Near sparks — bright */
        12px -6px 0 0.5px rgba(255,255,255,0.9),
        18px 5px 0 0.4px rgba(255,251,230,0.85),
        25px -10px 0 0.3px rgba(245,200,66,0.8),
        30px 8px 0 0.5px rgba(255,224,138,0.75),
        8px 9px 0 0.3px rgba(255,255,255,0.7),
        /* Mid sparks — dimmer */
        42px -14px 0 0.4px rgba(245,200,66,0.5),
        50px 11px 0 0.3px rgba(255,224,138,0.45),
        55px -4px 0 0.3px rgba(255,255,255,0.4),
        38px 16px 0 0.2px rgba(245,200,66,0.35),
        /* Far sparks — faint */
        70px -8px 0 0.3px rgba(245,200,66,0.25),
        80px 6px 0 0.2px rgba(255,224,138,0.2),
        90px -12px 0 0.2px rgba(245,200,66,0.15),
        65px 14px 0 0.2px rgba(0,212,255,0.15),
        100px -3px 0 0.2px rgba(245,200,66,0.1);
    animation: rmSparksTwinkle 0.25s ease-in-out infinite alternate;
}

@keyframes rmSparksTwinkle {
    0%   { opacity: 0.65; }
    100% { opacity: 1; }
}

/* --- Entry Flash — brief white bloom when meteor appears --- */
/* Uses scale3d instead of width/height to avoid layout thrashing */
.splash-meteor .meteor-flash {
    position: absolute;
    right: -10px; top: 50%;
    transform: translateY(-50%) scale3d(0, 0, 1);
    width: 60px; height: 60px;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(245,200,66,0.2) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    filter: blur(8px);
    will-change: transform, opacity;
}

/* Flash expands briefly at the start */
.splash-meteor.meteor-1 .meteor-flash {
    animation: rmMeteorFlash 0.4s ease-out 3.2s forwards;
}
.splash-meteor.meteor-2 .meteor-flash {
    animation: rmMeteorFlash 0.3s ease-out 7.5s forwards;
}

@keyframes rmMeteorFlash {
    0%   { transform: translateY(-50%) scale3d(0, 0, 1);   opacity: 0; }
    30%  { transform: translateY(-50%) scale3d(0.8, 0.8, 1); opacity: 0.8; }
    100% { transform: translateY(-50%) scale3d(1, 1, 1);   opacity: 0; }
}

/* ==========================================
   METEOR FLIGHT PATHS — Separated Move + Fade

   KEY: transform and opacity are in SEPARATE
   keyframes so the browser can interpolate each
   independently on the GPU compositor thread.
   This eliminates the stuttering/stepping artifacts.
   ========================================== */

/* ── Meteor 1 — MOVEMENT (pure transform, linear) ── */
@keyframes rmMeteorMove1 {
    0%   { transform: rotate(-32deg) translate3d(0, 0, 0); }
    100% { transform: rotate(-32deg) translate3d(-110vw, 0, 0); }
}

/* ── Meteor 1 — FADE (opacity only, ease-out) ── */
@keyframes rmMeteorFade1 {
    0%   { opacity: 0; }
    2%   { opacity: 1; }
    55%  { opacity: 1; }
    80%  { opacity: 0.4; }
    95%  { opacity: 0.06; }
    100% { opacity: 0; }
}

/* ── Meteor 2 — MOVEMENT (pure transform, linear) ── */
@keyframes rmMeteorMove2 {
    0%   { transform: rotate(-22deg) scale(0.65) translate3d(0, 0, 0); }
    100% { transform: rotate(-22deg) scale(0.65) translate3d(-85vw, 0, 0); }
}

/* ── Meteor 2 — FADE (opacity only, ease-out) ── */
@keyframes rmMeteorFade2 {
    0%   { opacity: 0; }
    4%   { opacity: 0.9; }
    45%  { opacity: 0.9; }
    75%  { opacity: 0.3; }
    95%  { opacity: 0.04; }
    100% { opacity: 0; }
}

/* ============================
   AMBIENT LIGHT ORBS
   ============================ */
.splash-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0;
    animation: rmOrbPulse 8s ease-in-out infinite;
}

.splash-orb.orb-gold {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,200,66,0.12) 0%, transparent 70%);
    bottom: 15%; left: 10%;
    animation-delay: 0s;
}

.splash-orb.orb-cyan {
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
    top: 10%; right: 8%;
    animation-delay: 3s;
}

@keyframes rmOrbPulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.15); }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 400px) {
    .splash-title {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .splash-ramadan-text {
        font-size: 17px;
    }
    .splash-ramadan-text::before,
    .splash-ramadan-text::after {
        display: none;
    }

    .splash-logo-container {
        width: 150px; height: 150px;
    }

    .splash-logo {
        width: 85px; height: 85px;
    }

    .splash-ring.ring-1 { width: 128px; height: 128px; }
    .splash-ring.ring-2 { width: 140px; height: 140px; }
    .splash-ring.ring-3 { width: 112px; height: 112px; }

    /* Crescent smaller orbit on mobile */
    .splash-crescent { width: 24px; height: 24px; margin-top: -12px; margin-left: -12px; }
    @keyframes rmCrescentOrbit {
        0%   { transform: rotate(0deg)   translateX(76px) rotate(0deg); }
        100% { transform: rotate(360deg) translateX(76px) rotate(-360deg); }
    }

    .splash-counters { padding: 12px 6px; max-width: 290px; border-radius: 12px; }
    .splash-ctr-num { font-size: 22px; }
    .splash-ctr i { font-size: 12px; }
    .splash-ctr { gap: 3px; padding: 3px 4px; }
    .splash-ctr-label { font-size: 9px; }
    .splash-loader { max-width: 260px; }
    .splash-loader-bar { height: 5px; }
    .splash-status { font-size: 11px; }
    .splash-loader-pct { font-size: 12px; }
    .splash-ramadan-day { font-size: 11px; }

    /* Lanterns smaller on mobile */
    .splash-lantern.left { left: 1%; }
    .splash-lantern.right { right: 1%; }
    .splash-lantern svg { width: 38px; height: 68px; }
    .splash-lantern::before { width: 6px; height: 10px; }
    .splash-lantern::after { width: 36px; height: 55px; }

    .splash-orb { display: none; }

    /* Meteor smaller on mobile, hide second */
    .splash-meteor .meteor-trail { width: 60px; }
    .splash-meteor .meteor-trail::before { width: 40px; }
    .splash-meteor .meteor-trail::after { width: 30px; }
    .splash-meteor .meteor-glow { width: 18px; height: 18px; }
    .splash-meteor .meteor-head { width: 4px; height: 4px; }
    .splash-meteor.meteor-2 { display: none; }
}

@media (min-width: 768px) {
    /* Bigger lanterns on desktop */
    .splash-lantern svg { width: 60px; height: 108px; }
    .splash-lantern::before { width: 10px; height: 18px; }
    .splash-lantern::after { width: 60px; height: 100px; }
    .splash-mosque { height: 80px; }

    /* Bigger counters on desktop */
    .splash-counters { max-width: 420px; padding: 20px 16px; border-radius: 20px; }
    .splash-ctr-num { font-size: 34px; }
    .splash-ctr i { font-size: 18px; }
    .splash-ctr { gap: 6px; padding: 6px 10px; }
    .splash-ctr-label { font-size: 11px; }
    .splash-loader { max-width: 380px; }
    .splash-loader-bar { height: 7px; }
    .splash-status { font-size: 14px; }
    .splash-loader-pct { font-size: 16px; }

    /* Meteor on desktop — slightly larger than base */
    .splash-meteor .meteor-trail { width: 130px; }
    .splash-meteor .meteor-trail::before { width: 95px; height: 6px; }
    .splash-meteor .meteor-trail::after { width: 70px; height: 12px; }
    .splash-meteor .meteor-head { width: 6px; height: 6px; }
    .splash-meteor .meteor-glow { width: 40px; height: 40px; }
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
    .splash-ring,
    .splash-logo,
    .splash-star,
    .splash-dust,
    .splash-lantern,
    .splash-lantern::before,
    .splash-lantern::after,
    .splash-lantern svg,
    .splash-meteor,
    .splash-meteor .meteor-head,
    .splash-meteor .meteor-glow,
    .splash-meteor .meteor-sparks,
    .splash-meteor .meteor-flash,
    .splash-crescent,
    .splash-crescent path,
    .splash-orb,
    .splash-ramadan-text::before,
    .splash-ramadan-text::after {
        animation: none;
    }

    .splash-lantern { opacity: 0.7; }
    .splash-counters { opacity: 1; }
    .splash-ramadan-day { opacity: 0.8; animation: none; }
    .splash-loader-fill::after { animation: none; }
    .splash-loader-fill::before { animation: none; }
    .splash-crescent {
        top: -14px; right: -8px;
        left: auto; margin: 0;
        transform: none;
    }

    .splash-loader-fill {
        transition: none;
    }

    #splash-screen {
        transition: none;
    }

    .splash-title {
        animation: none;
        background-position: 0% 50%;
    }
}
