/* ============================================
   متغيرات اللون
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
}

/* ============================================
   تنسيق شريط التنقل السفلي
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    
    /* خلفية زجاجية */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -8px 32px rgba(31, 41, 55, 0.1);
    
    /* التخطيط */
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    
    /* الحدود */
    border-radius: 20px 20px 0 0;
    padding: 0 8px;
    
    /* التحريك */
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   عناصر التنقل الفردية
   ============================================ */
.nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    padding: 8px;
    position: relative;
    height: 60px;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    animation: expandWidth 0.3s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 24px;
    }
}

/* ============================================
   أيقونات التنقل
   ============================================ */
.nav-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-item:hover .nav-icon {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.nav-item.active .nav-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.nav-icon i {
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon i {
    transform: scale(1.1);
}

.nav-item.active .nav-icon i {
    animation: bounceIcon 0.4s ease;
}

@keyframes bounceIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ============================================
   نصوص التنقل
   ============================================ */
.nav-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.nav-item:hover .nav-label {
    font-weight: 600;
}

.nav-item.active .nav-label {
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 0 4px rgba(99, 102, 241, 0.2);
}

/* ============================================
   تأثيرات إضافية
   ============================================ */
.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-item:hover::after {
    opacity: 1;
}

/* ============================================
   استجابة الشاشات الصغيرة
   ============================================ */
@media (max-width: 640px) {
    .bottom-nav {
        height: 65px;
        padding: 0 4px;
    }
    
    .nav-item {
        padding: 6px;
        height: 55px;
    }
    
    .nav-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .nav-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .bottom-nav {
        height: 60px;
        border-radius: 16px 16px 0 0;
    }
    
    .nav-item {
        padding: 4px;
        height: 50px;
    }
    
    .nav-icon {
        width: 24px;
        height: 24px;
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .nav-label {
        font-size: 10px;
    }
}

/* ============================================
   دعم الوضع الداكن (اختياري)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(31, 41, 55, 0.8);
        border-top-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .nav-item {
        color: #9ca3af;
    }
    
    .nav-item:hover {
        background: rgba(99, 102, 241, 0.15);
    }
    
    .nav-item.active {
        background: rgba(99, 102, 241, 0.2);
    }
    
    .nav-item:hover .nav-icon {
        background: rgba(99, 102, 241, 0.2);
    }
    
    .nav-item.active .nav-icon {
        background: rgba(99, 102, 241, 0.25);
    }
}

/* ============================================
   تحسين الأداء والسلاسة
   ============================================ */
.bottom-nav,
.nav-item,
.nav-icon,
.nav-label {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تقليل المسافة من الأسفل للمحتوى */
body {
    padding-bottom: 70px;
}

@media (max-width: 640px) {
    body {
        padding-bottom: 65px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 60px;
    }
}
