/* 悬浮通知面板样式 */
.nm-notifier-container {
    position: fixed;
    top: var(--nm-top);
    right: 20px;
    z-index: 2147483647;
    width: 360px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 12px 20px -8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: none;
    flex-direction: column;
    max-height: 520px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nm-notifier-container.nm-notifier-show {
    display: flex;
}

.nm-notifier-container.nm-notifier-show.nm-notifier-slide {
    animation: nmSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nm-notifier-container.nm-notifier-show.nm-notifier-fade {
    animation: nmFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nm-notifier-container.nm-notifier-show.nm-notifier-scale {
    animation: nmScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nm-notifier-left { left: 20px; right: auto; }

/* 头部区域 */
.nm-notifier-header {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.nm-notifier-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.nm-notifier-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.nm-notifier-header-btn {
    font-size: 12px;
    color: #666;
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nm-notifier-header-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #333;
}

.nm-notifier-header-sub {
    font-size: 12px;
    color: #888;
}

/* 标签页导航 */
.nm-notifier-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafbfc;
    padding: 0;
}

.nm-notifier-tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nm-notifier-tab:hover {
    color: var(--nm-primary);
    background: rgba(0, 0, 0, 0.02);
}

.nm-notifier-tab-active {
    color: var(--nm-primary) !important;
    background: #fff !important;
    border-bottom-color: var(--nm-primary) !important;
    font-weight: 600;
}

.nm-notifier-tab i {
    font-size: 15px;
}

.nm-notifier-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: #e0e0e0;
    color: #666;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    padding: 0 5px;
    transition: all 0.2s;
}

.nm-notifier-tab-active .nm-notifier-tab-badge {
    background: var(--nm-primary);
    color: #fff;
}

/* 消息列表 */
.nm-notifier-body {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
    /* 隐藏滚动条 - Firefox */
    scrollbar-width: none;
    /* 隐藏滚动条 - IE/Edge */
    -ms-overflow-style: none;
    /* 添加过渡动画 */
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 隐藏滚动条 - Webkit 浏览器 */
.nm-notifier-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.nm-notifier-item {
    padding: 16px 18px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nm-notifier-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--nm-primary);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nm-notifier-item:hover {
    background: #fafbfc;
    transform: translateX(4px);
}

.nm-notifier-item:hover::before {
    opacity: 1;
}

/* 不同类型的消息项背景色 */
.nm-notifier-item-info {
    background: linear-gradient(to right, rgba(52, 152, 219, 0.05) 0%, transparent 100%);
}

.nm-notifier-item-info:hover {
    background: linear-gradient(to right, rgba(52, 152, 219, 0.08) 0%, #fafafa 100%);
}

.nm-notifier-item-success {
    background: linear-gradient(to right, rgba(39, 174, 96, 0.05) 0%, transparent 100%);
}

.nm-notifier-item-success:hover {
    background: linear-gradient(to right, rgba(39, 174, 96, 0.08) 0%, #fafafa 100%);
}

.nm-notifier-item-warning {
    background: linear-gradient(to right, rgba(243, 156, 18, 0.05) 0%, transparent 100%);
}

.nm-notifier-item-warning:hover {
    background: linear-gradient(to right, rgba(243, 156, 18, 0.08) 0%, #fafafa 100%);
}

.nm-notifier-item-error {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.05) 0%, transparent 100%);
}

.nm-notifier-item-error:hover {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.08) 0%, #fafafa 100%);
}

.nm-notifier-item:last-child {
    border-bottom: none;
}

/* 头像 */
.nm-notifier-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.nm-notifier-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.nm-notifier-item:hover .nm-notifier-avatar::before {
    opacity: 1;
}

.nm-notifier-avatar i {
    position: relative;
    z-index: 1;
}

/* 不同类型的头像颜色 */
.nm-notifier-avatar-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.nm-notifier-avatar-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.nm-notifier-avatar-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.nm-notifier-avatar-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.nm-notifier-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 内容区 */
.nm-notifier-content {
    flex: 1;
    min-width: 0;
}

.nm-notifier-content-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 6px;
}

.nm-notifier-username {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.nm-notifier-time {
    font-size: 11px;
    color: #999;
}

/* 通知标题样式 */
.nm-notifier-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.35;
    display: block;
    letter-spacing: -0.1px;
}

/* 不同类型的标题颜色 */
.nm-notifier-item-info .nm-notifier-title {
    color: #1a5276;
}

.nm-notifier-item-success .nm-notifier-title {
    color: #1e8449;
}

.nm-notifier-item-warning .nm-notifier-title {
    color: #935116;
}

.nm-notifier-item-error .nm-notifier-title {
    color: #922b21;
}

/* 通知内容样式 */
.nm-notifier-message {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    word-break: break-word;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    margin-bottom: 8px;
}

/* 不同类型的消息内容边框颜色 */
.nm-notifier-item-info .nm-notifier-message {
    border-left-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(52, 152, 219, 0.02) 100%);
}

.nm-notifier-item-success .nm-notifier-message {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08) 0%, rgba(39, 174, 96, 0.02) 100%);
}

