/**
 * 通知中心样式
 */

/* 通知铃铛按钮 */
.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    color: white;
    font-size: 18px;
}

.notification-bell-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notification-bell-btn.has-unread {
    animation: bellShake 2s infinite;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

/* 未读计数徽章 */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f44336;
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 通知面板 */
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.notification-panel.show {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 通知面板头部 */
.notification-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.notification-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-panel-actions {
    display: flex;
    gap: 8px;
}

.notification-action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

.notification-action-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* 通知列表 */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 通知项 */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e3f2fd;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #2196F3;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.notification-item.unread .notification-icon {
    background: #bbdefb;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.notification-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-delete {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    background: #f0f0f0;
    color: #f44336;
}

/* 空状态 */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.notification-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 14px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notification-panel {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }

    .notification-item {
        padding: 12px 16px;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}
