/**
 * 消息通知组件样式
 */

/* 消息通知按钮 */
.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification-btn .bell-icon {
    font-size: 20px;
}

.notification-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ff4757;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 消息通知下拉菜单 */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 通知头部 */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.notification-header .mark-all-read {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.notification-header .mark-all-read:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 通知列表 */
.notification-list {
    max-height: 450px;
    overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 通知项 */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.notification-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-purple {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.notification-red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.notification-yellow {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.notification-green {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.notification-gray {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.notification-time {
    flex-shrink: 0;
}

.notification-action-btn {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.notification-delete-btn {
    margin-left: auto;
    padding: 4px 8px;
    background: transparent;
    color: #999;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-delete-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* 空状态 */
.notification-empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.notification-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.notification-empty .empty-text {
    font-size: 14px;
}

/* 加载更多 */
.notification-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 380px;
        max-height: 70vh;
        margin-top: 0;
    }

    .notification-dropdown.show {
        transform: translate(-50%, -50%);
    }

    .notification-list {
        max-height: calc(70vh - 80px);
    }
}

/* 暗色主题适配 */
.theme-dark .notification-dropdown {
    background: #1e1e1e;
    color: #e0e0e0;
}

.theme-dark .notification-item {
    border-bottom-color: #333;
}

.theme-dark .notification-item:hover {
    background: #2d2d2d;
}

.theme-dark .notification-item.unread {
    background: rgba(102, 126, 234, 0.1);
}

.theme-dark .notification-title {
    color: #e0e0e0;
}

.theme-dark .notification-message {
    color: #b0b0b0;
}

.theme-dark .notification-meta {
    color: #666;
}
