/**
 * 麦子插件 - 瀑布流文章卡片美化
 * 短视频风格
 */

/* 瀑布流容器 */
.maizi-waterfall-wrapper {
    column-count: 3;
    column-gap: 20px;
    padding: 20px 0;
}

@media (max-width: 1200px) {
    .maizi-waterfall-wrapper {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .maizi-waterfall-wrapper {
        column-count: 1;
    }
}

/* 文章卡片 */
.maizi-waterfall-wrapper .maizi-card-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

.maizi-waterfall-wrapper .maizi-article-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.maizi-waterfall-wrapper .maizi-article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 缩略图容器 */
.maizi-waterfall-wrapper .maizi-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.maizi-waterfall-wrapper .maizi-thumbnail::before {
    content: '';
    display: block;
    padding-top: 133.33%; /* 3:4 比例 */
}

.maizi-waterfall-wrapper .maizi-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.maizi-waterfall-wrapper .maizi-article-card:hover .maizi-thumbnail img {
    transform: scale(1.1);
}

/* 渐变遮罩 */
.maizi-waterfall-wrapper .maizi-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* 文章信息 */
.maizi-waterfall-wrapper .maizi-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    color: #fff;
}

/* 标题 */
.maizi-waterfall-wrapper .maizi-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 8px 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 摘要 */
.maizi-waterfall-wrapper .maizi-card-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 元信息 */
.maizi-waterfall-wrapper .maizi-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.maizi-waterfall-wrapper .maizi-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.maizi-waterfall-wrapper .maizi-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.maizi-waterfall-wrapper .maizi-card-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.maizi-waterfall-wrapper .maizi-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.maizi-waterfall-wrapper .maizi-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.maizi-waterfall-wrapper .maizi-card-views,
.maizi-waterfall-wrapper .maizi-card-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 分类标签 */
.maizi-waterfall-wrapper .maizi-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 置顶标识 */
.maizi-waterfall-wrapper .maizi-card-sticky {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 视频标识 */
.maizi-waterfall-wrapper .maizi-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.maizi-waterfall-wrapper .maizi-article-card:hover .maizi-video-icon {
    opacity: 1;
}

/* 加载动画 */
.maizi-waterfall-wrapper .maizi-article-card {
    animation: maiziCardFadeIn 0.6s ease-out;
}

@keyframes maiziCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 深色模式 */
body.dark-theme .maizi-waterfall-wrapper .maizi-article-card,
.dark .maizi-waterfall-wrapper .maizi-article-card {
    background: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .maizi-waterfall-wrapper .maizi-article-card:hover,
.dark .maizi-waterfall-wrapper .maizi-article-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body.dark-theme .maizi-waterfall-wrapper .maizi-card-category,
.dark .maizi-waterfall-wrapper .maizi-card-category {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
}

/* 无图片占位 */
.maizi-waterfall-wrapper .maizi-thumbnail.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.maizi-waterfall-wrapper .maizi-thumbnail.no-image::before {
    content: '📝';
    font-size: 48px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    z-index: 0;
}
