/* styles.css - base styles */
:root {
    --font-sans:
        "Poppins", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial;
    --main-color: #0088d1;
    --secondary-color: #00669d;
    --background-color: #0f1112;
    --sec-background-color: #080808;
    --card-color: #1e1e1e;
    --text-color: #ffffff;
    --text-secondary-color: #9c9c9c;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --ver-tag-color: rgba(255, 255, 255, 0.06);
    --noti-border-color: rgba(255, 255, 255, 0.1);
    --mobile-menu-bg: #0f1112dc;
    --spinner-color: #0f1720;
    --spinner-color-bg: #0f17204d;

    /* Input colors (defaults; overridden in light theme) */
    --input-bg: var(--sec-background-color);
    --input-border: rgba(255, 255, 255, 0.06);
    --input-text: var(--text-color);
    --input-placeholder-color: rgba(255, 255, 255, 0.35);
    --input-focus-ring: rgba(0, 136, 209, 0.12);

    /* Google button colors */
    --google-btn-bg: #ffffff;
    --google-btn-color: var(--sec-background-color);
    --google-btn-border: none;
    --google-btn-hover-bg: #eaeaea;
    --google-btn-boxshadow: 0 1px 0 rgba(0, 0, 0, 0.04);

    /* Reset button colors */
    --reset-btn-bg: var(--sec-background-color);
    --reset-btn-border: 1px solid var(--card-color);
    --reset-btn-hover-bg: rgba(255, 255, 255, 0.03);
    --reset-btn-color: var(--text-color);

    --green-color: rgba(51, 217, 178);
    --red-color: #ff5252;
}

/* Light theme: make select arrow darker for contrast */
html[data-theme="light"] .filters select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280' opacity='0.9'><path d='M5.23 7.21a.75.75 0 011.06-.02L10 10.67l3.71-3.48a.75.75 0 111.04 1.08l-4.25 4a.75.75 0 01-1.06 0l-4.25-4a.75.75 0 01-.02-1.06z'/></svg>");
}

/* Light theme overrides (applied when html[data-theme="light"]) */
html[data-theme="light"] {
    --background-color: #f2f3fc;
    --sec-background-color: #ffffff;
    --card-color: #ffffff;
    --text-color: #0f1720;
    --text-secondary-color: #6b7280;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --ver-tag-color: rgba(0, 0, 0, 0.06);
    --noti-border-color: rgba(0, 0, 0, 0.1);
    --mobile-menu-bg: #dedededd;
    --spinner-color: #fff;
    --spinner-color-bg: rgba(255, 255, 255, 0.3)
        /* Light theme input overrides */ --input-bg: #ffffff;
    --input-border: #e6edf3;
    --input-text: var(--text-color);
    --input-placeholder-color: #9ca3af;
    --input-focus-ring: rgba(0, 102, 204, 0.12);

    /* Google button overrides (light theme) */
    --google-btn-bg: var(--text-color);
    --google-btn-color: #ffffff;
    --google-btn-border: 1px solid #e6edf3;
    --google-btn-hover-bg: #0f1821dc;
    --google-btn-boxshadow: 0 1px 0 rgba(16, 24, 40, 0.03);

    /* Reset button overrides (light theme) */
    --reset-btn-bg: var(--input-bg);
    --reset-btn-border: 1px solid #e6edf3;
    --reset-btn-hover-bg: rgba(119, 119, 119, 0.06);
    --reset-btn-color: var(--text-color);

    --green-color: #218c74;
    --red-color: #b33939;
}

