/* 移动端适配 */
body {
    margin: 0;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* 刷新容器样式 */
.refresh-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.refresh-container.visible {
    transform: translateY(0);
}

.refresh-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.refresh-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.refresh-icon.rotate {
    transform: rotate(180deg);
}

.refresh-text {
    font-size: 14px;
    color: #666;
}

/* 瀑布流布局 */
.waterfall-container {
    display: flex;
    gap: 20px; /* 增加列间距 */
    padding: 10px;
    margin-top: 20px; /* 添加顶部间距 */
}

.column {
    flex: 1;
    min-width: 0;
}

/* 第一列错位 */
#col1 {
    margin-top:240px; /* 第一列向下错位 */
}

/* 帖子卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px; /* 增加卡片间距 */
    break-inside: avoid;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 添加阴影效果 */
    transition: transform 0.3s ease; /* 添加过渡效果 */
}

.card:hover {
    transform: translateY(-5px); /* 悬停时轻微上浮 */
}

/* 视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
}

.card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 8px 8px 0 0;
}

.card-content {
    padding: 10px;
}

/* 浏览量样式 */
.views {
    color: #666;
    font-size: 12px;
    padding: 5px 10px;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 20px;
    display: none;
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.loading::after {
    content: '加载中';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-left: 20px;
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    max-height: 2.8em;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 13px;
    color: #333;
}
.author img{
border-radius: 50%;
aspect-ratio:0;
}
.likes {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #888;
    font-size: 13px;
}

.like-icon {
    font-size: 15px;
}

.tag {
    background: #eee;
    color: #666;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 12px;
    display: inline-block;
    white-space: nowrap;
    margin-top: 10px;
}

.author {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.author-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    min-width: 0;
}
