.notification-toggle {
    background: transparent !important;
    border: none !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: relative;
    color: #000000 !important;
}

body.dark-theme .notification-toggle {
    color: #ffffff !important;
}

.notification-toggle:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #000000 !important;
    border-radius: 50% !important;
    transform: none !important;
}

body.dark-theme .notification-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    transform: none !important;
}

.notification-toggle i {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

.notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.5);
}

body.dark-theme .notification-dot {
    border-color: rgba(0, 0, 0, 0.3);
}

.notification-dot.show {
    opacity: 1;
    transform: scale(1);
    animation: blink-dot 1.5s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.7);
    }
}

:root {
    --notification-glare-light: rgba(255, 255, 255, 0.15);
    --notification-glare-dark: rgba(255, 255, 255, 0.15);
    --notification-hover-light: rgba(255, 255, 255, 0.35);
    --notification-hover-dark: rgba(255, 255, 255, 0.06);
}

.notification-dropdown {
    position: fixed;
    top: 72px;
    left: 20px;
    transform: translateY(-10px) scale(0.95);
    width: 380px;
    max-width: 90vw;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 40px 80px -20px rgba(0, 0, 0, 0.06),
        0 10px 30px -10px rgba(0, 0, 0, 0.03),
        inset 0 2px 3px -1px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px -1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    overflow: hidden;
    direction: rtl;
    transform-origin: top left;
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 40%;
    border-radius: 20px 20px 12px 12px / 20px 20px 8px 8px;
    background: transparent;
    pointer-events: none;
    z-index: 6;
    transition: background 0.5s ease;
}

body.dark-theme .notification-dropdown::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.0) 100%);
}

.notification-dropdown::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 14px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    z-index: -1;
    border-radius: 3px 0 0 0;
}

body.dark-theme .notification-dropdown::after {
    background: rgba(30, 30, 35, 0.35);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-glare-container {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}

.notification-glare {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(circle 70px at var(--nx, 50%) var(--ny, 50%), 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
}

.notification-dropdown:hover .notification-glare {
    opacity: 1;
}

body.dark-theme .notification-dropdown {
    background: rgba(30, 30, 35, 0.35);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 40px 80px -20px rgba(0, 0, 0, 0.4),
        0 10px 30px -10px rgba(0, 0, 0, 0.2),
        inset 0 2px 3px -1px rgba(255, 255, 255, 0.05),
        inset 0 -2px 4px -1px rgba(255, 255, 255, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.dark-theme .notification-glare {
    background: radial-gradient(circle 70px at var(--nx, 50%) var(--ny, 50%), 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 100%
    );
}

.notification-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
}

body.dark-theme .notification-dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-dropdown-title {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Estedad', 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .notification-dropdown-title {
    color: #e0e0e0;
}

.notification-dropdown-title i {
    width: 18px;
    height: 18px;
    color: #1a1a1a;
}

body.dark-theme .notification-dropdown-title i {
    color: #ffd700;
}

.notification-dropdown-close {
    background: rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.25);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

body.dark-theme .notification-dropdown-close {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.25);
}

.notification-dropdown-close:hover {
    color: #007aff;
    background: rgba(0, 122, 255, 0.08) !important;
}

body.dark-theme .notification-dropdown-close:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08) !important;
}

.notification-dropdown-body {
    padding: 4px 0;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

.notification-dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.notification-dropdown-body::-webkit-scrollbar-track {
    background: transparent;
}

.notification-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

body.dark-theme .notification-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}

.notification-item-dropdown {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0;
}

.notification-item-dropdown:last-child {
    border-radius: 0 0 20px 20px;
}

.notification-item-dropdown:first-child {
    border-radius: 20px 20px 0 0;
}

.notification-item-dropdown::before {
    content: '';
    position: absolute;
    inset: 4px 8px;
    border-radius: 12px;
    background: transparent;
    transition: all 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    z-index: 0;
    pointer-events: none;
}

.notification-item-dropdown:hover::before {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark-theme .notification-item-dropdown::before {
    inset: 4px 8px;
    border-radius: 12px;
}

body.dark-theme .notification-item-dropdown:hover::before {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.notification-item-dropdown:hover {
    background: transparent;
}

body.dark-theme .notification-item-dropdown:hover {
    background: transparent;
}

.notification-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
}

body.dark-theme .notification-item-icon {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
}

.notification-item-dropdown:hover .notification-item-icon {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.06);
}

