/* 网格布局容器 */
.grid-container {
    padding: 15px 0;
}

/* 网格布局 */
.grid-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 卡片样式 */
.grid-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 图片容器 */
.item-cover {
    width: 100%;
    padding-top: 140%;
    position: relative;
    overflow: hidden;
}

.item-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 内容区域 */
.item-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
    height: 20px;
    overflow: hidden;
}

.item-title a {
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.item-title a:hover {
    color: #1e88e5;
}

/* 元信息 */
.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .grid-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .item-content {
        padding: 10px;
    }
    
    .item-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .grid-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 深色主题支持 */
body.dark-theme .grid-item {
    background: #242424;
    border-color: #333;
}

body.dark-theme .item-title a {
    color: #e0e0e0;
}

body.dark-theme .item-title a:hover {
    color: #1e88e5;
}

body.dark-theme .item-meta {
    color: #888;
} 