/* =================================== 收益明细卡片样式 - 重构版 创建时间:2026-02-04 说明:修复布局错乱问题,优化文本显示 =================================== */ /* 收益明细卡片容器 */ .earnings-detail-card { background: rgba(28, 28, 30, 0.8); backdrop-filter: blur(40rpx); border: 2rpx solid rgba(255,255,255,0.1); border-radius: 32rpx; overflow: hidden; margin-bottom: 24rpx; width: 100%; box-sizing: border-box; } /* 卡片头部 */ .detail-header { padding: 40rpx 40rpx 24rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); } .detail-title { font-size: 30rpx; font-weight: 600; color: #fff; } /* 列表容器 */ .detail-list { max-height: 480rpx; overflow-y: auto; padding: 16rpx 0; } /* =================================== 收益明细列表项 - 核心样式 =================================== */ /* 列表项容器 - 使用flex布局 */ .earnings-detail-card .detail-item { display: flex; align-items: center; gap: 24rpx; padding: 24rpx 40rpx; background: transparent; border-bottom: 2rpx solid rgba(255,255,255,0.03); transition: background 0.3s; } .earnings-detail-card .detail-item:last-child { border-bottom: none; } .earnings-detail-card .detail-item:active { background: rgba(255, 255, 255, 0.05); } /* 头像容器 - 固定宽度,不收缩 */ .earnings-detail-card .detail-avatar-wrap { width: 88rpx; height: 88rpx; flex-shrink: 0; } .earnings-detail-card .detail-avatar { width: 100%; height: 100%; border-radius: 50%; border: 2rpx solid rgba(56, 189, 172, 0.2); display: block; } .earnings-detail-card .detail-avatar-text { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #38bdac 0%, #2da396 100%); display: flex; align-items: center; justify-content: center; font-size: 36rpx; font-weight: 700; color: #ffffff; } /* 详细信息容器 - 占据剩余空间,允许收缩 */ .earnings-detail-card .detail-content { flex: 1; min-width: 0; /* 关键:允许flex子元素收缩到比内容更小 */ display: flex; flex-direction: column; gap: 8rpx; } /* 顶部行:昵称 + 金额 */ .earnings-detail-card .detail-top { display: flex; align-items: center; justify-content: space-between; gap: 16rpx; } /* 买家昵称 - 允许收缩,显示省略号 */ .earnings-detail-card .detail-buyer { font-size: 28rpx; font-weight: 500; color: #ffffff; flex: 1; min-width: 0; /* 关键:允许收缩 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 佣金金额 - 固定宽度,不收缩 */ .earnings-detail-card .detail-amount { font-size: 32rpx; font-weight: 700; color: #38bdac; flex-shrink: 0; white-space: nowrap; } /* 商品信息行:书名 + 章节 */ .earnings-detail-card .detail-product { display: flex; align-items: baseline; gap: 4rpx; font-size: 24rpx; color: rgba(255, 255, 255, 0.6); min-width: 0; /* 关键:允许收缩 */ overflow: hidden; } /* 书名 - 限制最大宽度,显示省略号 */ .earnings-detail-card .detail-book { color: rgba(255, 255, 255, 0.7); font-weight: 500; max-width: 50%; /* 限制书名最多占一半宽度 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; } /* 章节 - 占据剩余空间,显示省略号 */ .earnings-detail-card .detail-chapter { color: rgba(255, 255, 255, 0.5); flex: 1; min-width: 0; /* 关键:允许收缩 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 时间信息 */ .earnings-detail-card .detail-time { font-size: 22rpx; color: rgba(255, 255, 255, 0.4); } /* =================================== 响应式优化 =================================== */ /* 小屏幕优化 */ @media (max-width: 375px) { .earnings-detail-card .detail-buyer { font-size: 26rpx; } .earnings-detail-card .detail-amount { font-size: 30rpx; } .earnings-detail-card .detail-book { max-width: 45%; } }