:root {
    --receipt: #fafaf7;
    --paper: #ffffff;
    --ink: #17171c;
    --night: #0b0b0e;
    --graphite: #5a5a66;
    --mist: #8e8e99;
    --line: #e6e6e0;
    --line-strong: #d1d1c7;
    --surface: #ffffff;
    --text: #17171c;
    --color-signal-400: #ff6a5c;
    --color-signal-500: #ff4d3d;
    --color-signal-600: #e63929;
    --color-signal-700: #c4281a;
    --color-ready-500: #12a150;
}

html {
    scroll-behavior: smooth;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

.display {
    font-family: 'Cairo', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

/* إخفاء شريط التمرير مع بقاء وظيفته */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* تفعيل Container Queries لشاشة الجوال */
.phone-container {
    container-type: inline-size;
}

/* تصميم إطار الجوال الواقعي */
.phone-frame {
    background: linear-gradient(145deg, #2e2e38 0%, #15151a 50%, #25252e 100%);
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.85),
        inset 0 1px 1px rgba(255, 255, 255, 0.22),
        inset 0 0 0 2px #0c0c10;
}

/* الخلفية المنقطة */
.dot-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
    background-size: 18px 18px;
}

/* توهج الإشارة خلف الجوال */
.ring-spill {
    background: radial-gradient(circle at 50% 50%, rgba(255, 77, 61, 0.38), transparent 70%);
}

/* تأثير شاشة الـ LED */
.led-scan {
    display: inline-flex;
    align-items: center;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

/* تصميم فاتورة الكاشير (Receipt) بحافة سفلية مسننة */
.receipt {
    position: relative;
    border-radius: 6px 6px 0 0;
    clip-path: polygon(
        0% 0%, 100% 0%, 100% calc(100% - 10px),
        96% 100%, 92% calc(100% - 10px), 88% 100%, 84% calc(100% - 10px),
        80% 100%, 76% calc(100% - 10px), 72% 100%, 68% calc(100% - 10px),
        64% 100%, 60% calc(100% - 10px), 56% 100%, 52% calc(100% - 10px),
        48% 100%, 44% calc(100% - 10px), 40% 100%, 36% calc(100% - 10px),
        32% 100%, 28% calc(100% - 10px), 24% 100%, 20% calc(100% - 10px),
        16% 100%, 12% calc(100% - 10px), 8% 100%, 4% calc(100% - 10px),
        0% 100%
    );
}

/* تصميم تذاكر الأسعار مع الفتحات الجانبية (Notches) */
.ticket {
    position: relative;
    border-radius: 28px;
    -webkit-mask-image: 
        radial-gradient(circle 14px at 0 var(--notch-y, 148px), transparent 98%, #000 100%),
        radial-gradient(circle 14px at 100% var(--notch-y, 148px), transparent 98%, #000 100%);
    -webkit-mask-composite: destination-in;
    mask-image: 
        radial-gradient(circle 14px at 0 var(--notch-y, 148px), transparent 98%, #000 100%),
        radial-gradient(circle 14px at 100% var(--notch-y, 148px), transparent 98%, #000 100%);
    mask-composite: intersect;
}

.ticket-shadow {
    filter: drop-shadow(0 16px 32px rgba(23, 23, 28, 0.08)) drop-shadow(0 2px 6px rgba(23, 23, 28, 0.05));
}

/* الخط المنقط الفاصل في التذاكر والفواتير */
.perforation {
    border: 0;
    border-top: 2px dashed var(--line-strong);
}

/* أزرار التنقل بين الخطوات */
.step-pill {
    background: rgba(23, 23, 28, 0.06);
    color: var(--graphite);
}
.step-pill.active {
    background: var(--ink);
    color: #fff;
}

/* نافذة الفيديو المنبثقة (Dialog) */
dialog#demo-video-dialog::backdrop {
    background: rgba(11, 11, 14, 0.85);
    backdrop-filter: blur(8px);
}
dialog#demo-video-dialog[open] {
    animation: dialog-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes dialog-in {
    0% { opacity: 0; transform: scale(0.94) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ================== الحركات والأنيميشن (Animations) ================== */

/* 1. موجات الرنين خلف الجوال */
@keyframes ripple {
    0% {
        transform: scale(0.85);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}
.animate-ripple {
    animation: ripple 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* 2. اهتزاز الجوال عند الرنين */
@keyframes buzz {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translate3d(-1.5px, 0, 0) rotate(-0.6deg); }
    20%, 40%, 60%, 80% { transform: translate3d(1.5px, 0, 0) rotate(0.6deg); }
}
.animate-buzz {
    animation: buzz 0.65s ease-in-out infinite;
    animation-delay: 1.2s;
}

/* 3. وصول الإشعارات على شاشة القفل */
@keyframes arrive {
    0% {
        opacity: 0;
        transform: translateY(-14px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.animate-arrive {
    animation: arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-arrive-late {
    opacity: 0;
    animation: arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

/* 4. نقاط البيجر النابضة */
@keyframes pager-dot {
    0%, 100% { opacity: 0.25; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.2); background-color: var(--color-signal-400); }
}
.animate-pager-dot {
    animation: pager-dot 1.1s ease-in-out infinite;
}

/* 5. حلقات زر CTA النهائي */
@keyframes cta-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.75;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.65);
        opacity: 0;
    }
}
.cta-ring {
    animation: cta-ring 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* 6. شريط الشعارات المتمرر بحركة سلو موشن هادئة ومتوازنة (50 ثانية) */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}
.marquee-track {
    animation: marquee 50s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}