:root {
    --bg-dark: #030712;
    --card-bg: #070d1a;
    --card-border: #131c31;
    --primary-green: #10b981;
    --accent-gold: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: 'Cairo', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.main-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.tracker-main-card {
    background-color: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 28px;
    padding: 32px 24px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.truck-icon-wrapper {
    width: 52px;
    height: 52px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 22px;
    position: relative;
    overflow: hidden;
}

#animatedStatusIcon {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.brand-title {
    font-size: 21px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-weight: 600;
}

.search-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.custom-track-input {
    width: 100%; background-color: #030712; border: 1px solid #1e293b;
    border-radius: 14px; padding: 14px 16px; color: #ffffff; font-size: 14px;
    font-weight: 700; text-align: center; outline: none; transition: all 0.2s ease;
}
.custom-track-input:focus { border-color: var(--primary-green); box-shadow: 0 0 12px rgba(16, 185, 129, 0.2); }

.custom-green-btn {
    width: 100%; padding: 15px; background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff; border: none; border-radius: 14px; font-size: 16px; font-weight: 900;
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35); letter-spacing: 0.5px;
}
.custom-green-btn:active { transform: scale(0.98); }

.search-feedback { font-size: 12px; font-weight: 800; margin-top: 10px; min-height: 18px; }

