﻿
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');



:root {
    --brand-maroon: #5b1424;
    --brand-maroon-light: #ba1d43;
    --brand-gold: #cba052;
    --brand-gray: #4a4b4f;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --sidebar-width: 260px;
    --header-height: 85px;
}

/* ========================================================= */

/* تخصيص شريط التمرير (Scrollbar) لكامل النظام */

/* ========================================================= */



::-webkit-scrollbar {
    width: 10px; /* نحفناه تكه عشان يكون أفخم */
}



::-webkit-scrollbar-track {
    background: transparent; /* خلفية مخفية عشان ما يزعج العين */
}



::-webkit-scrollbar-thumb {
    background-color: rgba(186, 29, 67, 0.2); /* عنابي فاتح جداً وشفاف */

    border-radius: 10px;
}



    /* لما تاشر عليه يغمق فجأة (هذا أقصى شيء يدعمه المتصفح بدون جافاسكربت) */

    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(186, 29, 67, 0.99); /* عنابي غامق */
    }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}



body {
    overflow-y: auto;
    margin: 0;
    padding: 0;
    /* تأكد إن الارتفاع 100% مو 100vh عشان تتفادى السكرول الوهمي */

    height: 100%;
}

.main-wrapper {
    overflow: hidden; /* يمنع السكرول الخارجي ويفعله بس للمحتوى اللي يحتاجه */
}

/* ========================================================= */

/* 1. الشريط الجانبي (Sidebar) */

/* ========================================================= */

.snood-sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}



/* بروفايل المستخدم في السايد بار */

.sidebar-profile {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff4f4;
}



.profile-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(186, 29, 67, 0.1);
    color: var(--brand-maroon-light);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-left: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}



.profile-info {
    display: flex;
    flex-direction: column;
}



    .profile-info .welcome-text {
        font-size: 12px;
        color: #aab2bd;
        font-weight: 600;
    }



    .profile-info .role-text {
        font-size: 15px;
        font-weight: 800;
        color: var(--brand-maroon);
    }



/* ========================================================= */

/* قائمة السايد بار (محدثة وعصرية) */

/* ========================================================= */

.sidebar-menu {
    padding: 20px 12px;
    list-style: none;
    flex-grow: 1;
}



    .sidebar-menu li {
        margin-bottom: 8px; /* مسافة أنعم بين الأزرار */
    }



    /* شكل الأزرار الافتراضي (غير النشطة) */

    .sidebar-menu a {
        display: flex;
        align-items: center;
        padding: 12px 12px;
        color: var(--brand-gray);
        text-decoration: none;
        border-radius: 10px; /* زوايا ناعمة عصرية */

        font-weight: 600;
        font-size: 16px;
        transition: background-color 0.2s ease, color 0.2s ease; /* انتقال لوني فقط بدون حركة إزاحة */
    }



        .sidebar-menu a i {
            width: 25px;
            font-size: 18px;
            margin-left: 10px;
            color: #aab2bd;
            transition: color 0.2s ease;
        }



        /* 🌟 الهوفر العصري (للأزرار غير النشطة فقط) */

        /* نستخدم :not(.active) عشان نضمن إن الزر المضغوط ما يتأثر أبداً */

        .sidebar-menu a:not(.active):hover {
            background-color: #f1f5f9; /* خلفية رمادية فاتحة جداً ومريحة للعين */

            color: var(--brand-maroon); /* النص يقلب عنابي */
        }



            .sidebar-menu a:not(.active):hover i {
                color: var(--brand-maroon); /* الأيقونة تقلب عنابي مع النص */
            }



        /* 🌟 الصفحة النشطة (الزر المضغوط) */

        .sidebar-menu a.active {
            background-image: linear-gradient(to right, var(--brand-maroon) 0%, var(--brand-maroon-light) 100%);
            color: var(--white);
            box-shadow: 0 4px 10px rgba(91, 20, 36, 0.15); /* ظل ناعم جداً */
            /* 💡 التريكات العصرية لتعطيل إحساس الضغط */

            cursor: default; /* تغيير شكل الماوس للسهم العادي */

            pointer-events: none; /* إيقاف أي تفاعل (Hover أو Click) تماماً */
        }



            .sidebar-menu a.active i {
                color: var(--white);
            }

/* ========================================================= */

/* 2. منطقة المحتوى والشريط العلوي (Navbar) */

/* ========================================================= */

.main-wrapper {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



.snood-navbar {
    height: var(--header-height);
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 999;
}



.navbar-title h4 {
    margin: 0;
    font-weight: 900;
    font-size: 20px;
    background-image: linear-gradient(to right, var(--brand-maroon), var(--brand-maroon-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 4px rgba(186, 29, 68, 0.15));
}



.navbar-logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}



.content-body {
    padding: 30px;
    flex-grow: 1;
    background-color: #fff4f4;
}

/* ========================================================= */

/* 3. زر تسجيل الخروج (مفصول في الأسفل) */

/* ========================================================= */

.logout-container {
    padding: 15px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto; /* 🌟 هذي اللي بتدفه لآخر الشاشة تحت */
}



.logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #ef4444; /* أحمر تحذيري */

    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    background-color: rgba(239, 68, 68, 0.05); /* خلفية حمراء باهتة */

    transition: all 0.3s ease;
    cursor: pointer;
}



    .logout-btn i {
        width: 25px;
        font-size: 18px;
        margin-left: 10px;
        color: #d84141;
        transition: transform 0.3s ease;
    }



    .logout-btn:hover {
        background-color: #d84141;
        color: var(--white);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    }



        .logout-btn:hover i {
            color: var(--white);
            transform: translateX(-4px);
        }



/* ========================================================= */

/* 4. الهوية الموحدة لرسائل التنبيه (SweetAlert) */

/* ========================================================= */

