/* ========== 通知系统样式 ========== */

/* 通知中心 */
.notification-center {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification-bell {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: var(--border-1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.notification-bell:hover {
    background: var(--surface-3);
    transform: scale(1.1);
}

.notification-bell.connected {
    color: var(--accent-primary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--accent-danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-bold);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid var(--surface-0);
}

/* 通知面板 */
.notification-panel {
    position: absolute;
    top: 60px;
    right: 0;
    width: 400px;
    max-height: 600px;
    background: var(--surface-2);
    border: var(--border-1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all var(--transition-base);
}

.notification-panel.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    border-bottom: var(--border-1);
}

.notification-header h3 {
    margin: 0;
    font-size: var(--text-lg);
}

.notification-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

/* 标签页 */
.notification-tabs {
    display: flex;
    padding: var(--space-2) var(--space-4);
    gap: var(--space-2);
    border-bottom: var(--border-1);
}

.notification-tab {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
}

.notification-tab:hover {
    background: var(--surface-3);
}

.notification-tab.active {
    background: var(--accent-primary);
    color: white;
}

/* 通知列表 */
.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2);
}

.notification-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-12);
}

.notification-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--surface-3);
}

.notification-item.unread {
    background: rgba(56, 189, 248, 0.05);
    border-left: 3px solid var(--accent-primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-lg);
}

.notification-icon.music {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.notification-icon.order {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.notification-icon.system {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.notification-icon.warning {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.notification-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.notification-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.notification-item .notification-actions {
    display: flex;
    gap: var(--space-1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

/* 浮动通知（Toast） */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    min-width: 320px;
    background: var(--surface-2);
    border: var(--border-1);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-2xl);
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    animation: toast-slide-in 0.3s ease-out;
    pointer-events: auto;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-fade-out {
    animation: toast-fade-out 0.3s ease-out forwards;
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-xl);
}

.toast-music .toast-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.toast-order .toast-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.toast-system .toast-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.toast-warning .toast-icon {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.toast-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .notification-panel {
        width: calc(100vw - 40px);
        right: -10px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* 滚动条 */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: var(--surface-1);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--surface-4);
    border-radius: var(--radius-full);
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