/* Smooth color transitions */
* {
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

/* Slightly different page background for light theme */
html[data-theme="light"] body {
    background-image: radial-gradient(#dcdcdcba 1.75px, transparent 1.75px);
}

/* Use border-box globally so widths include padding/border and don't overflow */
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100% Viewport Height */
    margin: 0; /* لضمان عدم وجود هوامش بيضاء */
}

/* 2. نجعل المحتوى الرئيسي يتمدد ليملأ الفراغ */
main {
    flex: 1;
}
html,
body {
    height: 100%;
    color: var(--text-color);
    font-family: var(--font-sans);
}

b {
    font-weight: 500;
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
    color: var(--text-color);
}

body {
    background-color: var(--background-color);
    background-image: radial-gradient(#080808dd 1.75px, transparent 1.75px);
    background-size: 28px 28px;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--main-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 1200px) {
    .container {
        max-width: 90%;
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 95%;
        padding: 0 1rem;
    }
}

/* ==========================================
   🚀 Global Preloader Styles
   ========================================== */
#global-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--background-color); /* استخدام متغيراتك لو موجودة */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

#global-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.preloader-content h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--text-color, #333);
}

#loader-text {
    font-size: 0.9rem;
    color: var(--text-muted, #777);
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

#loader-progress {
    height: 100%;
    width: 0%; /* سيبدأ من 0 */
    background: var(--main-color, #3498db);
    border-radius: 10px;
    transition: width 0.4s ease-out; /* حركة ناعمة جداً */
}

/* Framework styles */

.main-btn {
    background-color: var(--main-color);
    color: #ffffff;
    border: none;
    padding: 6px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -ms-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    align-items: center;
}

.main-btn:hover {
    background-color: var(--secondary-color);
}

.main-btn i {
    margin-left: 5px;
}

.text-center {
    text-align: center;
}

/* ألوان الحالات */

.badge-download,
.st-open {
    background: rgba(0, 136, 209, 0.1) !important;
    color: var(--main-color) !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}
.modal-icon.info {
    background: rgba(0, 136, 209, 0.1) !important;
    color: var(--main-color) !important;
}

.badge-red,
.role-admin,
.modal-box.error .modal-icon,
.modal-icon.danger {
    background: rgba(255, 82, 82, 0.2) !important;
    color: #ff5252 !important;
}

.badge-green,
.st-approved,
.modal-box.success .modal-icon,
.modal-icon.success {
    background: rgba(51, 217, 178, 0.2) !important;
    color: #33d9b2 !important;
}

.st-review {
    background: rgba(112, 111, 211, 0.2) !important;
    color: rgba(112, 111, 211, 1) !important;
}

.badge-orange,
.role-maker,
.modal-icon.warning {
    background: rgba(255, 121, 63, 0.2) !important;
    color: #ff793f !important;
}

.badge-yellow,
.st-assigned {
    background: rgba(255, 177, 66, 0.2) !important;
    color: #ffb142 !important;
}

.badge-gray,
.role-student {
    background: #ffffff11 !important;
    color: #888 !important;
}

/* Base styles for navigation */
nav {
    background-color: var(--sec-background-color);
    padding: 1rem;
    box-shadow: var(--shadow-color) 0px -5px 20px 2px;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .left-component {
    display: flex;
    gap: 60px;
    align-items: center;
}

nav img {
    height: 40px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 3.5rem;
    justify-content: center;
    align-items: center;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
}

nav ul li a.active::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    margin-top: 5px;
    transform: scaleX(1);
    -webkit-transform: scaleX(1);
    -moz-transform: scaleX(1);
    -ms-transform: scaleX(1);
    -o-transform: scaleX(1);
}

nav ul li a::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    margin-top: 5px;
    transform: scaleX(0);
    -webkit-transform: scaleX(0);
    -moz-transform: scaleX(0);
    -ms-transform: scaleX(0);
    -o-transform: scaleX(0);
    transition: transform 0.2s linear;
    -webkit-transition: transform 0.2s linear;
    -moz-transition: transform 0.2s linear;
    -ms-transition: transform 0.2s linear;
    -o-transition: transform 0.2s linear;
}

nav ul li a:hover::after {
    transform: scaleX(1);
    -webkit-transform: scaleX(1);
    -moz-transform: scaleX(1);
    -ms-transform: scaleX(1);
    -o-transform: scaleX(1);
}

.ver-devider {
    width: 1px;
    height: 24px;
    background-color: var(--text-color);
    opacity: 0.4;
    margin: 0 6px;
    border-radius: 1px;
    -webkit-border-radius: 1px;
    -moz-border-radius: 1px;
    -ms-border-radius: 1px;
    -o-border-radius: 1px;
}

/* Mobile menu styles */

.mobile-menu-box {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: row-reverse;
    gap: 15px;
}

.mobile-menu-box .notif-dropdown {
    width: 280px;
}

.mobile-menu-open,
.mobile-menu-close {
    display: none;
    font-size: 22px;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 50px;
}
.mobile-menu {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    right: 0;
    height: 100% !important;
    background-color: var(--mobile-menu-bg);
    backdrop-filter: blur(5px);
    justify-content: center;
    width: 280px;
    /* start off-screen and slide in from right */
    transform: translateX(100%);
    transition:
        transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1),
        opacity 220ms ease;
    opacity: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu.show {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu .mobile-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
    width: 100%;
}

.mobile-menu .mobile-links .logo img {
    height: 60px;
    margin-bottom: 0;
    margin-top: 30px;
}

.mobile-menu .mobile-links ul {
    width: 100%;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
    margin: 0;
}

.mobile-menu .mobile-links ul li {
    width: 100%;
    text-align: right;
}

.mobile-menu .mobile-links ul li a {
    font-size: 15px;
    width: 100%;
    display: block;
    padding: 15px 25px;
}

.mobile-menu ul li a:hover {
    background-color: var(--ver-tag-color);
}

.mobile-menu ul li.active {
    background-color: var(--ver-tag-color);
}

.mobile-menu ul li a::after {
    display: none !important;
}

.userProfile-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-direction: row-reverse;
    padding: 0 20px;
}

.mobile-menu .userProfile {
    flex-direction: column;
    margin-top: auto;
    width: 100%;
}

.mobile-menu #mobileUserName {
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}

.mobile-menu #mobileUserName:hover {
    opacity: 0.6;
}

#mobileUserName {
    font-size: 15px;
}

.mobile-dropdown-menu {
    width: 100%;
    padding: 20px;
    display: none;
    justify-content: center;
    background-color: var(--ver-tag-color);
    margin-bottom: 10px;
}

.mobile-dropdown-menu.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
    -webkit-animation: fadeIn 0.2s ease-out;
    flex-direction: column;
    gap: 10px;
}

@media screen and (max-width: 992px) {
    .mobile-menu {
        display: flex;
    }
    .links {
        display: none;
    }
    .nav-actions {
        display: none !important;
    }
    .mobile-menu-open,
    .mobile-menu-close {
        display: block;
    }
    .mobile-menu-box {
        display: flex;
    }
}

/* Theme toggle button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--card-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 0px;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        border-color 0.18s ease;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}
.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 136, 209, 0.08);
}
.theme-toggle .fa-sun {
    color: #fbc02d;
}
.theme-toggle .fa-moon {
    color: var(--main-color);
}
.theme-toggle[aria-pressed="true"] {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* responsive */

.mobile-menu .theme-toggle {
    position: absolute;
    top: 17px;
    right: 200px;
    border-color: var(--main-color);
}

.mobile-menu .theme-toggle i {
    color: var(--main-color) !important;
}

/* Profile Section styles */

.userProfile {
    justify-content: center;
    flex-direction: row;
}

.userimg {
    display: flex;
    align-items: center;
}