.modern-swal-popup {
    border-radius: 24px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Tajawal', sans-serif !important;
    padding: 2em !important;
}



/* ========================================================= */

/* 5. تصميم البطاقات البيضاء (Cards) */

/* ========================================================= */

.snood-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 25px;
}



/* ========================================================= */

/* 6. ترويسة الصفحات (Page Header) */

/* ========================================================= */

.snood-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}



.snood-page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-maroon);
    margin-bottom: 5px;
    margin-right: 5px;
}



.snood-page-subtitle {
    font-size: 15px;
    color: #4a1c26; /* غيرناه للعنابي */

    font-weight: 700;
    margin-right: 5px;
}



/* ========================================================= */

/* 7. الجداول العصرية (Snood Tables) */

/* ========================================================= */

.snood-table-wrapper {
    overflow-x: auto;
}



.snood-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}



    .snood-table th {
        background-color: #f8f9fa;
        color: var(--brand-gray);
        font-weight: 700;
        font-size: 14px;
        padding: 15px 18px;
        border-bottom: 2px solid #e2e5e9;
        white-space: nowrap;
    }



    .snood-table td {
        padding: 15px 18px;
        border-bottom: 1px solid #f1f5f9;
        color: var(--brand-gray);
        font-size: 15px;
        font-weight: 500;
        vertical-align: middle;
    }



    .snood-table tbody tr {
        transition: background-color 0.2s ease;
    }



        /* لون عنابي خفيف جداً عند مرور الماوس على الصف */

        .snood-table tbody tr:hover {
            background-color: rgba(186, 29, 67, 0.02);
        }



/* ========================================================= */

/* 8. أزرار الإجراءات في الجداول (Action Buttons) */

/* ========================================================= */

.action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0 4px;
}



    /* زر العرض (أزرق) */

    .action-btn.view {
        color: #3b82f6;
        background-color: rgba(59, 130, 246, 0.1);
    }



        .action-btn.view:hover {
            background-color: #3b82f6;
            color: #fff;
            transform: translateY(-2px);
        }



    /* زر التعديل (ذهبي/أصفر) */

    .action-btn.edit {
        color: #eab308;
        background-color: rgba(234, 179, 8, 0.1);
    }



        .action-btn.edit:hover {
            background-color: #eab308;
            color: #fff;
            transform: translateY(-2px);
        }



    /* زر الحذف (أحمر) */

    .action-btn.delete {
        color: #ef4444;
        background-color: rgba(239, 68, 68, 0.1);
    }



        .action-btn.delete:hover {
            background-color: #ef4444;
            color: #fff;
            transform: translateY(-2px);
        }



/* ========================================================= */

/* 9. شارة اللون (Color Badge) */

/* ========================================================= */

.snood-color-badge {
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-block;
}



/* ========================================================= */

/* 10. الخط الطولي المتدرج بجانب العناوين (موزون بالملي) */

/* ========================================================= */

.title-with-line {
    position: relative;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



    /* 🌟 إزالة المسافات الوهمية من العنوان والوصف عشان الخط ما يطول بزيادة */

    .title-with-line .snood-page-title {
        margin-bottom: 4px;
        line-height: 1.4;
    }



    .title-with-line .snood-page-subtitle {
        margin-bottom: 0;
        line-height: 1.5;
    }



    .title-with-line::before {
        content: "";
        position: absolute;
        right: 0;
        top: 4px; /* وزن دقيق من فوق */

        bottom: 2px; /* وزن دقيق من تحت */

        width: 4px;
        border-radius: 5px;
        background-image: linear-gradient(to bottom, var(--brand-maroon-light) 0%, var(--brand-maroon) 100%);
    }



/* ========================================================= */

/* 11. الأرقام المميزة (IDs) في الجداول */

/* ========================================================= */

.snood-id-text {
    /* استخدمنا العنابي الفاتح عشان يبرز وما يبين أسود */

    color: var(--brand-maroon-light);
    font-weight: 900;
    font-size: 16px;
}

/* ========================================================= */

/* 12. الزر الأساسي لهوية سنود (تم عكس اتجاه التدرج) */

/* ========================================================= */

.btn-snood-primary {
    background-image: linear-gradient(to right, var(--brand-maroon) 0%, var(--brand-maroon-light) 50%, var(--brand-maroon) 100%);
    background-size: 200% auto;
    background-position: left center; /* 🌟 عكسنا البداية هنا */

    color: var(--white) !important;
    border: none;
    cursor: pointer;
    transition: background-position 0.5s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(91, 20, 36, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}



    /* 🌟 تأثير الهوفر */

    .btn-snood-primary:hover {
        background-position: right center; /* 🌟 وعكسنا النهاية هنا */

        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(186, 29, 67, 0.4);
        color: var(--white) !important;
    }



    .btn-snood-primary:active {
        transform: translateY(0);
    }







/* ========================================================= */

/* 13. حقول الإدخال العصرية (Snood Form Inputs) */

/* ========================================================= */

.snood-form-group {
    margin-bottom: 20px;
    text-align: right;
}



.snood-form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--brand-gray);
    font-size: 14px;
}



.snood-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    background-color: rgba(248, 249, 251, 0.9);
    border: 2px solid #e2e5e9;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-maroon);
    outline: none;
    transition: all 0.3s ease;
}



    .snood-input:focus {
        border-color: var(--brand-maroon-light);
        background-color: var(--white);
        box-shadow: 0 6px 18px rgba(186, 29, 67, 0.12);
        transform: translateY(-2px);
    }



    .snood-input::placeholder {
        color: #aab2bd;
        font-weight: 500;
    }



/* تخصيص حقل اختيار اللون ليطابق الارتفاع */

input[type="color"].snood-input {
    padding: 5px;
    cursor: pointer;
}



/* ========================================================= */

/* 14. الزر الثانوي (مثل زر العودة والإلغاء) */

