/* 通知样式 */
.notification-container {
    position: relative;
}

.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-notification {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}


/* 修改通知徽章样式，将数字往下移动 */
.notification-badge {
    position: absolute;
    top: 0px;           /* 改为0或正值，往下移动 */
    right: -8px;       /* 保持向右偏移 */
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;   /* 增加左右内边距 */
    box-shadow: 0 3px 8px rgba(255, 65, 108, 0.4);
    z-index: 10;
}

/* 对于较大数字，增加徽章宽度 */
.notification-badge[data-count="10"],
.notification-badge[data-count="100"] {
    min-width: 25px;
    padding: 2px 10px;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: -10px;
    width: 380px;
    background: rgba(25, 25, 30, 0.95);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: none;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: block;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 30, 40, 0.5);
}

.header-title {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.mark-all-read {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.mark-all-read:hover {
    color: white;
    background: rgba(58, 123, 213, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 123, 213, 0.5) rgba(30, 30, 30, 0.2);
}

.notification-item {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
    position: relative;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background-color: rgba(58, 123, 213, 0.1);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
}

.notification-content {
    padding-left: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 15px;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}

.notification-link {
    font-size: 13px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.notification-link:hover {
    color: white;
    text-decoration: underline;
}

.notification-loading {
    padding: 30px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(58, 123, 213, 0.3);
    border-radius: 50%;
    border-top-color: #3a7bd5;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {transform: rotate(360deg);}
}

.notification-footer {
    padding: 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 30, 40, 0.5);
}

.view-all {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 20px;
    border-radius: 30px;
    background: rgba(0, 210, 255, 0.1);
    display: inline-block;
}

.view-all:hover {
    color: white;
    background: rgba(0, 210, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    transform: translateY(-2px);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-icon {
    width: 50px;
    height: 50px;
    opacity: 0.5;
    margin-bottom: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 添加到样式中 */
.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}


/* 重新定义通知弹窗的移动端适配 */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important; /* 使用固定定位，避免相对定位问题 */
        top: 70px !important; /* 调整顶部距离，确保在导航栏下方 */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 350px !important;
        max-height: 80vh !important; /* 限制最大高度 */
        margin: 0 !important;
        overflow-y: auto !important;
        z-index: 1001 !important; /* 确保在其他元素之上 */
    }

    .notification-list {
        max-height: 300px !important;
    }

    .notification-item {
        padding: 12px 15px !important;
    }

    .notification-content {
        font-size: 13px !important;
    }

    .notification-time {
        font-size: 11px !important;
    }

    .notification-actions {
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 95% !important;
        max-width: 320px !important;
        top: 60px !important;
    }
}

/* 添加滑入动画效果 */
.notification-dropdown.show {
    animation: slideInDown 0.3s forwards !important;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}