.userProfile img {
    height: 40px;
    width: 40px;

    object-fit: cover;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    border: 2px solid var(--main-color);
}

.userProfile img:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}
#userName {
    font-family: var(--font-sans);
    cursor: pointer;
    font-size: 15px;
    margin-left: 10px;
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}

#userName:hover {
    opacity: 0.6;
}

.dropdown-arrow {
    display: flex;
    align-items: center;
}

.dropdown-arrow i {
    font-size: 15px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

/* Dropdown menu styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background-color: var(--card-color);
    border-radius: 10px;
    width: 200px;
    box-shadow: 0 0 10px -1px var(--shadow-color);
    z-index: 1000;
    overflow: hidden;
    padding: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    flex-direction: column;
    gap: 5px;
}

/* إظهار القائمة عند إضافة كلاس 'active' بالجافاسكريبت */
.dropdown-menu.active {
    display: flex;
}
/* --- Notification System Styles --- */

/* زر الجرس */
/* أزرار الإشعارات */
.notif-action-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.2s;
}

/* زر التحميل الأخضر */
.notif-action-btn.download {
    background-color: var(--main-color);
    color: white;
    border: none;
}
.notif-action-btn.download:hover {
    background-color: var(--secondary-color);
}

/* زر التجاهل الشفاف */
.notif-action-btn.ignore {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}
.notif-action-btn.ignore:hover {
    border-color: var(--text-secondary-color);
    color: var(--text-secondary-color);
}
.notif-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 5px;
    transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    -moz-transition: all 0.2s ease-in-out;
    -ms-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
}

.notif-btn:hover {
    color: var(--text-secondary-color);
}

/* النقطة الحمراء */
.notif-badge {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f44336;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--sec-background-color); /* لعمل فاصل صغير */
}

/* القائمة المنسدلة */
.notif-dropdown {
    display: none;
    /*مخفيافتراضياً*/
    position: absolute;
    top: 50px;
    right: -5px;
    /*إزاحةلضبطالمكان*/
    width: 320px;
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: 0 0 10px -1px var(--shadow-color);
    z-index: 1001;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    -webkit-animation: fadeIn 0.2s ease-out;
}

.notif-dropdown.active {
    display: block;
}

/* رأس القائمة */
.notif-header {
    padding: 15px;
    border-bottom: 1px solid var(--noti-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    margin: 0;
    font-weight: 500;
    font-size: 1rem;
}

.mark-read {
    font-size: 0.75rem;
    color: var(--main-color);
    cursor: pointer;
}
.mark-read:hover {
    text-decoration: underline;
}

/* قائمة العناصر */
.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

/* العنصر الواحد */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 15px 15px;
    transition: background 0.2s;
    cursor: pointer;
}
.notif-item:not(:last-child) {
    border-bottom: 1px solid var(--noti-border-color);
}

.notif-item:hover {
    background-color: var(--reset-btn-hover-bg);
}

/* ألوان الأيقونات */
.bg-green {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}
.bg-blue {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}
.bg-red {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* حاوية الأزرار */
.notif-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* زر الرابط */
.notif-action-btn.link-btn {
    background-color: #3498db; /* لون أزرق */
    color: white;
    border: none;
}
.notif-action-btn.link-btn:hover {
    background-color: #2980b9;
}

/* تمييز غير المقروء */

/* الأيقونة الملونة */
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
    background-color: var(--main-color);
}
.bg-blue {
    background: linear-gradient(
        135deg,
        var(--main-color),
        var(--secondary-color)
    );
}
.bg-green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.bg-red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* النصوص */
.notif-content {
    flex: 1;
}
.notif-text {
    font-size: 0.85rem;
    color: var(--text-secondary-color);
    margin: 0;
    line-height: 1.4;
}
.notif-text b {
    color: var(--text-color);
}

/* Main content styles */
main {
    padding: 1rem 0;
}

main h1 {
    font-size: 30px;
    font-weight: 500;
    /* margin-bottom: 1rem; */
}

main h1 span {
    color: var(--main-color);
}

/* Search input styling */
.search {
    position: relative;
    width: 100%;
    max-width: none;
    margin-top: 1rem;
}

.search input {
    width: 100%;
    box-sizing: border-box;
    display: block;
    padding: 12px 16px 12px 44px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--input-text);
    font-size: 15px;
    transition:
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.search input::placeholder {
    color: var(--input-placeholder-color);
    font-weight: 200;
}

.search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--input-placeholder-color);
    font-size: 16px;
    pointer-events: none;
}

.search input:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}

/* Filters styles */
.filters {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.filters label {
    font-size: 15px;
    margin-right: 5px;
}

.filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    padding: 8px 36px 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    /* Dark theme: white arrow for contrast */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff' opacity='0.9'><path d='M5.23 7.21a.75.75 0 011.06-.02L10 10.67l3.71-3.48a.75.75 0 111.04 1.08l-4.25 4a.75.75 0 01-1.06 0l-4.25-4a.75.75 0 01-.02-1.06z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    cursor: pointer;
}

.reset-btn {
    background: var(--reset-btn-bg);
    color: var(--reset-btn-color);
    border: var(--reset-btn-border);
    transition:
        all 0.3s ease,
        color 0.18s ease-in-out;
    -webkit-transition:
        all 0.3s ease,
        color 0.18s ease-in-out;
    -moz-transition:
        all 0.3s ease,
        color 0.18s ease-in-out;
    -ms-transition:
        all 0.3s ease,
        color 0.18s ease-in-out;
    -o-transition:
        all 0.3s ease,
        color 0.18s ease-in-out;
}

.reset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}

.reset-btn:hover {
    background-color: var(--reset-btn-hover-bg);
}