/* ========================================================= */

.btn-snood-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #fefbf0;
    color: #aa6400;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 3px solid #bb4900;
}



    /* 🌟 تأثير الهوفر (يقلب عنابي خفيف ويرتفع) */

    .btn-snood-secondary:hover {
        background-color: #eab308; /* خلفية عنابية شفافة جداً */

        color: var(--white) !important;
        border-color: rgba(186, 29, 67, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(186, 29, 67, 0.08);
    }



    .btn-snood-secondary i {
        margin-right: 8px; /* مسافة بين النص والسهم */

        transition: transform 0.3s ease;
    }



    /* 🌟 السهم يتحرك لليسار كدلالة على الرجوع عند التأشير */

    .btn-snood-secondary:hover i {
        transform: translateX(-4px);
    }

.btn-snood-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #ffffff;
    color: var(--brand-gray);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 1px solid #b5b5b5;
}



    /* 🌟 تأثير الهوفر (يقلب عنابي خفيف ويرتفع) */

    .btn-snood-back:hover {
        background-color: #dfdfdf; /* خلفية عنابية شفافة جداً */

        border-color: rgb(175, 175, 175);
        transform: translateY(-2px);
    }



    .btn-snood-back i {
        margin-right: 8px; /* مسافة بين النص والسهم */

        transition: transform 0.3s ease;
    }



    /* 🌟 السهم يتحرك لليسار كدلالة على الرجوع عند التأشير */

    .btn-snood-back:hover i {
        transform: translateX(-4px);
    }

/* ========================================================= */

/* 15. صناديق الإحصائيات والمعلومات (Info Boxes) */

/* ========================================================= */

.snood-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}



.snood-info-box {
    background-color: rgba(248, 249, 251, 0.7);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e2e5e9;
    transition: all 0.3s ease;
}



    .snood-info-box:hover {
        background-color: var(--white);
        box-shadow: 0 6px 15px rgba(0,0,0,0.04);
        border-color: #cbd5e1;
        transform: translateY(-2px);
    }



.snood-info-label {
    color: #aab2bd;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}



.snood-info-value {
    color: var(--brand-maroon);
    font-size: 20px;
    font-weight: 900;
    margin: 0;
}



/* ========================================================= */

/* 16. زر الخطر / الحذف (Danger Button) */

/* ========================================================= */

.btn-snood-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #ffe7e7;
    color: #ef4444;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 1px solid #fa8080;
    cursor: pointer;
}



    .btn-snood-danger:hover {
        background-color: #ef4444;
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    }



    .btn-snood-danger i {
        margin-right: 8px;
    }







/* ========================================================= */

/* 17. صندوق التصفية والفلترة (Filter Section) */

/* ========================================================= */

.snood-filter-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 251, 1) 100%);
    border: 1px solid rgba(186, 29, 67, 0.08); /* حد عنابي خفيف جداً */

    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}



.snood-select {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    background-color: var(--white);
    border: 2px solid #e2e5e9;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-maroon);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    /* لتغيير شكل السهم الافتراضي */

    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b1424' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 16px;
}



    .snood-select:focus, .snood-select:hover {
        border-color: var(--brand-maroon-light);
        box-shadow: 0 4px 12px rgba(186, 29, 67, 0.1);
    }





/* ========================================================= */

/* 18. تأثيرات الأخطاء والاهتزاز (Validation & Shake) */

/* ========================================================= */

.snood-input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    animation: snood-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}



.snood-error-hint {
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}



    .snood-error-hint.show {
        display: block;
        opacity: 1;
    }



@keyframes snood-shake {

    10%, 90% {
        transform: translateX(-2px);
    }



    20%, 80% {
        transform: translateX(4px);
    }



    30%, 50%, 70% {
        transform: translateX(-6px);
    }



    40%, 60% {
        transform: translateX(6px);
    }
}





/* ========================================================= */

/* 19. تخصيص أيقونات السويت اليرت لتطابق هوية سنود */

/* ========================================================= */



/* إخفاء القطع الزائدة اللي تستخدمها سويت اليرت للأنيميشن القديم */

.modern-swal-popup .swal2-success-ring,
.modern-swal-popup .swal2-success-fix,
.modern-swal-popup .swal2-success-circular-line-left,
.modern-swal-popup .swal2-success-circular-line-right {
    display: none !important;
}



/* 🌟 أيقونة النجاح (الصح) - عنابي سنود متدرج مع توهج */

/* 🌟 أيقونة النجاح (الصح) - عنابي سنود متدرج مع توهج */

.modern-swal-popup .swal2-icon.swal2-success {
    background: linear-gradient(135deg, var(--brand-maroon-light) 0%, var(--brand-maroon) 100%) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(91, 20, 36, 0.4) !important;
    animation: snood-icon-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    /* هذا بيضمن إن أي محتوى نحطه يكون في النص بالضبط */

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}



    /* إخفاء الصح الافتراضي المكسور حق السويت اليرت */

    .modern-swal-popup .swal2-icon.swal2-success [class^="swal2-success-line"] {
        display: none !important;
    }

    /* 🌟 رسم صح نظيف ومقاسه ممتاز مع أنيميشن النط */

    .modern-swal-popup .swal2-icon.swal2-success::after {
        content: '';
        width: 45px; /* كبرنا المقاس هنا */

        height: 45px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3Cpolyline points='20 6 9 17 4 12'%3e%3C/polyline%3e%3C/svg%3e");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        /* أنيميشن الصح (يبدأ متأخر 0.2 ثانية عشان الدائرة تطلع قبله) */

        animation: snood-check-pop 0.5s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both !important;
    }





    .modern-swal-popup .swal2-icon.swal2-success .swal2-success-line-tip {
        width: 20px !important;
        left: 12px !important;
        top: 42px !important;
    }



    .modern-swal-popup .swal2-icon.swal2-success .swal2-success-line-long {
        width: 35px !important;
        right: 14px !important;
        top: 38px !important;
    }



