/* Desktop CSS - 桌面版样式 */

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.transition-fast { 
    transition: all 0.2s ease; 
}

.chat-bubble-img {
    transition: transform 0.1s ease;
}

.chat-bubble-img:hover {
    transform: scale(1.01);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.55s ease forwards;
}

.panel-fade {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.45s ease 0.15s forwards;
}

.chat-bubble {
    opacity: 0;
    transform: translateY(10px);
    animation: bubbleIn 0.28s ease forwards;
}

.sidebar-item {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.sidebar-item:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sidebar-item:active {
    transform: scale(0.95);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.1);
}

#userAvatar {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#userAvatar:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 20px rgba(78, 93, 148, 0.25);
}

.w-12.md\:w-16.bg-slate-900 button:active {
    transform: scale(0.95);
    opacity: 0.8;
}

#listTitle {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

#listActions button {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

#listActions button:nth-child(1) {
    animation-delay: 0.1s;
}

#listActions button:nth-child(2) {
    animation-delay: 0.15s;
}

#listContent p {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 未读消息徽章样式 */
.unread-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 0.6s ease-out;
    border: 2px solid white;
}

@keyframes badgePulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 消息通知信息栏 */
.notification-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-info button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-info button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 相对定位用于徽章 */
.sidebar-item {
    position: relative;
}

/* 新消息分隔线 */
.new-message-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
    opacity: 0.6;
    animation: fadeInDivider 0.3s ease-out;
}

.new-message-divider::before,
.new-message-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #ef4444 50%, transparent);
}

.new-message-divider span {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    white-space: nowrap;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

@keyframes fadeInDivider {
    from {
        opacity: 0;
        transform: scaleX(0.9);
    }
    to {
        opacity: 0.6;
        transform: scaleX(1);
    }
}

@keyframes bubbleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

#addFriendModal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#addFriendModal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#addFriendModal:not(.hidden) > div {
    animation: modalEnter 0.3s ease forwards;
}

#addFriendModal.hidden > div {
    animation: modalExit 0.3s ease forwards;
}

/* 为创建群组模态框添加动画 */
#groupModal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#groupModal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#groupModal:not(.hidden) > div {
    animation: modalEnter 0.3s ease forwards;
}

#groupModal.hidden > div {
    animation: modalExit 0.3s ease forwards;
}

/* 为群聊管理模态框添加动画 */
#groupManagementModal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#groupManagementModal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#groupManagementModal:not(.hidden) > div {
    animation: modalEnter 0.3s ease forwards;
}

#groupManagementModal.hidden > div {
    animation: modalExit 0.3s ease forwards;
}

/* 为邀请成员加入群聊模态框添加动画 */
#addMemberModal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#addMemberModal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#addMemberModal:not(.hidden) > div {
    animation: modalEnter 0.3s ease forwards;
}

#addMemberModal.hidden > div {
    animation: modalExit 0.3s ease forwards;
}