.back-search-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
    color: var(--text-muted); padding: 8px 14px; border-radius: 10px; font-size: 12px;
    font-weight: 800; cursor: pointer; align-self: flex-start;
}
.back-search-btn:hover { color: #ffffff; }

.result-container { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.modal-card-grid { background: #070d1a; border: 1.5px solid var(--card-border); border-radius: 24px; padding: 20px; box-shadow: 0 25px 60px rgba(0,0,0,0.85); }
.modal-header-badge { display: inline-flex; align-items: center; gap: 6px; background: #030712; border: 1px solid var(--card-border); padding: 6px 14px; border-radius: 12px; font-size: 12px; font-weight: 900; color: #6366f1; margin-bottom: 14px; }
.modal-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-box-card { background: #030712; border: 1px solid var(--card-border); padding: 14px; border-radius: 16px; }
.modal-box-card.span-two { grid-column: 1 / -1; }

.modal-box-card.highlight-gold { border-color: rgba(245, 158, 11, 0.35); background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, #030712 100%); }
.modal-box-card.highlight-green { border-color: rgba(16, 185, 129, 0.35); background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, #030712 100%); }

.box-card-header { display: flex; justify-content: space-between; align-items: center; }
.box-card-header span { font-size: 11px; color: var(--text-muted); font-weight: 800; }
.box-card-header strong { font-size: 15px; color: #ffffff; font-weight: 900; }
.box-card-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 800; }
.box-card-label { font-size: 11px; color: var(--text-muted); font-weight: 800; margin-bottom: 6px; display: block; }
.box-card-value-hero { font-size: 22px; font-weight: 900; color: var(--accent-gold); }

/* 📊 شريط التقدم والنسبة المئوية */
.progress-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.box-card-label-green { font-size: 12px; font-weight: 900; color: #34d399; }
.coins-summary-badge { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); color: #ffffff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }

.progress-track-wrapper { position: relative; width: 100%; margin-bottom: 12px; }
.thick-bar-embedded { height: 18px; background: rgba(255, 255, 255, 0.08); border-radius: 12px; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); }

.animated-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.5s ease-out;
    animation: gradientMove 2s infinite linear;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-left: 8px;
    min-width: 32px;
}

.embedded-percent-text { font-size: 11px; font-weight: 900; color: #ffffff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); padding-left: 6px; white-space: nowrap; }

/* ⏳ العداد التناقصي للمتبقي */
.remaining-coins-counter {
    background: #030712;
    border: 1px dashed rgba(245, 158, 11, 0.4);
    padding: 8px 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
}
.remaining-label { color: var(--text-muted); font-weight: 700; }
.remaining-value { color: var(--accent-gold); font-size: 13.5px; font-weight: 900; }

/* 🚀 بانر اكتمال الشحن الاحترافي */
.completion-success-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%);
    border: 1.5px solid #10b981;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    animation: fadeInBanner 0.4s ease-in-out;
}
.completion-success-banner .completion-icon { font-size: 26px; }
.completion-success-banner strong { font-size: 13px; color: #34d399; display: block; font-weight: 900; }
.completion-success-banner p { font-size: 11.5px; color: #a7f3d0; margin-top: 2px; font-weight: 700; line-height: 1.4; }

@keyframes fadeInBanner {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.badge-status { padding: 6px 14px; border-radius: 25px; font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; gap: 6px; }
.badge-progress-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; border: 1px solid #fef08a; box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); animation: glowYellowPulse 1.8s infinite alternate; }
.lightning-bolt { display: inline-block; animation: boltFlash 1s infinite alternate; }
@keyframes glowYellowPulse { 0% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); } 100% { box-shadow: 0 0 20px rgba(253, 224, 71, 0.8); } }
@keyframes boltFlash { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.badge-completed-green { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; border: 1px solid #a7f3d0; box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); animation: glowGreenPulse 2s infinite alternate; }
@keyframes glowGreenPulse { 0% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); } 100% { box-shadow: 0 0 20px rgba(52, 211, 153, 0.8); } }
.badge-starting-blue { background: linear-gradient(135deg, #0284c7, #0369a1); color: #ffffff; border: 1px solid #38bdf8; }

.interactive-steps-card, .glowing-instructions-card, .rating-card-simple { background: #070d1a; border: 1.5px solid var(--card-border); border-radius: 20px; padding: 16px; }
.interactive-line { display: flex; justify-content: space-between; align-items: center; background: #030712; border: 1px solid var(--card-border); padding: 10px 14px; border-radius: 12px; margin-bottom: 8px; font-size: 12px; font-weight: 800; transition: opacity 0.3s ease; }

.warning-alert-box { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); color: #fef08a; padding: 12px; border-radius: 12px; font-size: 12px; line-height: 1.5; display: flex; gap: 8px; align-items: center; }

.card-title-glowing { font-size: 14px; font-weight: 900; color: #fca5a5; margin-bottom: 10px; text-align: center; }

/* 🔒 تصميم بانر تغيير كلمة المرور الأحمر المضيء */
.must-change-pass-glowing-banner { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.15) 100%); 
    border: 1.5px solid #ef4444; 
    color: #ffffff; 
    padding: 12px 14px; 
    border-radius: 14px; 
    font-size: 12.5px; 
    font-weight: 900; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}
.must-change-pass-glowing-banner p { font-size: 11px; color: #fca5a5; font-weight: 700; margin-top: 2px; }
.glowing-lock-icon { font-size: 24px; }

/* 🚨 تنسيق شبكة تعليمات ما بعد الشحن */
.glowing-notice-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.notice-item-box { background: #030712; border: 1px solid var(--card-border); padding: 10px 12px; border-radius: 12px; display: flex; align-items: flex-start; gap: 10px; }
.notice-item-box.alert-red { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.06); }
.notice-item-box .item-icon { font-size: 18px; }
.notice-item-box strong { font-size: 12px; color: #ffffff; display: block; font-weight: 900; }
.notice-item-box p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.redirect-rating-btn { display: flex; justify-content: center; align-items: center; width: 100%; padding: 13px; background: linear-gradient(135deg, var(--accent-gold), #d97706); color: #ffffff; font-size: 13.5px; font-weight: 900; border-radius: 12px; text-decoration: none; box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3); }

.footer-branding { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.support-buttons-row { display: flex; gap: 8px; justify-content: center; }
.support-icon-btn { background: #070d1a; border: 1.5px solid var(--card-border); color: var(--text-muted); padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; text-decoration: none; transition: all 0.2s ease; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.support-icon-btn:hover { color: #ffffff; border-color: var(--primary-green); }
.tiny-footer-link { font-size: 10px; color: #475569; text-decoration: none; font-weight: 700; letter-spacing: 0.5px; transition: color 0.2s ease; }
.tiny-footer-link:hover { color: var(--text-muted); }

/* 💬 تصميم النوافذ المنبثقة */
.cs-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(3, 7, 18, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 99999; padding: 16px; }
.cs-modal-card { background: #070d1a; border: 1.5px solid var(--card-border); border-radius: 20px; width: 100%; max-width: 320px; padding: 18px; box-shadow: 0 20px 40px rgba(0,0,0,0.8); animation: fadeInModal 0.25s ease; }
.cs-modal-header { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 900; color: #ffffff; margin-bottom: 14px; border-bottom: 1px solid var(--card-border); padding-bottom: 8px; }
.cs-close-btn { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; width: 26px; height: 26px; border-radius: 8px; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cs-modal-body { display: flex; flex-direction: column; gap: 8px; }
.cs-whatsapp-option { background: rgba(16, 185, 129, 0.12); border: 1.5px solid rgba(16, 185, 129, 0.35); color: #34d399; padding: 12px; border-radius: 12px; font-size: 12.5px; font-weight: 900; text-align: center; text-decoration: none; transition: all 0.2s ease; }
.cs-whatsapp-option:hover { background: rgba(16, 185, 129, 0.22); border-color: var(--primary-green); }
.cs-telegram-option { background: rgba(56, 189, 248, 0.12); border: 1.5px solid rgba(56, 189, 248, 0.35); color: #38bdf8; padding: 12px; border-radius: 12px; font-size: 12.5px; font-weight: 900; text-align: center; text-decoration: none; transition: all 0.2s ease; }
.cs-telegram-option:hover { background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; }
@keyframes fadeInModal { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