/* 🌟 أيقونة التحذير (التعجب) - ذهبي متدرج */

.modern-swal-popup .swal2-icon.swal2-warning {
    background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.3) !important;
    color: var(--white) !important;
    animation: snood-icon-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}



    .modern-swal-popup .swal2-icon.swal2-warning .swal2-icon-content {
        color: var(--white) !important;
        border: none !important;
    }



/* 🌟 أيقونة الخطأ (X) - أحمر متدرج */

.modern-swal-popup .swal2-icon.swal2-error {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3) !important;
    animation: snood-icon-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

    /* تلوين علامة الخطأ بالأبيض */

    .modern-swal-popup .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
        background-color: var(--white) !important;
    }



/* 🌟 أيقونة المعلومات (i) - أزرق متدرج */

.modern-swal-popup .swal2-icon.swal2-info {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3) !important;
    color: var(--white) !important;
    animation: snood-icon-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}



    .modern-swal-popup .swal2-icon.swal2-info .swal2-icon-content {
        color: var(--white) !important;
    }



/* 🌟 أنيميشن الظهور الفخم (Pop & Bounce) */

/* 🌟 أنيميشن الصح الداخلي (يطلع من الصفر ويكبر شوي بعدين يثبت) */

@keyframes snood-check-pop {

    0% {
        transform: scale(0);
        opacity: 0;
    }



    70% {
        transform: scale(1.3);
        opacity: 1;
    }



    100% {
        transform: scale(1);
        opacity: 1;
    }
}



/* ========================================================= */

/* 20. صفحة المشاهدة السينمائية */

/* ========================================================= */



.watch-page-body {
    background-color: #f0e1e1;
    margin: 0;
    padding: 30px;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.4s ease;
    min-height: 100vh;
}



/* الأزرار الطافية العلوية */

.watch-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}



/* زر التبديل مطعم بهوية سنود */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}



.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}



    .theme-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }



.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(186, 29, 67, 0.15);
    border: 1px solid rgba(186, 29, 67, 0.2);
    transition: .4s;
    border-radius: 34px;
}



    .slider-toggle:before {
        position: absolute;
        content: "\f186";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--brand-maroon);
        height: 26px;
        width: 26px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }



input:checked + .slider-toggle {
    background-color: var(--brand-maroon);
    border-color: var(--brand-maroon);
}



    input:checked + .slider-toggle:before {
        transform: translateX(29px);
        content: "\f185";
        color: #eab308;
    }







/* التخطيط */

.watch-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}



/* السايدبار */

.playlist-sidebar {
    background-color: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(186, 29, 67, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    flex: 0 0 350px;
    height: calc(100vh - 120px);
    position: sticky;
    top: 30px;
    transition: all 0.4s ease;
}



@media (max-width: 1200px) {

    .playlist-sidebar {
        flex: 0 0 300px;
    }
}



.playlist-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 251, 1) 100%);
    /* شلنا الـ border-bottom من هنا */

    border-top-left-radius: 19px;
    border-top-right-radius: 19px;
    position: relative; /* ضروري عشان نوزن الخط تحته */
}

    .playlist-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 25px; /* يبعد عن اليسار بنفس مسافة البادينق */

        right: 25px; /* يبعد عن اليمين */

        height: 2px;
        background-color: #cbd5e1;
    }

.playlist-items {
    overflow-y: auto;
    padding: 15px;
}



.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--brand-gray);
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}



    .playlist-item:hover {
        background-color: #f6eded;
        border-color: #e2e8f0;
        transform: translateX(-5px);
    }



    .playlist-item.active {
        background: linear-gradient(135deg, var(--brand-maroon-light) 0%, var(--brand-maroon) 100%);
        border: none;
        box-shadow: 0 6px 20px rgba(186, 29, 67, 0.3);
        cursor: default;
    }



        .playlist-item.active .playlist-title {
            color: var(--white) !important;
            font-weight: 900 !important;
        }



.play-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
}



.playlist-item.active .play-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}



.video-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}



.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}



    .iframe-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }





/* ========================================================= */

/* 🌟 ستايلات الوضع الليلي (Dark Mode) المعتمدة */

/* ========================================================= */



[data-theme="dark"] .watch-page-body {
    background-color: #1a080c;
}