/* Hide default dropdown arrow in IE/Edge */
.filters select::-ms-expand {
    display: none;
}

.filters select:focus,
.reset-btn:focus,
.input-wrap input:focus,
.filters select:focus,
textarea:focus {
    outline: none;
    border-color: var(--main-color) !important;
    box-shadow: 0 0 0 4px var(--input-focus-ring) !important;
}

.filters button.main-btn {
    padding: 8px 14px;
    font-size: 14px;
}

/* Flashcards grid */

.flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-color) 0px 4px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease-in-out;
    -webkit-transition: all 0.25s ease-in-out;
    -moz-transition: all 0.25s ease-in-out;
    -ms-transition: all 0.25s ease-in-out;
    -o-transition: all 0.25s ease-in-out;
}

.card:hover {
    transform: scale(1.02) translateY(-8px);
    -webkit-transform: scale(1.02) translateY(-8px);
    -moz-transform: scale(1.02) translateY(-8px);
    -ms-transform: scale(1.02) translateY(-8px);
    -o-transform: scale(1.02) translateY(-8px);
}

.card .thumbnail {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-color) 0px 2px 10px;
}
.card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
    -webkit-transition: transform 0.3s ease-in-out;
    -moz-transition: transform 0.3s ease-in-out;
    -ms-transition: transform 0.3s ease-in-out;
    -o-transition: transform 0.3s ease-in-out;
}
.card:hover .thumbnail img {
    transform: scale(1.08) rotate(2.5deg);
    -webkit-transform: scale(1.08) rotate(2.5deg);
    -moz-transform: scale(1.08) rotate(2.5deg);
    -ms-transform: scale(1.08) rotate(2.5deg);
    -o-transform: scale(1.08) rotate(2.5deg);
}

.card h3 {
    margin-top: 10px;
    margin-bottom: 0px;
    font-size: 20px;
    font-weight: 500;
}
.card .meta {
    display: flex;
    background: var(--ver-tag-color);
    color: var(--text-secondary-color);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    margin: 10px 0 10px 0;
    font-weight: 600;
    letter-spacing: 0.2px;
    justify-content: space-between;
}
.card .description {
    font-size: 14px;
    color: var(--text-color);
    flex-grow: 1;
    margin: 0 0 10px 0;
    /* 🔥 الكود الجديد لقص النص الطويل */
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3; /* عدد الأسطر المسموح به */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.card ul li {
    font-size: 13px;
    color: var(--text-secondary-color);
    margin-bottom: 5px;
}

.card .main-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Footer styles */
footer {
    background-color: var(--sec-background-color);
    padding: 1rem 0;
    margin-top: 15px;
    box-shadow: var(--shadow-color) 0px 5px 20px 2px;
}
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
footer p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
}

footer p img {
    height: 13px;

    margin-left: 5px;
}
footer p a {
    vertical-align: middle;
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    footer .container {
        flex-direction: column;
        text-align: center;
    }
}

/* Signin page styles */
.signin-page {
    /* min-height: 100vh; */
    display: flex;
    align-items: space-between;
    justify-content: center;
    padding: 40px 20px 0;
}

.signin-card {
    width: 420px;
    background: var(--sec-background-color);
    border-radius: 18px;
    padding: 36px 36px 20px 36px;
    box-shadow: 0 0 30px -10px var(--shadow-color);
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
}

.logo {
    font-weight: 800;
    font-size: 48px;
    letter-spacing: -2px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-content: center;
}

.logo img {
    height: 64px;
    width: auto;
}

.title {
    margin: 6px 0 6px 0;
    font-size: 28px;
    font-weight: 600;
}
.subtitle {
    margin: 0 0 15px 0;
    color: var(--text-secondary-color);
    font-size: 12px;
}

.signin-form {
    text-align: left;
}
.field {
    display: block;
    margin-bottom: 12px;
}
.field-label {
    font-size: 12px;
    color: var(--text-secondary-color);
    display: block;
    margin-bottom: 6px;
}
.input-wrap {
    position: relative;
}
.input-wrap input,
.input-wrap textarea {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 14px;
}
.input-wrap textarea {
    resize: none;
}

.input-wrap input::placeholder {
    color: var(--input-placeholder-color);
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px rgba(0, 136, 209, 0.12);
}
.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--input-placeholder-color);
    font-size: 14px;
}
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--input-placeholder-color);
    border-radius: 6px;
}
.toggle-password:focus {
    outline: none;
    /* box-shadow: 0 0 0 4px rgba(0, 136, 209, 0.12); */
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 16px 0;
}
.remember {
    color: var(--text-secondary-color);
    font-size: 13px;
}
.forgot {
    color: var(--main-color);
    text-decoration: none;
    font-size: 13px;
}

.login {
    width: 100%;
    padding: 10px 18px;
    font-size: 15px;
}
.login i {
    margin-left: 8px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}
.divider::before,
.divider::after {
    content: "";
    height: 1px;
    background: var(--text-secondary-color);
    flex: 1;
    border-radius: 2px;
}
.divider span {
    padding: 6px 10px;
    font-size: 14px;
    color: var(--text-secondary-color);
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--google-btn-bg);
    color: var(--google-btn-color);
    border: var(--google-btn-border);
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow: var(--google-btn-boxshadow);
}

.google-btn:hover {
    background: var(--google-btn-hover-bg);
}

.google-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

.signup {
    text-align: center;
    margin-top: 18px;
    margin-bottom: 0;
    color: var(--text-secondary-color);
    font-size: 13px;
}
.signup a {
    color: var(--main-color);
    text-decoration: none;
}

.signin-footer {
    font-size: 12px;
    color: var(--text-secondary-color);
    text-align: center;
    padding: 40px 10px 20px;
}

