/* Card 样式 CSS - 按日期归档 */

/* 归档容器 */
.douban-card-archive {
    margin: 20px 0;
}

/* 日期分组 */
.douban-card-date-group {
    margin-bottom: 40px;
}

/* 日期标题 */
.douban-card-date-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--db--text-color, #333);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--db-main-color, #0057D9);
    position: relative;
}

.douban-card-date-title::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: var(--db-main-color, #0057D9);
}

/* 日期内的条目容器 */
.douban-card-date-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 单个卡片条目 */
.douban-card-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
}

.douban-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 卡片封面 */
.douban-card-item-cover {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--cover-bg, #f0f0f0);
}

.douban-card-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.douban-card-item:hover .douban-card-item-cover img {
    transform: scale(1.05);
}

/* Top250 徽章 (归档样式) */
.douban-card-badge-archive {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* 卡片信息区 */
.douban-card-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* 卡片标题 */
.douban-card-item-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.douban-card-item-title a {
    color: var(--text-color, #333);
    text-decoration: none;
    transition: color 0.2s ease;
}

.douban-card-item-title a:hover {
    color: var(--link-hover, #e54847);
}

/* 卡片评分 */
.douban-card-item-rating {
    display: flex;
    align-items: center;
}

.douban-card-item-rating .allstardark {
    display: inline-block;
    width: 70px;
    height: 14px;
    background: url(../img/star.svg) repeat-x;
    background-size: auto 14px;
    position: relative;
}

.douban-card-item-rating .allstarlight {
    display: block;
    height: 14px;
    background: url(../img/star-fill.svg) repeat-x;
    background-size: auto 14px;
    position: absolute;
    top: 0;
    left: 0;
}

.douban-card-item-rating .rating_nums {
    font-size: 14px;
    color: var(--rating-color, #888);
    margin-left: 8px;
}

/* 卡片备注 */
.douban-card-item-remark {
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 卡片简介 */
.douban-card-item-subtitle {
    font-size: 12px;
    color: var(--text-muted, #999);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .douban-card-date-items {
        gap: 15px;
    }

    .douban-card-item {
        max-width: 100%;
        padding: 12px;
    }

    .douban-card-item-cover {
        width: 80px;
        height: 112px;
    }

    .douban-card-date-title {
        font-size: 16px;
    }

    .douban-card-item-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .douban-card-item {
        gap: 12px;
    }

    .douban-card-item-cover {
        width: 70px;
        height: 98px;
    }

    .douban-card-item-title {
        font-size: 14px;
    }

    .douban-card-item-rating .allstardark {
        width: 60px;
        height: 12px;
    }

    .douban-card-item-rating .allstarlight {
        height: 12px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #1e1e1e;
        --cover-bg: #2a2a2a;
        --text-color: #e0e0e0;
        --text-secondary: #b0b0b0;
        --text-muted: #808080;
        --link-hover: #ff6b6b;
        --rating-color: #a0a0a0;
    }

    .douban-card-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .douban-card-item:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

/* 当在多类型容器中使用 Card 样式 */
.wpd-data-container .douban-card-archive {
    margin: 0;
}

/* 空状态 */
.douban-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #999);
    font-size: 14px;
}

/* 错误状态 */
.douban-list-error {
    text-align: center;
    padding: 40px 20px;
    color: #e54847;
    font-size: 14px;
}