[data-theme="dark"] .playlist-sidebar,
[data-theme="dark"] .snood-card {
    background-color: #320f16;
    border-color: #4a1c26;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}



[data-theme="dark"] .playlist-header {
    background: #320f16;
}



    /* 🌟 تلوين الخط الجديد في الوضع الليلي */

    [data-theme="dark"] .playlist-header::after {
        background-color: #5b1424;
    }



/* 🌟 توحيد جميع النصوص للون المفضل (#facdcd) */

[data-theme="dark"] .main-title,
[data-theme="dark"] .playlist-title,
[data-theme="dark"] .desc-text,
[data-theme="dark"] .snood-page-title {
    color: #facdcd !important;
}



[data-theme="dark"] .playlist-item:not(.active) {
    color: #facdcd;
}



    [data-theme="dark"] .playlist-item:not(.active):hover {
        background-color: #57232e;
        border-color: #5b1424; /* توضيح فاصل الهوفر */
    }



[data-theme="dark"] .play-icon {
    background-color: #4a1c26;
    color: #facdcd;
}



/* 🌟 الفواصل في الوضع الليلي (تم تفتيحها قليلاً لتكون واضحة) */

[data-theme="dark"] .meta-divider {
    border-bottom-color: #5b1424 !important;
}



.btn-snood-back-watch {
    background-color: var(--white);
    color: var(--brand-maroon);
    border: 1px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}



    .btn-snood-back-watch:hover {
        background-color: var(--brand-maroon);
        color: var(--white);
        border-color: var(--brand-maroon);
    }



[data-theme="dark"] .vertical-divider {
    border-left-color: #5b1424 !important;
}



/* 🌟 زر العودة في الوضع الليلي */

[data-theme="dark"] .btn-snood-back-watch {
    background-color: #57232e;
    color: #facdcd;
    border-color: #5b1424;
}



    [data-theme="dark"] .btn-snood-back-watch:hover {
        background-color: #f8d9d9;
        color: #511919;
    }



/* 🌟 تنسيق حقل الوصف المتعدد (Textarea) */

.snood-textarea {
    width: 100%;
    min-height: 120px; /* ارتفاع مناسب وبداية ممتازة */

    max-height: 350px;
    padding: 15px;
    background-color: rgba(248, 249, 251, 0.9);
    border: 2px solid #e2e5e9;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-maroon);
    outline: none;
    transition: all 0.3s ease;
    resize: vertical; /* يمنع التمدد العرضي، ويسمح بالطولي فقط بحدود معقولة */

    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
}



    .snood-textarea:focus {
        border-color: var(--brand-maroon-light);
        background-color: var(--white);
        box-shadow: 0 6px 18px rgba(186, 29, 67, 0.12);
    }



    .snood-textarea::placeholder {
        color: #aab2bd;
        font-weight: 500;
    }





/* =========================================

   تنسيقات شريط التنقل (Navbar) واللغة

   ========================================= */



/* إخفاء نافذة جوجل ترانسليت */

body > .skiptranslate,
.goog-te-banner-frame.skiptranslate,
.goog-te-menu-frame.skiptranslate,
#goog-gt-tt, .goog-tooltip {
    display: none !important;
}



body {
    top: 0px !important;
    position: static !important;
}



.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}



/* تصميم حاوية زر اللغة */

.lang-toggle-wrapper {
    display: inline-flex;
    align-items: center;
}



.lang-toggle-checkbox {
    display: none;
}



/* تصميم الزر العنابي */

.lang-toggle-label {
    width: 65px;
    height: 32px;
    background-color: var(--brand-maroon, #5b1424);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}



/* 🌟 تعديل وزنية حرف الـ ع والإنجليزي */

.lang-text-ar {
    transform: translateY(-2px); /* هذا اللي يرفع الحرف لفوق ويوزنه */

    display: inline-block;
    font-size: 15px;
    z-index: 1; /* عشان يكون فوق الكورة */
}



.lang-text-en {
    transform: translateY(-1px);
    display: inline-block;
    font-size: 14px;
    z-index: 1;
}



/* تصميم الكورة البيضاء وحركتها */

.lang-toggle-ball {
    width: 26px;
    height: 26px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px; /* مكانها الافتراضي */

    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 0;
}



/* حركة الكورة للجهة الثانية */

.lang-toggle-checkbox:checked + .lang-toggle-label .lang-toggle-ball {
    transform: translateX(33px);
}







/* 🌟 إجبار شريط التمرير يكون في اليسار (للموقع كامل) */

html {
    direction: rtl;
}



body {
    direction: rtl;
    unicode-bidi: embed;
}



    body.user-portal-body {
        background-color: #f0e1e1;
        font-family: 'Tajawal', sans-serif;
        margin: 0;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        overflow-x: hidden;
        transition: background-color 0.4s ease, color 0.4s ease;
    }



/* الناف بار */

.user-navbar {
    background-color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}



/* زر الثلاث شرطات */

.hamburger-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--brand-maroon);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}



    .hamburger-btn:hover {
        transform: scale(1.1);
    }



/* عنوان البوابة في الناف بار */

.portal-title {
    margin: 0;
    font-weight: 900;
    color: var(--brand-maroon);
    transition: color 0.4s ease;
}



/* السايد بار المخفي */

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}



    .offcanvas-overlay.show {
        opacity: 1;
        visibility: visible;
    }



.offcanvas-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1), background-color 0.4s ease;
    display: flex;
    flex-direction: column;
}



    .offcanvas-sidebar.open {
        right: 0;
    }



.offcanvas-header {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    transition: border-color 0.4s ease;
}



.close-sidebar-btn {
    background: rgba(186, 29, 67, 0.1);
    border: none;
    color: var(--brand-maroon);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}



    .close-sidebar-btn:hover {
        background: var(--brand-maroon);
        color: var(--white);
        transform: rotate(90deg);
    }



.offcanvas-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* قللنا المسافة عشان تصير متقاربة وأنيقة زي الأدمن */

    flex-grow: 1;
}



