/* 应用展示插件前台样式 */

.apps-exhibition-container {
    max-width: 1000px;
    margin: 0 auto !important;
    padding: 20px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    left: 0;
    transform: none;
}

.apps-exhibition-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.app-card {
    width: 400px;
    display: grid;
    grid-template-columns: auto 1fr 65px; /* 图标、增大信息区、缩小按钮区域 */
    align-items: center; /* 垂直居中网格项 */
    gap: 10px; /* 列间距 */
    background-color: #f3f4f7;
    border-radius: 14px;
    padding: 15px; 
    margin: 0 10px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    min-height: 110px; /* 保持最小高度 */
    box-sizing: border-box; /* 确保 padding 不会增加总宽度 */
}

.app-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* 增强阴影 */
}

/* 空卡片样式 */
.empty-card {
    background-color: transparent;
    box-shadow: none;
    visibility: hidden;
}

.app-icon {
    /* width/height 已在之前设置 */
    /* 现在是 grid item，之前的 flex 设置不再需要 */
    flex-shrink: 0; /* 防止图标被压缩 */
}

.app-icon img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    object-fit: cover;
    display: block; /* 修复可能的底部空白 */
}

.app-info {
    /* 现在是 grid item */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 尝试在固定高度内垂直居中名称和描述 */
    overflow: hidden; /* 防止内容溢出 */
}

.app-info .app-name {
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 2px 0; /* 调整 margin */
    height: 1.4em; /* 固定高度为一行 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-description {
    font-size: 14px;
    line-height: 1.4; /* 明确行高 */
    height: calc(1.4em * 3); /* 固定高度为三行 */
    margin: 0;
    padding: 0;
    display: flex; /* 改为 flex 布局 */
    align-items: center; /* 垂直居中 */
    overflow: hidden;
}

/* 为 span 元素添加多行省略效果 */
.app-description span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word; /* 保留换行 */
    width: 100%;
}

.app-platform {
    /* 现在是 grid item */
    display: inline-block;
    justify-self: center; /* 在网格单元内水平居中 */
    box-sizing: border-box; /* 确保 padding 在宽度内 */
    width: 60px; /* 固定宽度 */
    padding: 5px 0; /* 上下内边距，左右去掉 */
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    color: #fff; /* 颜色 */
    text-decoration: none;
    text-align: center; /* 文字居中 */
    white-space: nowrap;
}

/* 平台按钮颜色 - 统一为 #98c1d9 */
.ios, .android, .mac, .win, .linux, .多平台 {
    background-color: #98c1d9;
}

/* 按钮悬停样式 - 维持同样颜色 */
.app-platform:hover {
    background-color: #98c1d9;
    color: #fff;
    text-decoration: none;
}

/* 响应式布局 */
@media (max-width: 850px) {
    .apps-exhibition-container {
        padding: 10px 0; /* 减小容器的内边距 */
    }
    
    .apps-exhibition-row {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0; /* 移除行的底部边距 */
    }
    
    .app-card {
        width: calc(100% - 20px); /* 减去左右边距的总和 */
        margin: 10px 10px; /* 统一设置上下左右边距 */
        max-width: 400px; /* 保持最大宽度 */
    }
    
    .empty-card {
        display: none;
    }
    
    .app-icon {
        flex: 0 0 60px;
    }
    
    .app-icon img {
        width: 60px;
        height: 60px;
    }
    
    .app-name {
        font-size: 16px;
    }
    
    .app-description {
        font-size: 13px;
    }
}
