/* Label Vibe 前端优化样式 */

/* 通知系统 */
.notification-menu {
    position: relative;
}

.notification-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s;
}

.notification-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-panel {
    position: absolute;
    top: 50px;
    right: 0;
    width: 360px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.notification-header button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    cursor: pointer;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f4ff;
    border-left: 3px solid #667eea;
}

.notification-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.notification-content {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.notification-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.notification-empty {
    padding: 40px;
    text-align: center;
    color: #999;
}

.notification-loading {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* 通知 Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 草稿保存指示器 */
.draft-saved-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 12px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .notification-badge {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: #ccc;
    }
}

/* 焦点状态优化 */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .notification-panel {
        width: 100%;
        max-width: 360px;
        right: -10px;
    }
    
    .notification-toast {
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 20px;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .notification-panel {
        background: #1a1a1a;
        border: 1px solid #333;
    }
    
    .notification-item {
        border-bottom-color: #333;
    }
    
    .notification-item:hover {
        background: #252525;
    }
    
    .notification-item.unread {
        background: #1a2744;
    }
    
    .notification-title {
        color: #fff;
    }
    
    .notification-content {
        color: #aaa;
    }
}

/* 私信弹窗 */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.message-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    height: 80%;
    max-height: 600px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-header h3 {
    margin: 0;
    font-size: 16px;
}

.message-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message-item {
    margin-bottom: 15px;
    max-width: 80%;
}

.message-item.me {
    margin-left: auto;
    text-align: right;
}

.message-item.other {
    margin-right: auto;
}

.message-content {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.message-item.me .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-item.other .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.message-input-area {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
}

.message-input-area textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    font-family: inherit;
}

.message-input-area button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

/* @用户提及下拉框 */
.mention-dropdown {
    min-width: 200px;
}

.mention-item {
    transition: background 0.2s;
}

.mention-item:hover {
    background: #f5f5f5;
}

/* 发送私信按钮 */
.send-message-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.send-message-btn:hover {
    background: #667eea;
    color: white;
}