.offcanvas-link {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 🌟 هذا السطر هو السحر: يخلي النص يمين والأيقونة أقصى اليسار */

    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--brand-gray);
    font-weight: 800;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: transparent;
}



    .offcanvas-link i {
        font-size: 20px;
        color: #94a3b8;
        transition: color 0.3s ease;
    }



    .offcanvas-link:hover {
        background-color: #f1f5f9;
        transform: translateX(-5px);
    }



        .offcanvas-link:hover i {
            color: var(--brand-maroon);
        }

        .offcanvas-link:hover:not(.active) {
            background-color: #f8fafc;
            transform: translateX(-5px);
            color: var(--brand-maroon);
        }



            .offcanvas-link:hover:not(.active) i {
                color: var(--brand-maroon);
            }



    /* 🌟 العنصر النشط (Active) بنفس تصميم الأدمن (خلفية عنابية ونص أبيض) */

    /* 🌟 العنصر النشط (Active) بتدرج لوني مطابق للأدمن */

    .offcanvas-link.active {
        background-image: linear-gradient(to right, var(--brand-maroon) 0%, var(--brand-maroon-light, #8a253a) 50%, var(--brand-maroon) 100%);
        background-size: 200% auto;
        background-position: left center; /* يبدأ التدرج من اليسار */

        color: var(--white) !important;
        box-shadow: 0 4px 15px rgba(91, 20, 36, 0.2);
        border: none;
        transition: background-position 0.5s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    }



        /* حركة التدرج اللوني عند تمرير الماوس على العنصر النشط */

        .offcanvas-link.active:hover {
            background-position: right center;
            box-shadow: 0 10px 25px rgba(186, 29, 67, 0.4);
        }



        .offcanvas-link.active i {
            color: var(--white) !important;
        }



/* الوضع الليلي للعنصر النشط (عشان يحافظ على التدرج) */

[data-theme="dark"] .offcanvas-link.active {
    background-image: linear-gradient(to right, var(--brand-maroon) 0%, var(--brand-maroon-light, #8a253a) 50%, var(--brand-maroon) 100%);
    color: #fff !important;
}

/* 🌟 إصلاح لون النص والأيقونة عند التمرير في الوضع الليلي */

[data-theme="dark"] .offcanvas-link:hover:not(.active) {
    background-color: #4a1c26 !important;
    color: #ffffff !important;
}



    [data-theme="dark"] .offcanvas-link:hover:not(.active) span,
    [data-theme="dark"] .offcanvas-link:hover:not(.active) i {
        color: #ffffff !important;
    }

.user-main-content {
    flex: 1;
    padding: 40px;
}



.user-footer {
    background-color: var(--brand-maroon);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #facdcd;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}



/* 🌟 الوضع الليلي للـ Layout */

[data-theme="dark"] body.user-portal-body {
    background-color: #1a080c;
}



[data-theme="dark"] .user-navbar {
    background-color: #320f16;
    border-color: #4a1c26;
}



[data-theme="dark"] .hamburger-btn {
    color: #facdcd;
}



[data-theme="dark"] .portal-title {
    color: #facdcd;
}



[data-theme="dark"] .offcanvas-sidebar {
    background-color: #320f16;
}



[data-theme="dark"] .offcanvas-header {
    border-bottom-color: #4a1c26;
}



    [data-theme="dark"] .offcanvas-header h3 {
        color: #facdcd !important;
    }



[data-theme="dark"] .close-sidebar-btn {
    background: rgba(250, 205, 205, 0.1);
    color: #facdcd;
}



    [data-theme="dark"] .close-sidebar-btn:hover {
        background: #facdcd;
        color: #ffe5ea;
    }



[data-theme="dark"] .offcanvas-link {
    color: #facdcd;
}



    [data-theme="dark"] .offcanvas-link:hover {
        background-color: #4a1c26;
    }



    [data-theme="dark"] .offcanvas-link i {
        color: rgba(250, 205, 205, 0.6);
    }



    [data-theme="dark"] .offcanvas-link:hover i {
        color: #ff;
    }



[data-theme="dark"] .user-footer {
    background-color: #2b0f15;
}



/* 🌟 تنسيقات زر اللغة الجديد */

.lang-toggle-wrapper {
    display: inline-flex;
    align-items: center;
}



.lang-toggle-checkbox {
    display: none;
}



.lang-toggle-label {
    width: 65px;
    height: 32px;
    background-color: var(--brand-maroon, #5b1424);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}



/* تعديل وزنية الحروف داخل الزر */

.lang-text-ar {
    transform: translateY(-2px);
    display: inline-block;
    font-size: 15px;
    z-index: 1;
}



.lang-text-en {
    transform: translateY(-1px);
    display: inline-block;
    font-size: 14px;
    z-index: 1;
}



.lang-toggle-ball {
    width: 26px;
    height: 26px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 0;
}



.lang-toggle-checkbox:checked + .lang-toggle-label .lang-toggle-ball {
    transform: translateX(33px);
}



/* 🌟 إخفاء نافذة جوجل ترانسليت وأي عناصر دخيلة */

body > .skiptranslate {
    display: none !important;
}



.goog-te-banner-frame.skiptranslate,
.goog-te-menu-frame.skiptranslate,
#goog-gt-tt {
    display: none !important;
}



body {
    top: 0px !important;
    position: static !important;
}



.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}







/* =========================================

   تنسيقات الصفحة الرئيسية (الترحيب، المسارات، الكروت)

   ========================================= */



.welcome-section {
    margin-bottom: 35px;
    border-right: 4px solid var(--brand-maroon);
    padding-right: 15px;
    transition: border-color 0.4s ease;
}



.welcome-title {
    font-weight: 900;
    color: var(--brand-gray);
    margin: 0 0 8px 0;
    font-size: 26px;
    transition: color 0.4s ease;
}



.welcome-icon {
    color: var(--brand-maroon);
    margin-right: 8px;
    transition: color 0.4s ease;
}



.welcome-desc {
    color: #4a1c26; /* عنابي فاتح شوي عشان يفرق عن العنوان */

    font-size: 15px;
    margin: 0;
    font-weight: 700;
    transition: color 0.4s ease;
}



.section-divider {
    border: none;
    opacity: 0.3;
    border-top: 2px solid var(--brand-maroon);
    margin: 20px 0 40px 0;
    transition: border-color 0.4s ease;
}



.track-row {
    margin-bottom: 50px;
}



.track-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 5px;
}



.track-title-wrapper {
    flex: 1;
}



.track-main-title {
    color: var(--brand-maroon);
    font-weight: 900;
    font-size: 24px;
    margin: 0;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
    transition: color 0.4s ease;
}



    .track-main-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 4px;
        background-color: var(--brand-maroon);
        border-radius: 4px;
        transition: background-color 0.4s ease;
    }



.track-desc {
    color: #64748b;
    font-size: 14px;
    margin: 10px 0 0 0;
    transition: color 0.4s ease;
}



.track-progress-inline {
    width: 250px;
    margin-bottom: 5px;
}



.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}



.progress-label-text {
    font-size: 14px;
    font-weight: 800;
    color: var(--brand-gray);
    transition: color 0.4s ease;
}



.progress-value-text {
    font-size: 16px;
    font-weight: 900;
    color: var(--brand-maroon);
    transition: color 0.4s ease;
}



.inline-progress-track {
    height: 8px;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.4s ease;
}



.inline-progress-fill {
    height: 100%;
    background-color: var(--brand-maroon);
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease, background-color 0.4s ease;
}



.header-scroll-btn {
    width: 38px;
    height: 38px;
    background-color: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: var(--brand-maroon);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}



    .header-scroll-btn:hover {
        background-color: var(--brand-maroon);
        color: white;
        border-color: var(--brand-maroon);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(186, 29, 67, 0.15);
    }



.horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-top: 10px;
    padding-bottom: 25px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    width: 100%;
}



    .horizontal-scroll::-webkit-scrollbar {
        display: none;
    }



.snood-video-card {
    flex: 0 0 320px;
    background-color: var(--white);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}



    .snood-video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(186, 29, 67, 0.15);
    }



.thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
}



.thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}



.snood-video-card:hover .thumb-img {
    opacity: 0.9;
}



.completed-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--brand-maroon) 0%, #7a132c 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    z-index: 10;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}



.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}



.play-icon-center {
    color: white;
    font-size: 45px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}



.snood-video-card:hover .play-overlay {
    opacity: 1;
}



.snood-video-card:hover .play-icon-center {
    transform: scale(1);
}



.card-info {
    padding: 18px 20px 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}



.video-title {
    color: var(--brand-gray);
    font-weight: 800;
    font-size: 16px;
    margin: 0 0 12px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s ease;
}



.video-date {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    margin-top: auto;
    transition: color 0.4s ease;
}



.bottom-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: rgba(176, 164, 165, 0.65);
    z-index: 5;
    transition: height 0.3s ease, background-color 0.4s ease;
}



.snood-video-card:hover .bottom-progress-track {
    height: 22px;
}



.bottom-progress-fill {
    height: 100%;
    background-color: #d9385e;
    width: 0%;
    transition: width 0.3s ease, background-color 0.4s ease;
}



.bottom-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to left, #ffffff var(--prog, 0%), #4a1c26 var(--prog, 0%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}



.snood-video-card:hover .bottom-progress-text {
    opacity: 1;
}



.progress-wrapper {
    position: relative;
    height: 25px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}



.progress-bar-fill {
    height: 100%;
    background-color: var(--brand-maroon);
    transition: width 0.4s ease;
}



.progress-text-center {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    mix-blend-mode: difference;
    z-index: 2;
}



/* 🌟 إجبار الكرت على مقاس ثابت عشان ما ينعصر ويشغل السكرول */

.track-card {
    flex: 0 0 210px !important; /* العرض الثابت */

    height: 140px !important;
    border-radius: 16px !important;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}



/* 🌟 احتواء المحتوى ومنع خروج النص */

.track-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden; /* يمنع أي شيء يطلع برا */
}



    /* 🌟 السحر هنا للتعامل مع الأسماء الطويلة جداً */

    .track-card-content h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        width: 100%;
        text-align: center;
        /* الخصائص الثلاث هذي تقص النص الزايد وتحط بداله نقاط (...) */

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }



.snood-track-card {
    flex: 0 0 250px;
    height: 130px;
    background: linear-gradient(135deg, var(--brand-maroon) 0%, #7a132c 100%);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 20px rgba(186, 29, 67, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
}



    .snood-track-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(186, 29, 67, 0.4);
        color: white;
    }



.track-card-content i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.9;
}



.track-card-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
}



@keyframes gradientMove {

    0% {
        background-position: 0% 50%;
    }



    50% {
        background-position: 100% 50%;
    }



    100% {
        background-position: 0% 50%;
    }
}



/* الوضع الليلي للرئيسية */

[data-theme="dark"] .welcome-section {
    border-color: #facdcd;
}



[data-theme="dark"] .welcome-title {
    color: #facdcd;
}



[data-theme="dark"] .welcome-icon {
    color: #facdcd;
}



[data-theme="dark"] .welcome-desc {
    color: rgba(255, 255, 255, 0.7);
}



[data-theme="dark"] .section-divider {
    border-color: #4a1c26;
    opacity: 1.0;
}

[data-theme="dark"] .welcome-desc,
[data-theme="dark"] .snood-page-subtitle {
    color: #facdcd !important;
}

[data-theme="dark"] .track-main-title {
    color: #facdcd;
}



    [data-theme="dark"] .track-main-title::after {
        background-color: #facdcd;
    }



[data-theme="dark"] .track-desc {
    color: rgba(255, 255, 255, 0.7);
}



[data-theme="dark"] .progress-label-text {
    color: #facdcd;
}



[data-theme="dark"] .progress-value-text {
    color: #eab308;
}



[data-theme="dark"] .inline-progress-track {
    background-color: rgba(255, 255, 255, 0.25);
}



[data-theme="dark"] .header-scroll-btn {
    background-color: #320f16;
    border-color: #4a1c26;
    color: #facdcd;
}



    [data-theme="dark"] .header-scroll-btn:hover {
        background-color: #facdcd;
        color: #320f16;
        border-color: #facdcd;
    }



[data-theme="dark"] .snood-video-card {
    background-color: #2b0f15;
}



[data-theme="dark"] .video-title {
    color: #facdcd;
}



[data-theme="dark"] .video-date {
    color: rgba(250, 205, 205, 0.7);
}



[data-theme="dark"] .bottom-progress-track {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}



[data-theme="dark"] .bottom-progress-fill {
    background-color: #d9385e;
    box-shadow: 0 0 8px rgba(217, 56, 94, 0.4);
}