.nm-notifier-item-warning .nm-notifier-message {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.08) 0%, rgba(243, 156, 18, 0.02) 100%);
}

.nm-notifier-item-error .nm-notifier-message {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.08) 0%, rgba(231, 76, 60, 0.02) 100%);
}

/* 标签和操作 */
.nm-notifier-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.nm-notifier-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--nm-primary);
    background: rgba(0,0,0,0.04);
    padding: 3px 10px;
    border-radius: 4px;
}

/* 不同类型的标签颜色 */
.nm-notifier-tag-info {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.1);
}

.nm-notifier-tag-success {
    color: #229954;
    background: rgba(39, 174, 96, 0.1);
}

.nm-notifier-tag-warning {
    color: #d35400;
    background: rgba(243, 156, 18, 0.1);
}

.nm-notifier-tag-error {
    color: #c0392b;
    background: rgba(231, 76, 60, 0.1);
}

.nm-notifier-read-btn {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nm-notifier-read-btn:hover {
    background: linear-gradient(135deg, var(--nm-light) 0%, var(--nm-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nm-notifier-read-btn:active {
    transform: translateY(0);
}

.nm-notifier-read-btn i {
    font-size: 11px;
}

/* 底部 */
.nm-notifier-footer-bar {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.nm-notifier-all-btn {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nm-notifier-all-btn:hover {
    background: linear-gradient(135deg, var(--nm-light) 0%, var(--nm-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.nm-notifier-all-btn:active {
    transform: translateY(0);
}

.nm-notifier-all-btn i {
    font-size: 15px;
}

/* 空状态 */
.nm-notifier-empty {
    padding: 50px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nm-notifier-empty i {
    font-size: 52px;
    color: #ddd;
    margin-bottom: 4px;
}

/* 触发按钮 - 现代化悬浮设计 */
.nm-notifier-trigger {
    position: fixed;
    top: calc(var(--nm-top) - 35px);
    right: 20px;
    z-index: 2147483646;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 脉冲动画 - 外层波纹 */
.nm-notifier-trigger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    opacity: 0;
    z-index: -1;
    animation: nmTriggerPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 脉冲动画 - 内层波纹 */
.nm-notifier-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-dark) 100%);
    opacity: 0;
    z-index: -1;
    animation: nmTriggerPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: 1s;
}

.nm-notifier-trigger:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nm-notifier-trigger:hover::before,
.nm-notifier-trigger:hover::after {
    animation-play-state: paused;
}

.nm-notifier-trigger:active {
    transform: scale(0.95);
}

/* 脉冲动画关键帧 */
@keyframes nmTriggerPulse {
    0% {
        width: 48px;
        height: 48px;
        opacity: 0.5;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

.nm-notifier-left-trigger {
    right: auto;
    left: 20px;
}

.nm-notifier-trigger-icon {
    font-size: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nm-notifier-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(238, 90, 111, 0.4);
    border: 2px solid #fff;
    animation: nmBadgePulse 2s infinite;
}

@keyframes nmBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 动画 */
@keyframes nmFadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.nm-notifier-fade {
    animation: nmFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nmSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.nm-notifier-slide {
    animation: nmSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nm-notifier-left.nm-notifier-slide {
    animation-name: nmSlideInLeft;
}

.nm-notifier-container.nm-notifier-show.nm-notifier-left.nm-notifier-slide {
    animation: nmSlideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nmSlideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes nmScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.nm-notifier-scale {
    animation: nmScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 关闭动画 */
@keyframes nmFadeOut {
    from { opacity: 1; transform: translateX(0) scale(1); max-height: 200px; margin-bottom: 12px; }
    to { opacity: 0; transform: translateX(60px) scale(0.95); max-height: 0; margin-bottom: 0; padding: 0; overflow: hidden; }
}

.nm-notifier-item-closing {
    animation: nmFadeOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

.nm-notifier-left .nm-notifier-item-closing {
    animation-name: nmFadeOutLeft;
}

@keyframes nmFadeOutLeft {
    from { opacity: 1; transform: translateX(0) scale(1); max-height: 200px; margin-bottom: 12px; }
    to { opacity: 0; transform: translateX(-60px) scale(0.95); max-height: 0; margin-bottom: 0; padding: 0; overflow: hidden; }
}

/* 响应式 */
@media (max-width: 480px) {
    .nm-notifier-container {
        left: 10px !important;
        right: 10px !important;
        width: auto;
    }
    .nm-notifier-trigger {
        right: 10px !important;
    }
}
