/* ═══════════════════════════════════════════════════════════
   تاجر تيك | TAJER TECH - Premium Symmetrical Glassmorphic Splash Screen CSS
   زمن العرض الكلي: 4.5 ثوانٍ | متحرك بالكامل بتسريع كرت الشاشة (GPU)
   ═══════════════════════════════════════════════════════════ */

.splash {
    position: fixed;
    inset: 0;
    background-color: #030712; /* خلفية داكنة غامقة جداً */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* نمط الخلفية الهندسية المتحركة الفخمة */
.splash-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

/* شبكة التخطيط الرئيسية للسبلاش - توسيط شعار واسم المنصة بالكامل */
.splash-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 30px;
    z-index: 2;
}

/* الحاوية المركزية للعلامة والشعار */
.splash-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    z-index: 5;
}

.splash-logo-container {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.splash-icon {
    margin-bottom: 12px;
    animation: splashFloat 3s ease-in-out infinite alternate;
}

@keyframes splashFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

@keyframes lightningGlow {
    0%, 100% {
        text-shadow: 
            0 0 6px rgba(16, 185, 129, 0.4), 
            0 0 15px rgba(16, 185, 129, 0.2), 
            0 0 25px rgba(16, 185, 129, 0.1);
        filter: brightness(1);
    }
    45% {
        text-shadow: 
            0 0 6px rgba(16, 185, 129, 0.4), 
            0 0 15px rgba(16, 185, 129, 0.2), 
            0 0 25px rgba(16, 185, 129, 0.1);
        filter: brightness(1);
    }
    50% {
        /* وميض البرق الكهربائي المفاجئ */
        text-shadow: 
            0 0 20px rgba(52, 211, 153, 1), 
            0 0 40px rgba(16, 185, 129, 1), 
            0 0 60px rgba(16, 185, 129, 0.8),
            0 0 80px rgba(5, 150, 105, 0.9);
        filter: brightness(1.7) saturate(1.6);
    }
    52% {
        text-shadow: 
            0 0 10px rgba(52, 211, 153, 0.8), 
            0 0 25px rgba(16, 185, 129, 0.8);
        filter: brightness(1.25);
    }
    54% {
        /* وميض شرارة مكرر وسريع جداً */
        text-shadow: 
            0 0 25px rgba(52, 211, 153, 1), 
            0 0 50px rgba(16, 185, 129, 1), 
            0 0 70px rgba(5, 150, 105, 1);
        filter: brightness(1.8) saturate(1.8);
    }
    56% {
        text-shadow: 
            0 0 6px rgba(16, 185, 129, 0.4), 
            0 0 15px rgba(16, 185, 129, 0.2);
        filter: brightness(1);
    }
    90% {
        text-shadow: 
            0 0 6px rgba(16, 185, 129, 0.4), 
            0 0 15px rgba(16, 185, 129, 0.2);
        filter: brightness(1);
    }
    92% {
        /* شرارة عابرة خفيفة */
        text-shadow: 
            0 0 15px rgba(52, 211, 153, 0.9), 
            0 0 30px rgba(16, 185, 129, 0.8);
        filter: brightness(1.4);
    }
    94% {
        text-shadow: 
            0 0 6px rgba(16, 185, 129, 0.4), 
            0 0 15px rgba(16, 185, 129, 0.2);
        filter: brightness(1);
    }
}

.splash-title-ar {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
    animation: lightningGlow 5s ease-in-out infinite;
}

.splash-title-en {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 4px;
    animation: lightningGlow 5s ease-in-out infinite alternate-reverse;
}

.splash-subtitle {
    font-size: 0.82rem;
    color: #9ca3af;
    font-weight: 500;
}

/* شريط التحميل الأنيق والمبسط - يتزامن مع الـ 4.5 ثوانٍ */
.splash-loader {
    width: 160px;
    margin-top: 8px;
    animation: fadeIn 1s 0.2s both;
}

.splash-loader-track {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 4px;
    animation: splashLoad 5.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashLoad {
    0% { width: 0%; }
    30% { width: 35%; }
    70% { width: 85%; }
    100% { width: 100%; }
}

.splash-version {
    font-size: 0.65rem;
    color: #4b5563;
    font-weight: 600;
    margin-top: 6px;
    animation: fadeIn 1s 0.4s both;
}

/* 📱 الأجهزة المحاكية بالنمط الزجاجي Glassmorphism وتطابق المقاسات والاتزان */
.splash-device-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* الهاتف الذكي يميناً */
.right-device {
    animation: 
        slideInPhone 1.2s cubic-bezier(0.16, 1, 0.3, 1) both,
        deviceFloatRight 6s ease-in-out infinite alternate 1.2s;
}

@keyframes slideInPhone {
    from {
        opacity: 0;
        transform: translateX(60px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes deviceFloatRight {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* تصميم الهاتف الزجاجي المصقول */
.splash-phone-mockup {
    width: 260px;
    height: 360px;
    background: rgba(17, 27, 33, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(16, 185, 129, 0.2); /* إطار بلون أخضر زمردي خفيف جداً */
    border-radius: 24px;
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.5), 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 25px rgba(16, 185, 129, 0.05);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.splash-phone-mockup:hover {
    transform: scale(1.02) translateY(-2px);
    border-color: rgba(16, 185, 129, 0.4);
}

.phone-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.phone-header {
    height: 20px;
    background: rgba(17, 27, 33, 0.3);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 0.6rem;
    font-weight: 500;
    z-index: 10;
}

.phone-notch {
    width: 60px;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 8px 8px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.wa-header {
    height: 38px;
    background: rgba(32, 44, 51, 0.75);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    z-index: 10;
}

.wa-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.wa-title-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wa-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
}

.wa-status {
    font-size: 0.52rem;
    color: #10b981;
    font-weight: 500;
}

.wa-icons {
    font-size: 0.65rem;
    color: #9ca3af;
}

.wa-chat-body {
    flex: 1;
    background-color: rgba(11, 20, 26, 0.4);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* فقاعات واتساب زجاجية بمحاكاة سريعة وواقعية للسرعة والنص العربي */
.wa-bubble {
    max-width: 85%;
    padding: 6px 8px;
    font-size: 0.64rem;
    line-height: 1.35;
    position: relative;
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    animation: bubblePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wa-user {
    background: rgba(0, 92, 75, 0.75);
    color: #e9edef;
    align-self: flex-start;
    border-radius: 10px 10px 0 10px;
    margin-right: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.wa-bot {
    background: rgba(32, 44, 51, 0.8);
    color: #e9edef;
    align-self: flex-end;
    border-radius: 10px 10px 10px 0;
    margin-left: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* توزيع التواقيت لكي تكتمل محادثة الواتساب خلال 2.3 ثانية */
.bubble-1 { animation-delay: 0.8s; }
.bubble-2 { animation-delay: 1.6s; }
.bubble-3 { animation-delay: 2.4s; }
.bubble-4 { animation-delay: 3.2s; }

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

.ticks {
    font-size: 0.65rem;
    color: #6b7280;
    margin-right: 4px;
    display: inline-block;
    animation: ticksRead 0.2s ease 3.5s forwards;
}

@keyframes ticksRead {
    to { color: #53bdeb; }
}


/* 💻 شاشة المنصة للتاجر يساراً - متطابقة الهوية البصرية والتصميم الزجاجي */
.left-device {
    animation: 
        slideInPlatform 1.2s cubic-bezier(0.16, 1, 0.3, 1) both,
        deviceFloatLeft 6s ease-in-out infinite alternate 1.2s;
}

@keyframes slideInPlatform {
    from {
        opacity: 0;
        transform: translateX(-60px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes deviceFloatLeft {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

.splash-platform-mockup {
    width: 410px;
    height: 310px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 20px;
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.5), 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 25px rgba(16, 185, 129, 0.04);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.splash-platform-mockup:hover {
    transform: scale(1.02) translateY(-2px);
    border-color: rgba(16, 185, 129, 0.35);
}

/* تأثير الوميض الزجاجي عند هبوط الطلب بالثانية 3.4 */
.splash-platform-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(16, 185, 129, 0.08);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    animation: platformFlashRipple 0.6s ease-out 4.9s forwards;
}

@keyframes platformFlashRipple {
    0% {
        opacity: 0;
        box-shadow: inset 0 0 0px rgba(16, 185, 129, 0);
    }
    30% {
        opacity: 1;
        box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.4);
    }
    100% {
        opacity: 0;
        box-shadow: inset 0 0 80px rgba(16, 185, 129, 0);
    }
}

.platform-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.window-header {
    height: 20px;
    background: rgba(30, 41, 59, 0.45);
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.window-buttons {
    display: flex;
    gap: 4px;
}

.window-buttons .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.window-buttons .red { background: #ef4444; }
.window-buttons .yellow { background: #f59e0b; }
.window-buttons .green { background: #10b981; }

.window-title {
    font-size: 0.55rem;
    color: #94a3b8;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
}

.platform-body {
    flex: 1;
    display: flex;
}

/* القائمة الجانبية بلوحة التحكم */
.platform-sidebar {
    width: 80px;
    background: rgba(9, 13, 22, 0.65);
    border-left: 1px solid rgba(30, 41, 59, 0.4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 3px;
}

.p-item {
    font-size: 0.55rem;
    color: #64748b;
    padding: 4px 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-item.active-orders {
    background: rgba(16, 185, 129, 0.05);
    color: white;
    font-weight: 600;
}

/* عداد الطلبات الدوار يزداد في الثانية 3.4 */
.p-badge-container {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    overflow: hidden;
    background-color: #ef4444;
    border-radius: 50%;
    color: white;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 12px;
    text-align: center;
}

.p-badge-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-badge-val.old {
    animation: slideOutUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 4.9s forwards;
}

.p-badge-val.new {
    transform: translateY(100%);
    animation: slideInUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 4.9s forwards;
}

@keyframes slideOutUp {
    to { transform: translateY(-100%); }
}

@keyframes slideInUp {
    to { transform: translateY(0); }
}

.platform-content {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(11, 15, 25, 0.3);
}

.p-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.p-stat {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.p-stat span {
    font-size: 0.48rem;
    color: #64748b;
}

.p-stat strong {
    font-size: 0.68rem;
    color: white;
    font-weight: 700;
}

.p-orders-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-box-title {
    font-size: 0.55rem;
    color: white;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 3px;
}

.p-orders-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-order-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p-order-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.p-order-info strong {
    font-size: 0.52rem;
    color: var(--color-primary);
}

.p-order-info span {
    font-size: 0.46rem;
    color: #94a3b8;
}

.p-order-status {
    font-size: 0.44rem;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

.p-order-status.green {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

.p-order-status.yellow {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

/* بطاقة الطلب الجديد التي تهبط وتدخل القائمة بالثانية 3.4 */
.p-order-item.new-flying-arrival {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
    animation: orderCardArrival 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 4.9s forwards;
}

@keyframes orderCardArrival {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        background: rgba(16, 185, 129, 0.06);
        border-color: rgba(16, 185, 129, 0.2);
    }
}

.pulse-yellow {
    animation: yellowGlowAlert 1s infinite alternate 5.2s;
}

@keyframes yellowGlowAlert {
    from {
        box-shadow: 0 0 2px rgba(245, 158, 11, 0.1);
        filter: brightness(1);
    }
    to {
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
        filter: brightness(1.1);
    }
}


/* 🛸 كبسولة الطلب الطائر ثلاثي الأبعاد المدهش - انسيابية عالية السرعة (2.4ث إلى 3.4ث) */
.flying-order-package {
    position: absolute;
    left: 70%;
    top: 55%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg);
    direction: rtl;
    animation: splashFlightPath 1.2s cubic-bezier(0.25, 1, 0.5, 1) 3.7s forwards;
    will-change: transform, opacity;
}

.flying-glow-circle {
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulseGlow 1s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.flying-content {
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.3), 
        0 0 15px rgba(16,185,129,0.25);
}

.flying-icon {
    font-size: 0.85rem;
    animation: bounceIcon 0.4s ease-in-out infinite alternate;
}

@keyframes bounceIcon {
    from { transform: translateY(0); }
    to { transform: translateY(-2px); }
}

/* مسار الطيران الانسيابي السريع بنصف قوس متناسق تماماً من الجوال للوحة */
@keyframes splashFlightPath {
    0% {
        transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translate3d(-6vw, -12vh, 0) scale(1) rotate(6deg);
    }
    50% {
        /* قمة القوس */
        transform: translate3d(-24vw, -30vh, 0) scale(1.1) rotate(0deg);
        opacity: 1;
    }
    85% {
        opacity: 0.9;
        transform: translate3d(-42vw, -12vh, 0) scale(0.7) rotate(-10deg);
    }
    100% {
        /* الهبوط بدقة بمنتصف اللوحة */
        transform: translate3d(-48vw, -2vh, 0) scale(0.4) rotate(-15deg);
        opacity: 0;
    }
}


/* 📱 شاشات الجوال والأجهزة اللوحية (حماية التصميم) */
@media (max-width: 992px) {
    .splash-grid {
        grid-template-columns: 1fr;
        justify-content: center;
        gap: 20px;
    }
    
    .splash-device-container {
        display: none !important;
    }
    
    .flying-order-package {
        display: none !important;
    }
    
    .splash-title-ar {
        font-size: 2.2rem;
    }
}

/* الاختفاء التدريجي للسبلاش بالكامل ومغادرة الشاشة */
.splash-fade-out {
    opacity: 0;
    transform: scale(1.015);
    pointer-events: none;
}