/* 🌟 ستايل البادج (الشارة) والتاريخ */

.meta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}



.track-badge {
    background-color: var(--brand-maroon);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(91, 20, 36, 0.2);
}



.video-date-new {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}



/* 🌟 رفع المحتوى عن شريط التقدم عشان ما يتغطى وقت الهوفر */

.card-info {
    padding-bottom: 32px !important;
}



/* للوضع الليلي */

[data-theme="dark"] .meta-footer {
    border-top-color: #4a1c26;
}



/* 🌟 تعديل لون نص التقدم في الوضع الليلي ليكون أبيض/وردي فاتح على الخلفية الغامقة */

[data-theme="dark"] .bottom-progress-text {
    background: linear-gradient(to left, #ffffff var(--prog, 0%), #facdcd var(--prog, 0%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}





/* 🌟 تصفية لون الفلتر في الوضع النهاري */

.snood-filter-box {
    background: var(--white);
    border: 1px solid #e2e8f0;
}



/* 🌟 الفلتر في الوضع الليلي */

[data-theme="dark"] .snood-filter-box {
    background-color: #320f16;
    border-color: #4a1c26;
}



[data-theme="dark"] .snood-select {
    background-color: #1a080c;
    border-color: #4a1c26;
    color: #facdcd;
}



    /* تلوين الخيارات داخل القائمة المنسدلة لليلي */

    [data-theme="dark"] .snood-select option {
        background-color: #320f16;
        color: #facdcd;
    }



/* تلوين أيقونة الفلتر والنص في الليلي */

[data-theme="dark"] .snood-filter-box .snood-form-label {
    color: #facdcd !important;
}







/* 📱 إعدادات التجاوب مع شاشات الجوال والأجهزة الذكية (أصغر من 768 بكسل) */

@media (max-width: 768px) {



    /* إعدادات الناف بار والرئيسية اللي سويناها قبل */

    .user-navbar {
        padding: 15px 20px;
    }



    .user-main-content {
        padding: 20px 15px;
    }



    .user-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 20px 15px;
    }



    .welcome-section {
        padding-right: 10px;
        margin-bottom: 25px;
    }



    .welcome-title {
        font-size: 20px;
    }



    .welcome-desc {
        font-size: 13px;
    }



    .track-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }



    .track-main-title {
        font-size: 20px;
    }



    .snood-video-card {
        flex: 0 0 260px;
    }



    .card-info {
        padding: 12px 15px 20px 15px;
    }



    .video-title {
        font-size: 14px;
    }



    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }



    /* 🌟🌟 الإصلاحات الجديدة لصفحة المشاهدة 🌟🌟 */



    /* 1. التخطيط العام لصفحة المشاهدة (يصير عمودي بدل أفقي) */

    .watch-layout {
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 8px 20px 8px !important; /* 🌟 التوسعة: 8 بكسل يمين ويسار بس عشان ياخذ راحته بالعرض */

        width: 100% !important;
        box-sizing: border-box !important;
    }



    /* 2. منطقة الفيديو (لازم تاخذ العرض كامل وتكون فوق) */

    .video-main {
        width: 100% !important;
        order: -1;
    }



    /* 3. حاوية الفيديو نفسه (تضبيط الطول والعرض) */

    .iframe-container {
        width: 100% !important;
        padding-top: 56.25% !important;
        height: 0 !important;
        border-radius: 10px !important;
    }



        .iframe-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }



    /* 4. السايدبار (قائمة الفيديوهات تنزل تحت الفيديو) */

    .playlist-sidebar {
        width: 100% !important;
        position: static !important;
        height: auto !important; /* 🌟 يكسر الطول الثابت */

        max-height: 1680px !important; /* 🌟 هنا الحل! رفعناه من 400 إلى 680 عشان يكفي 6 فيديوهات */

        overflow-y: auto !important; /* 🌟 سكرول داخلي لو زادت عن 6 فيديوهات */

        box-sizing: border-box !important;
    }



    /* 5. تضبيط نصوص تفاصيل الفيديو (عشان ما تنعصر زي الصورة) */

    .snood-card {
        padding: 20px !important; /* 🌟 رجعنا البادنج المريح */

        width: 100% !important;
        box-sizing: border-box !important;
    }



    .meta-divider {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }



        .meta-divider .main-title {
            font-size: 18px !important;
        }

    /* إخفاء الخط العمودي الفاصل بين القسم والتاريخ في الجوال */

    .vertical-divider {
        display: none !important;
    }



    /* إصلاح خروج الفلتر عن الشاشة في صفحة جميع المقاطع */

    select, .form-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
}



/* 📱 إعدادات للشاشات الصغيرة جداً (أصغر من 480 بكسل) */

@media (max-width: 480px) {

    .snood-video-card {
        flex: 0 0 220px;
    }
}



/* ستايلات زر قراءة المزيد */

.description-container {
    position: relative;
    overflow: hidden;
}



    .description-container.collapsed {
        max-height: 4.5em; /* يعادل تقريباً 3 أسطر */
    }

        /* التدرج اللوني اللي يعطي إيحاء بوجود نص مخفي */

        .description-container.collapsed::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 30px;
            background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        }



[data-theme="dark"] .description-container.collapsed::after {
    background: linear-gradient(to bottom, rgba(43,15,21,0), #2b0f15);
}
    
/* 🌟 اللمسة الختامية لصفحة المشاهدة في الجوال (مساحة واسعة + بدون سكرول داخلي) 🌟 */
@media (max-width: 768px) {
    /* 1. توسيع الشاشة لتأخذ راحتها بالعرض */
    .watch-page-body {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* 2. فك السايدبار بالكامل ليطول براحته مهما كان عدد الفيديوهات */
    .playlist-sidebar {
        height: auto !important;
        max-height: none !important; 
        overflow: visible !important;
    }
}