body.dark-theme .notification-item-dropdown:hover .notification-item-icon {
    background: rgba(255, 215, 0, 0.12);
}

.notification-item-icon i {
    display: block;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.notification-item-dropdown:hover .notification-item-icon i {
    transform: scale(1.05);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.notification-item-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #1a1a1a;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
}

body.dark-theme .notification-item-text {
    color: #e0e0e0;
}

.notification-item-text a {
    color: #1a1a1a !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.notification-item-text a:hover {
    color: #007aff !important;
    border-bottom-color: #007aff;
}

body.dark-theme .notification-item-text a {
    color: #ffd700 !important;
}

body.dark-theme .notification-item-text a:hover {
    color: #ffe066 !important;
    border-bottom-color: #ffd700;
}

.notification-item-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    direction: ltr;
    text-align: right;
    opacity: 0.7;
}

body.dark-theme .notification-item-time {
    color: #7a8a9a;
}

.notification-item-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.55rem;
    font-weight: 600;
    margin-left: 6px;
}

.notification-item-badge.badge-info {
    background: #ffd700;
    color: #1a1a1a;
}

body.dark-theme .notification-item-badge.badge-info {
    background: #ffd700;
    color: #0a1628;
}

.notification-item-badge.badge-new {
    background: #ff3b30;
    color: white;
}

body.dark-theme .notification-item-badge.badge-new {
    background: #ff3b30;
    color: white;
}

.notification-item-badge.badge-update {
    background: #34c759;
    color: white;
}

body.dark-theme .notification-item-badge.badge-update {
    background: #34c759;
    color: white;
}

.notification-item-badge.badge-popular {
    background: #ff9500;
    color: white;
}

body.dark-theme .notification-item-badge.badge-popular {
    background: #ff9500;
    color: white;
}

.notification-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
}

.notification-empty i {
    display: block;
    margin: 0 auto 14px;
    opacity: 0.3;
    color: #999;
}

body.dark-theme .notification-empty {
    color: #6a7a8a;
}

body.dark-theme .notification-empty i {
    color: #6a7a8a;
}

@media (max-width: 768px) {
    .notification-dropdown {
        top: 64px;
        left: 10px;
        width: 340px;
        max-width: 92vw;
        border-radius: 18px;
    }
    .notification-dropdown::after {
        left: 12px;
        width: 12px;
        height: 12px;
        top: -6px;
    }
    .notification-dropdown-header {
        padding: 14px 16px 10px 16px;
    }
    .notification-dropdown-title {
        font-size: 0.95rem;
    }
    .notification-item-dropdown {
        padding: 10px 16px;
        gap: 12px;
    }
    .notification-item-dropdown::before {
        inset: 3px 6px;
        border-radius: 10px;
    }
    .notification-item-icon {
        width: 32px;
        height: 32px;
    }
    .notification-item-icon i {
        width: 16px;
        height: 16px;
    }
    .notification-item-text {
        font-size: 0.8rem;
    }
    .notification-item-time {
        font-size: 0.65rem;
    }
    .notification-toggle {
        width: 34px !important;
        height: 34px !important;
    }
    .notification-toggle i {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        top: 58px;
        left: 8px;
        width: 300px;
        max-width: 94vw;
        border-radius: 16px;
    }
    .notification-dropdown::after {
        left: 10px;
        width: 10px;
        height: 10px;
        top: -5px;
    }
    .notification-dropdown-header {
        padding: 12px 14px 8px 14px;
    }
    .notification-dropdown-title {
        font-size: 0.85rem;
    }
    .notification-item-dropdown {
        padding: 8px 14px;
        gap: 10px;
    }
    .notification-item-dropdown::before {
        inset: 2px 4px;
        border-radius: 8px;
    }
    .notification-item-icon {
        width: 28px;
        height: 28px;
    }
    .notification-item-icon i {
        width: 14px;
        height: 14px;
    }
    .notification-item-text {
        font-size: 0.75rem;
    }
    .notification-item-time {
        font-size: 0.6rem;
    }
    .notification-toggle {
        width: 30px !important;
        height: 30px !important;
    }
    .notification-toggle i {
        width: 16px !important;
        height: 16px !important;
    }
}