/* Error Message Styles */
.error-message {
    /* تنسيق صندوق الخطأ */
    display: none; /* مخفي في البداية */
    background-color: rgba(220, 53, 69, 0.1); /* خلفية حمراء شفافة */
    color: #ff6b6b; /* نص أحمر فاتح */
    border: 1px solid #ff6b6b;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px; /* مسافة بينه وبين الزر */
    font-size: 0.9rem;
    text-align: center;
    width: 100%;

    /* أنيميشن بسيط للظهور */
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* --- Loading Spinner Styles --- */

/* شكل الدائرة الدوارة */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* حركة الدوران */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* تنسيق الزر أثناء التحميل (يمنع الضغط عليه) */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed !important;
    pointer-events: none; /* يمنع الضغط المتكرر */
}

/* Terms & Conditions Styles */
.terms-content-page {
    min-height: 100vh;
    padding: 40px 20px;
}
.terms-content-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--sec-background-color);
    box-shadow: 0 0 30px -10px var(--shadow-color);
    border-radius: 16px;
    padding: 32px;
}
.terms-card-header {
    text-align: center;
    margin-bottom: 16px;
}
.terms-card-header .logo img {
    height: 64px;
    width: auto;
    margin-bottom: 8px;
}
.meta {
    color: var(--text-secondary-color);
    font-size: 13px;
    margin-bottom: 12px;
}
.terms-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.toc {
    background: var(--ver-tag-color);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.toc strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary-color);
}
.toc ol {
    margin: 0;
    padding-left: 20px;
}
.toc a {
    color: var(--main-color);
    text-decoration: none;
}
.toc a:hover,
.toc a:focus {
    text-decoration: underline;
}

/* Content */
.terms-content h2 {
    margin-top: 18px;
    font-weight: 600;
}
.terms-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 12px 0;
}
.terms-content ul,
.terms-content ol {
    margin-left: 24px;
}
.terms-content ul li,
.terms-content ol li {
    margin-bottom: 8px;
    color: var(--text-secondary-color);
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: var(--main-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 1000;
    text-decoration: none;
}

/* Agree button */
.agree-btn {
    background: transparent;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}
.agree-btn.agreed {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* Print styles */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    header,
    nav,
    .terms-actions,
    footer,
    .skip-link,
    .toc {
        display: none !important;
    }
    .terms-content-card {
        box-shadow: none;
        background: transparent;
        border-radius: 0;
        padding: 0;
        max-width: 100%;
    }
    .terms-content h2 {
        page-break-after: avoid;
    }
}

/* Responsive tweaks */
@media (max-width: 680px) {
    .terms-content-card {
        padding: 20px;
    }
    .toc {
        font-size: 13px;
        padding: 10px;
    }
    .terms-actions {
        flex-direction: column;
        gap: 8px;
    }
    .terms-card-header .logo img {
        height: 48px;
    }
}

/* --- Modal Styles --- */
.modal {
    display: none; /* مخفي افتراضياً */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* خلفية سوداء شفافة */
    backdrop-filter: blur(5px); /* تأثير ضبابي جميل */
}

.modal-content {
    background-color: var(--sec-background-color);
    margin: 15% auto; /* توسيط عمودي وأفقي */
    padding: 30px;
    border: 1px solid var(--noti-border-color);
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
}

#resetForm button {
    margin-top: 10px;
    width: 100%;
    padding: 10px 0;
    font-size: 15px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 400;
}

.modal p {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.close-modal {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}

.close-modal:hover {
    color: var(--text-secondary-color);
}

.reset-message {
    margin: 10px 0;
    font-size: 0.9rem;
    display: none;
}
.reset-success {
    color: #4cd137;
}
.reset-error {
    color: #ff6b6b;
}

/* Dashboard Styles */

.dashboard-container {
    display: flex;
    padding: 0;
}

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-container aside {
    width: 250px;
    background-color: var(--sec-background-color);
    box-shadow: var(--shadow-color) 0px 4px 12px;
    padding: 20px 0 20px 0;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.dashboard-container aside img {
    height: 50px;
    margin: 15px;
    text-align: center;
}

.dashboard-container aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
}

.dashboard-container aside ul li {
    font-size: 16px;
    margin-bottom: 10px;
}

.dashboard-container aside ul li a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 12px;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
    -webkit-transition:
        background-color 0.18s ease,
        color 0.18s ease;
    -moz-transition:
        background-color 0.18s ease,
        color 0.18s ease;
    -ms-transition:
        background-color 0.18s ease,
        color 0.18s ease;
    -o-transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.dashboard-container aside ul li a.active,
.dashboard-container aside ul li a:hover {
    background-color: var(--ver-tag-color);
}

.dashboard-container aside ul li a i {
    color: var(--main-color);
}

.dashboard-content {
    flex: 1;
}

.dashboard-container footer {
    margin-top: auto;
}

.dashboard-container nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.dashboard-container .userProfile-header {
    margin: 0;
}

.dashboard-container .search {
    max-width: 350px;
    margin: 0;
    /* margin-bottom: 20px; */
}
.dashboard-container #mobileUserAvatar {
    border: 2px solid var(--main-color);
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

.dashboard-container .container {
    padding: 0 30px;
}

/* Dashboard Form */

.decks-form {
    margin-bottom: 10px;
    display: flex;
    width: 100%;
    justify-content: start;
    flex-direction: row;
    gap: 20px;
}

.decks-form-edit {
    display: flex;
    width: 100%;
    justify-content: start;
    flex-direction: column;
}

.decks-form .col {
    width: 50%;
}

.decks-form .not-col {
    width: 100%;
}

.decks-form .field-label {
    font-size: 15px;
}

.decks-form .filters {
    margin: 0;
}

.decks-form .filters select {
    width: 100%;
    padding: 12px 44px 12px 14px;
}

/* ===========================
   Custom Modal Styles
   =========================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* خلفية معتمة */
    z-index: 20000 !important;
    display: none; /* مخفي افتراضياً */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--card-color); /* لون خلفية المودل */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* border: 1px solid var(--ver-tag-color); */
}
.modal-box.error,
#customModal {
    z-index: 20001 !important;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.modal-box h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
}
.modal-box p {
    margin-bottom: 25px;
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

#modalOkBtn {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    width: 100px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    transition: 0.3s;
    -webkit-transition: 0.3s;
    -moz-transition: 0.3s;
    -ms-transition: 0.3s;
    -o-transition: 0.3s;
}

