/* 📢 Update Notifications Banner - Vị trí cố định dưới box Ycoin */
.update-notifications-banner {
        background: linear-gradient(45deg, #000000, #2b2b2b, #000000);
    background-size: 300% 300%;
    animation: gradientShift 4s 
ease infinite;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); */
    position: relative;
    overflow: hidden; 
     border: 1px solid rgba(255, 255, 255, 0.1); 
    margin: 0;
    font-size: 15px;
    /* Đảm bảo hiển thị ngay khi có class */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease;
}

.update-notifications-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(48, 48, 48, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.notifications-marquee-container {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    /* Optimizations for smooth scrolling */
    will-change: transform;
    backface-visibility: hidden;
}

.notifications-marquee {
    display: inline-block;
    animation: scroll-left 356s linear infinite; /* Tăng từ 180s lên 216s = chậm thêm 20% */
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    /* Optimizations for smooth animation */
    will-change: transform;
    transform: translate3d(0, 0, 0); /* Enable hardware acceleration */
    backface-visibility: hidden;
    /* Immediate start */
    animation-delay: 0s !important;
    animation-fill-mode: both !important;
}

/* Force restart animation class */
.notifications-marquee.force-restart {
    animation: scroll-left 448s linear infinite; /* Tăng từ 240s lên 288s */
    animation-delay: 0s !important;
}

@keyframes scroll-left {
    0% { transform: translate3d(0%, 0, 0); } /* Bắt đầu từ 0% thay vì 20% */
    100% { transform: translate3d(-100%, 0, 0); }
}

.notification-item {
    display: inline;
    margin-right: 30px; /* Giảm khoảng cách giữa các thông báo để liên tục hơn */
}

.notification-item:last-child::after {
    content: " • ";
    margin: 0 30px;
    color: #ffeb3b;
    font-weight: bold;
}

.notification-date {
    color: #ffeb3b;
    font-weight: bold;
    margin-right: 8px;
}

.notification-content {
    color: #ffffff;
}

.notification-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
    text-transform: uppercase;
}

.notification-type-update {
    background: #4caf50;
    color: #fff;
}

.notification-type-new {
    background: #ff9800;
    color: #fff;
}

.notification-type-fix {
    background: #f44336;
    color: #fff;
}

.notification-type-event {
    background: #9c27b0;
    color: #fff;
}

/* Loading state */
.notifications-loading {
    text-align: center;
    padding: 12px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* Hidden state when no notifications */
.update-notifications-banner.hidden {
    display: none !important;
}

/* Force immediate display on page load */
.update-notifications-banner:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation-delay: 0s !important; /* Không delay animation */
}

/* Sticky state styling */
.update-notifications-banner.notification-sticky,
#updateNotificationsBanner-sticky {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #1a1a1a12, #2b2b2b2e, #1a1a1a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 999 !important;
    max-width: none !important;
    backdrop-filter: blur(20px);
    width: 98% !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide sticky banner when at top of page */
body.at-top #updateNotificationsBanner-sticky {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
    pointer-events: none;
}


div#updateNotificationsBanner-sticky {
    top: 67px !important;
}
/* Sticky clone specific styling */
#updateNotificationsBanner-sticky {
    position: fixed !important;
    left: 50% !important;
    right: 0 !important;
    margin: 0 !important; 
    transform: translateX(-50%) !important;
}

 
/* Mobile responsive */
@media (max-width: 768px) {
    .update-notifications-banner {
        padding: 8px 12px;
    }
    
    .notifications-marquee {
        font-size: 13px;
        animation-duration: 356s; /* Giống như desktop - chậm như nhau */
    }
    
    .notifications-marquee-container {
        height: 22px;
    }
    
    .notification-item {
        margin-right: 25px; /* Khoảng cách gần hơn trên mobile */
    }
    
    /* Sticky state on mobile */
    .update-notifications-banner.notification-sticky,
    #updateNotificationsBanner-sticky {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .update-notifications-banner {
        padding: 6px 10px;
    }
    
    .notifications-marquee {
        font-size: 12px;
        animation-duration: 356s; /* Giống như desktop - chậm như nhau */
    }
    
    .notification-item {
        margin-right: 20px;
    }
    
    /* Sticky state on small screens */
    .update-notifications-banner.notification-sticky,
    #updateNotificationsBanner-sticky {
        padding: 5px 8px;
        font-size: 12px;
    }
}

/* Styling cho SweetAlert modal */
.notifications-swal-popup {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.notifications-swal-title {
    font-size: 18px !important;
    margin-bottom: 20px !important;
}

.notifications-swal-content {
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

.notifications-modal-content {
    text-align: left !important;
}

/* Scrollbar styling cho modal */
.notifications-swal-content::-webkit-scrollbar {
    width: 6px;
}

.notifications-swal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.notifications-swal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.notifications-swal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Icon con mắt responsive */
@media (max-width: 768px) {
    .notification-eye-icon {
        font-size: 16px !important; 
    }
}

@media (max-width: 480px) {
    .notification-eye-icon {
        font-size: 14px !important; 
    }
    
    .notifications-swal-popup {
        width: 95% !important;
        margin: 0 auto !important;
    }
}
