:root {
    --royal-gold: #D4AF37;
    --dark-gold: #B8860B;
    --light-gold: #F5D98B;
    --crown-gold: #FFD700;
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --text-light: #f8f8f8;
    --text-gray: #cccccc;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
dropdown-divider {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin: 0.5rem 0;
}

.badge-in-menu {
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    margin-right: 5px;
}

.admin-badge {
    background-color: #3498db;
}

.logout-link {
    color: #e74c3c !important;
    font-weight: bold;
}

.logout-link:hover {
    background-color: rgba(231, 76, 60, 0.1) !important;
}

/* تحسين عرض معلومات المستخدم */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* تأثيرات القائمة المنسدلة */
.dropdown-menu {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تصميم متجاوب للقائمة المنسدلة */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 70px;
        right: 20px;
        width: 250px;
    }
}

/* الأساسيات */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

/* الهيدر الملكي */
.gold-header {
    background-color: var(--dark-bg);
    color: var(--text-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--royal-gold);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

/* الشعار */
.royal-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--royal-gold);
    transition: all 0.3s ease;
}

.logo-text {
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.crown-icon {
    color: var(--crown-gold);
    margin-right: 0.5rem;
    font-size: 1.4rem;
}

.royal-logo:hover {
    transform: scale(1.05);
}

/* التنقل الرئيسي */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a:hover {
    color: var(--light-gold);
    background-color: rgba(212, 175, 55, 0.1);
}

/* الأزرار الذهبية */
.gold-btn {
    background: linear-gradient(135deg, var(--royal-gold), var(--dark-gold));
    color: var(--dark-bg) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.login-btn {
    background: linear-gradient(135deg, var(--royal-gold), var(--dark-gold));
}

/* إجراءات المستخدم */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    font-size: 1rem;
    color: var(--text-gray);
}

.user-icons {
    display: flex;
    gap: 1rem;
}

.icon-notification {
    position: relative;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.icon-notification:hover {
    color: var(--light-gold);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.2rem;
}


/* القائمة المنسدلة */
.royal-dropdown {
    position: relative;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.3rem;
}

.settings-btn:hover {
    color: var(--light-gold);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--darker-bg);
    min-width: 200px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    z-index: 1000;
    border: 1px solid var(--royal-gold);
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dropdown-menu a:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--light-gold);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.royal-dropdown:hover .dropdown-menu {
    display: block;
}

/* تصميم متجاوب للهواتف */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem 1rem;
    }
    
    .logo-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: var(--royal-gold);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .main-nav {
        width: 100%;
        display: none;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-nav a {
        padding: 0.8rem;
        justify-content: center;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .user-welcome {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gold-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
.search-ad-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
    width: 100%;
}

.gold-search {
    display: flex;
    flex: 1;
    max-width: 420px;
}

.gold-search input {
    flex: 1;
    border-radius: 6px 0 0 6px !important; /* الزاوية اليسرى فقط مدوّرة */
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    min-width: 140px;
}
.gold-search .gold-btn {
    border-radius: 6px 0 0 6px !important; /* الزاوية المدورة لليسار فقط */
    min-width: 90px;
    padding: 0.5rem 1.1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-ad-row > .gold-btn {
    min-width: 120px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 1rem;
    border-radius: 6px !important;
}

@media (max-width: 700px) {
    .search-ad-row {
        flex-direction: column-reverse !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    .gold-search, .search-ad-row > .gold-btn {
        width: 100% !important;
        max-width: none !important;
        border-radius: 6px !important;
    }
    .gold-search input, .gold-search .gold-btn {
        border-radius: 6px !important;
    }
}
.gold-search > .gold-btn:first-child {
    border-radius: 0 6px 6px 0 !important; /* زر أضف إعلان: الزاوية اليمنى فقط */
}
.gold-search > .gold-btn:last-child {
    border-radius: 6px 0 0 6px !important; /* زر بحث: الزاوية اليسرى فقط */
}
.gold-search input {
    border-radius: 0 !important; /* حتى لا يتداخل مع الزرين */
}