.btn-info {
    background: var(--main-color) !important;
    color: white;
}
.btn-info:hover {
    background: var(--secondary-color) !important;
    color: white;
}

.btn-error {
    background-color: #ff5252 !important;
    color: white;
}
.btn-error:hover {
    background-color: #b33939 !important;
}

.btn-success {
    background-color: #33d9b2 !important;
    color: white;
}
.btn-success:hover {
    background-color: #218c74 !important;
}

.btn-warning {
    background-color: #ff793f !important;
    color: white;
}
.btn-warning:hover {
    background-color: #cd6133 !important;
}

.modal-box.error #modalOkBtn {
    background: #ff5252;
}
.modal-box.error #modalOkBtn:hover {
    background: #b33939;
}

/* ===========================
   Table Styles (Management)
   =========================== */
.table-container {
    margin-top: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    background: var(--sec-background-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--ver-tag-color);
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: #eee;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
}
.data-table td:last-child {
    text-align: center;
}

.data-table td:not(:last-child) {
    border-right: 1px solid var(--ver-tag-color);
}

.data-table th {
    background-color: var(--card-color);
    color: var(--text-color);
    font-weight: 400;
}

.data-table th:not(:last-child) {
    border-right: 1px solid var(--ver-tag-color);
}

.data-table tr {
    background-color: var(--sec-background-color);
}
.data-table tr:not(:last-child) {
    border-bottom: 1px solid var(--ver-tag-color);
}

.data-table tr:hover {
    background-color: #0f0f0f;
}

.action-btn {
    border: none;
    padding: 5px 15px;
    font-size: 15px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 0.9rem;
    transition: 0.2s;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    text-decoration: none;
}

.action-btn.edit {
    background-color: #ffb142;
    color: var(--sec-background-color);
}
.action-btn.edit:hover {
    background-color: #cc8e35;
}

.action-btn.delete {
    background-color: #ff5252;
    color: white;
}
.action-btn.delete:hover {
    background-color: #b33939;
}

/* ===========================
    Edit Modal (Form inside Modal)
   =========================== */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}
.edit-modal-overlay.active {
    display: flex;
}

.edit-modal-box {
    position: relative;
    background: var(--card-color);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 20px var(--shadow-color);
    border: 1px solid var(--ver-tag-color);
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}
.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ver-tag-color);
}
.close-modal {
    background: transparent;
    color: var(--text-color);
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
}

.close-modal i {
    font-size: 30px;
    color: #b5b5b5;
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}
.close-modal i:hover {
    opacity: 0.5;
}

.edit-modal-box h3 {
    font-weight: 500;
    margin: 0 0 10px;
    font-size: 24px;
}

.decksDrop {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.decksDrop a {
    text-decoration: none;
    padding: 15px 12px 15px 30px;
    color: var(--text-color);
    display: flex;
    gap: 12px;
    align-items: center;
    transition: 0.3s ease-in-out;
    -webkit-transition: 0.3s ease-in-out;
    -moz-transition: 0.3s ease-in-out;
    -ms-transition: 0.3s ease-in-out;
    -o-transition: 0.3s ease-in-out;
}

.decksDrop a.active,
.decksDrop a:hover {
    background-color: var(--ver-tag-color);
}

.decksDrop a i {
    color: var(--main-color);
}

.decksDrop.active {
    display: flex !important;
    animation: fadeIn 0.3s;
    -webkit-animation: fadeIn 0.3s;
}

.join-footer {
    margin: 0;
}

/* في ملف css/styles.css */

.action-btn.hide-btn {
    background-color: #ff793f; /* برتقالي للإخفاء */
    color: white;
}
.action-btn.hide-btn:hover {
    background-color: #cd6133;
}

.action-btn.unhide-btn {
    background-color: #33d9b2; /* أخضر للإظهار */
    color: white;
}
.action-btn.unhide-btn:hover {
    background-color: #218c74;
}

/* في ملف css/styles.css (استبدل كود النجوم في النهاية بهذا) */

/* 1. تنسيق النجوم في الكارت (للعرض فقط - ثابتة) */
.card .rating-display {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary-color);
}
.card .rating-display i {
    color: #ffb142; /* لون ذهبي */
    font-size: 13px;
}

/* 2. تنسيق النجوم داخل المودل (للتفاعل) */
.star-rating-input {
    display: flex;
    justify-content: center;
    flex-direction: row; /* ✅ اتجاه طبيعي من اليسار لليمين */
    gap: 10px;
}

.star-rating-input i {
    color: #ddd;
    cursor: pointer;
    font-size: 2rem;
    transition: 0.3s ease;
    -webkit-transition: 0.3s ease;
    -moz-transition: 0.3s ease;
    -ms-transition: 0.3s ease;
    -o-transition: 0.3s ease;
}

