/* 留言气泡样式 - 使用导航卡片样式 */
.message-bubble {
    position: absolute;
    top: 50%;
    left: calc(100% + 75px);
    transform: translateY(-50%);
    width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 20px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    font-size: 13px;
    line-height: 1.4;
}

.message-bubble::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 13px solid var(--card-bg);
    transition: border-right-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-bubble.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.message-bubble.hide {
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
}

.message-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-content {
    color: var(--text-secondary);
    word-wrap: break-word;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    margin-bottom: 4px;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-content:last-child {
    margin-bottom: 0;
}

/* name 和 time 在同一行显示 */
.message-name-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.message-name-time .message-name {
    color: var(--text-secondary);
    font-size: 13px;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-name-time .message-time {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0.8;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .message-name-time .message-name {
        font-size: 12px;
    }
    
    .message-name-time .message-time {
        font-size: 11px;
    }
}

/* 深色主题适配 */
[data-theme="dark"] .message-bubble {
    backdrop-filter: blur(20px) saturate(180%);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .message-bubble {
        left: calc(100% + 20px);
        width: 180px;
        font-size: 12px;
        padding: 12px 16px;
        border-radius: 16px;
    }
    
    .message-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .message-bubble {
        display: none;
    }
}