/* هذا الكلاس يضيفه الجافاسكريبت للنجمة المختارة وما قبلها */
.star-rating-input i.active {
    color: #ffb142;
    transform: scale(1.075);
    -webkit-transform: scale(1.075);
    -moz-transform: scale(1.075);
    -ms-transform: scale(1.075);
    -o-transform: scale(1.075);
}

/* ❌ تنبيه هام: تأكد أنك حذفت الكود القديم الذي يحتوي على:
   .star-rating-input i:hover ~ i 
   لأنه هو سبب المشكلة! 
*/

/* تنسيق أزرار المودل */
.modal-actions button {
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

#modalCancelBtn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--text-secondary-color) !important;
}

/* تعديل عرض الصندوق ليناسب الزرين */
.modal-box {
    padding-bottom: 25px; /* زيادة المساحة في الأسفل */
}

.load-btn {
    display: flex;
    justify-content: center;
}

.load-btn button {
    padding: 6px 30px;
    background-color: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    font-size: 14px;
    transition: 0.3s ease;
    -webkit-transition: 0.3s ease;
    -moz-transition: 0.3s ease;
    -ms-transition: 0.3s ease;
    -o-transition: 0.3s ease;
    font-weight: 400;
}

.load-btn button:hover {
    background-color: var(--text-color);
    color: var(--sec-background-color);
}

.report-btn {
    color: #b33939;
    transition: 0.3s ease;
    -webkit-transition: 0.3s ease;
    -moz-transition: 0.3s ease;
    -ms-transition: 0.3s ease;
    -o-transition: 0.3s ease;
}

.report-btn:hover {
    color: #ff5252;
}

html[data-theme="light"] .report-btn {
    color: #ff5252 !important;
}
html[data-theme="light"] .report-btn:hover {
    color: #b33939 !important;
}

.fa-spin {
    animation: spinner 1.25s infinite;
    -webkit-animation: spinner 1.25s infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
    }
}

.dashboard-title {
    margin-bottom: 10px;
}

.controls-wrapper {
    background: var(--sec-background-color);
    padding: 20px;
    /* border-radius: 12px 0 0 12px; */
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.adding-form {
    padding: 20px;
    background-color: var(--sec-background-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--ver-tag-color);
    margin-bottom: 20px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

/* =========================================
   🔥 تحديثات Creators & Admin UX 🔥
   ========================================= */

/* 1. Drag & Drop Upload */
.upload-area {
    border: 2px dashed var(--ver-tag-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: var(--card-color);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.upload-area.active {
    border-color: var(--main-color);
    background-color: rgba(0, 136, 209, 0.1); /* لون أزرق خفيف عند السحب */
    transform: scale(1.02);
}
.upload-area i {
    font-size: 3rem;
    color: var(--text-secondary-color);
    transition: color 0.3s;
}
.upload-area.active i {
    color: var(--main-color);
}

/* 2. أزرار الجدول (أيقونة + نص قصير) */
.btn-action-labeled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: 0.2s;
    margin-right: 5px;
}
.btn-action-labeled:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.btn-dl {
    background-color: var(--main-color);
}
.btn-ok {
    background-color: #2ecc71;
}
.btn-no {
    background-color: #e74c3c;
}

/* 3. نافذة الرفض (Rejection Modal) */
/* =========================================
   🔥 تحسينات المودال (Pro Modal Styling) 🔥
   ========================================= */

/* تحسين شكل الـ Textarea داخل المودال */

/* زر الإلغاء (Secondary Button) */
.modal-cancel-btn {
    background-color: transparent !important;
    border: 1px solid #ccc !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
    font-weight: 400;
}
.modal-cancel-btn:hover {
    background-color: #f0f0f0 !important;
    color: #fff !important;
    border-color: #bbb !important;
}

/* زر التأكيد الخطر (Danger) */
.main-btn.danger-mode {
    background-color: #e74c3c !important; /* أحمر للحذف */
    border-color: #e74c3c !important;
}
.main-btn.danger-mode:hover {
    background-color: #c0392b !important;
}

.last-link {
    margin-top: auto;
}

/* Buttons */
.drop-btn {
    padding: 8px 12px 8px 8px;
    text-align: left;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border: none;
    font-size: 15px;
    display: flex !important;
    align-items: center;
    position: relative;
}

.drop-btn i {
    margin-right: 10px;
}

.drop-btn:hover {
    background-color: var(--ver-tag-color);
}
/* .telegram-link-btn {
}
.admin-dash-btn {
} */
.logout-btn {
    background-color: transparent;
    color: var(--red-color);
}

/* =========================================
   Admin Dashboard Tabs (Approved / Pending)
   ========================================= */
.dashboard-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--ver-tag-color);
    padding-bottom: 10px;
}

.dashboard-tabs .tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary-color);
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.dashboard-tabs .tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-tabs .tab-btn.active {
    color: var(--main-color);
    background: rgba(0, 136, 209, 0.1);
}

/* شريط التحديد السفلي الأنيق للتاب النشط */
.dashboard-tabs .tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--main-color);
    border-radius: 5px 5px 0 0;
}

/* =========================================
   Review & Approve Action Buttons
   ========================================= */
/* زر المراجعة (برتقالي/ذهبي يدل على الفحص) */
.action-btn.review {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}
.action-btn.review:hover {
    background: #ffc107;
    color: #000;
}

/* زر الموافقة (أخضر يدل على النجاح) */
.action-btn.approve {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}
.action-btn.approve:hover {
    background: #28a745;
    color: #fff;
}

/* زر الرفض (أحمر) - يعتمد على التنسيق الأصلي لك ولكن أكدناه هنا */
.action-btn.reject {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}
.action-btn.reject:hover {
    background: #dc3545;
    color: #fff;
}

/* حركة نبض (Pulse) للشارة الحمراء للملفات المعلقة */
.pending-badge {
    background: #dc3545;
    color: white;
    width: 20px;
    height: 20px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 100px;
    -webkit-border-radius: 100px;
    -moz-border-radius: 100px;
    -ms-border-radius: 100px;
    -o-border-radius: 100px;
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Color Swatch Styles */
.color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    border: 2px solid transparent;
}
.color-swatch:hover {
    transform: scale(1.1);
}
.color-swatch.active {
    transform: scale(1.15);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Icon Option Styles */
.icon-option {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
}
.icon-option:hover {
    background: rgba(255, 255, 255, 0.1);
}
.icon-option.active {
    border: 2px solid var(--main-color);
    background: rgba(0, 136, 209, 0.2);
}

/* ==========================================
   Modern Modals (Rating & Reporting)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px); /* تأثير ضبابي عصري */
    -webkit-backdrop-filter: blur(6px);
    z-index: 20000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--card-color);
    padding: 35px 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px; /* تكبير الحجم ليكون مريح للعين */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--ver-tag-color);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box,
.modal-overlay[style*="display: flex"] .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ver-tag-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.modal-header .close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.modal-header .close-modal:hover {
    transform: rotate(90deg);
}

/* ==========================================
   Card New Buttons (Details & Share)
   ========================================== */
.secondary-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
    padding: 6px 15px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secondary-btn:hover {
    border-color: var(--text-color);
    color: var(--sec-background-color);
    background-color: var(--text-color);
}

.share-btn {
    font-size: 15px;
    color: var(--text-secondary-color);
    cursor: pointer;
    transition: 0.3s ease;
}

.share-btn:hover {
    color: var(--main-color);
    transform: scale(1.1);
}

html[data-theme="light"] .share-btn:hover {
    color: var(--main-color);
}

/* ==========================================
   🚀 Bottom Sheet & Markdown Styles
   ========================================== */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 25000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end; /* لجعله في الأسفل دائماً */
    justify-content: center;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    background: var(--card-color);
    width: 100%;
    max-width: 600px; /* ليكون مناسباً للكمبيوتر أيضاً */
    height: 85vh; /* يغطي 85% من الشاشة */
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.bottom-sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.sheet-header {
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    /* border-bottom: 1px solid var(--ver-tag-color); */
}

.sheet-handle {
    display: none;
    width: 50px;
    height: 5px;
    background: var(--text-secondary-color);
    border-radius: 10px;
    opacity: 0.5;
    cursor: grab;
}

.close-sheet {
    display: block;
    position: absolute;
    right: 20px;
    top: 5px;
    background: transparent;
    border: none;
    color: var(--text-secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
}

@media (max-width: 1100px) {
    .sheet-handle {
        display: block;
    }
    .close-sheet {
        display: none;
    }
}

.close-sheet:hover {
    rotate: 90deg;
}

.sheet-scrollable {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 10px;
}

.sheet-image {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 250px;
    margin: 5px 20px 20px 20px;
    overflow: hidden;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

.sheet-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheet-content-wrapper {
    padding: 0 20px 20px 20px;
}

.sheet-content-wrapper h2 {
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.sheet-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* التنسيق الجديد لحاوية الأزرار */
.sheet-actions {
    display: flex;
    gap: 15px;
    padding: 15px 20px 20px 20px; /* مسافات داخلية مريحة */
    background-color: var(--card-color); /* نفس لون خلفية الشيت */
    border-top: 1px solid var(--ver-tag-color); /* خط فاصل خفيف */
    margin-top: auto; /* لضمان بقائها بالأسفل دائماً */
    z-index: 10;
}

/* Markdown Rendering Styles */
.markdown-body {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--main-color);
}
.markdown-body ul,
.markdown-body ol {
    padding-left: 20px;
    margin-bottom: 15px;
}
.markdown-body strong {
    color: var(--main-color);
}

/* ==========================================
   🚀 EasyMDE Custom Theme (Dark/Light Sync)
   ========================================== */
.editor-toolbar {
    border-color: var(--input-border) !important;
    background-color: var(--card-color) !important;
    border-radius: 10px 10px 0 0 !important;
    opacity: 1 !important;
}

.editor-toolbar button {
    color: var(--text-color) !important;
    transition: 0.2s ease;
}

.editor-toolbar button.active,
.editor-toolbar button:hover {
    background-color: var(--ver-tag-color) !important;
    border-color: transparent !important;
}

.CodeMirror {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--input-border) !important;
    border-radius: 0 0 10px 10px !important;
    font-family: var(--font-sans) !important;
}

/* تنسيق الـ Cursor (مؤشر الكتابة) */
.CodeMirror-cursor {
    border-left-color: var(--text-color) !important;
}

/* وضع المعاينة (Preview) داخل المحرر */
.editor-preview {
    background-color: var(--sec-background-color) !important;
    color: var(--text-color) !important;
    padding: 20px !important;
}

.editor-preview h1,
.editor-preview h2,
.editor-preview h3 {
    color: var(--main-color);
}

/* =================================== */
/* Preloader */
/* =================================== */
#globalPreloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(
        --background-color
    ); /* سيأخذ لون الخلفية الافتراضي لموقعك */
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition:
        opacity 0.4s ease,
        visibility 0.4s;
}

#globalPreloader.hidden {
    opacity: 0;
    visibility: hidden;
}

#globalPreloader .loader {
    --color-1: #0088d1;
    --color-2: 0088d1;
    --size: 1.35px;

    width: calc(48 * var(--size));
    height: calc(48 * var(--size));
    border: calc(5 * var(--size)) solid var(--color-1);
    border-bottom-color: var(--color-2);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
