/* apps-exhibition.css 完整样式 */

/* --- 全局容器和网格布局 --- */
.apps-exhibition-wrap {
    max-width: 1240px; /* 容器最大宽度 */
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 首页海报幻灯片样式 --- */
.home-posters-container {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 6; /* 你可以调整比例 */
    margin-bottom: 20px;
    position: relative; /* 必须保持为relative，方便绝对定位按钮 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}

/* 允许自定义隐藏箭头样式 */
.swiper-button-prev,
.swiper-button-next {
    display: none !important; /* 隐藏左右箭头 */
}

.home-posters-container .swiper-wrapper {
    height: 100%;
}

.home-posters-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* 调整下载按钮位置到图片中央右侧（重点调整区域） */
.home-posters-container .download-btn {
    position: absolute; 
    top: 50%;              /* 垂直居中 */
    right: 20px;           /* 靠近图片右边，数值可微调 */
    transform: translateY(-50%);
    z-index: 20;
}

/* === 新增禁止海报点击交互样式，兼容移动端和PC端 === */

.home-posters-container.no-pointer-events .swiper-slide img {
    pointer-events: none;
}

.home-posters-container.no-pointer-events .swiper-slide {
    pointer-events: none;
    user-select: none;
}

.home-posters-container.no-pointer-events .slide-download-btn-position {
    pointer-events: auto;
    user-select: auto;
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .apps-exhibition-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* 卡片整体保持横向flex，调整文字区域布局，使标题和描述紧邻图标右侧 */
    .apps-exhibition-item {
        padding: 12px;
        gap: 15px;
        align-items: flex-start;
        flex-direction: row; /* 恢复横向布局 */
        padding-right: 12px;
        min-height: auto;
    }

    .app-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        /* 调整向下移动，确保图标底部和描述文字底部对齐 */
        margin-top: 6px;  /* 这里调整的关键，数值根据实际需要微调 */
        flex-shrink: 0;
    }

    /* 强制 .app-text-content 仅包裹 标题和描述，纵向排列 */
    .app-text-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        line-height: 1.3;
        overflow: hidden;
        transform: none;
        margin-bottom: 0;
    }

    .app-name {
        font-size: 17px;
        margin-bottom: 2px;
    }

    .app-desc {
        font-size: 13px;
        margin-top: 0;
        -webkit-line-clamp: 2;
    }

    /* 保留平台标签、悬浮下载按钮默认样式，放置在右方悬浮，不做改动 */

    /* 移动端去掉悬停阴影和位移 */
    .apps-exhibition-item:hover {
        transform: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    }

    /* === 新增：缩放悬浮下载按钮 === */
    .app-hover-action .download-btn {
        padding: 6px 12px;         /* 缩小内边距 */
        font-size: 14px;           /* 缩小字体 */
        min-width: 60px;           /* 缩小最小宽度 */
        margin-left: 6px;          /* 缩小左边距 */
    }

    .app-hover-action .download-btn:first-child {
        margin-left: 0;
    }
}

/* --- 平板（iPad等）设备，显示两列 --- */
@media (min-width: 769px) and (max-width: 1024px) {
    .apps-exhibition-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 原有样式配置 */

.swiper-button-prev,
.swiper-button-next {
    color: #fff !important;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.6));
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
}

.swiper-pagination {
    bottom: 10px !important;
}

/* --- 筛选过滤器 --- */
.apps-exhibition-filter-group {
    margin-bottom: 20px;
}

.apps-exhibition-filter {
    font-size: 16px;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    overflow: visible; /* 确保移动端不裁剪 */
    gap: 8px; /* 按钮间距 */
}

.apps-exhibition-filter span {
    margin-right: 10px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    font-size: 16px;
    flex-shrink: 0;
}

.apps-exhibition-filter .filter-btn {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 6px;
    padding: 6px 14px;
    background: #f0f2f5;
    color: #444;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

.apps-exhibition-filter .filter-btn.active,
.apps-exhibition-filter .filter-btn:hover {
    background: #007bff;
    color: #fff;
    text-decoration: none;
}

/* --- 其它现有样式按原文件保持不变 --- */
/* ... 保持不变 ... */

.apps-exhibition-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 15px;
}

/* --- 筛选过滤器 --- */
.apps-exhibition-filter-group {
    margin-bottom: 20px;
}

.apps-exhibition-filter {
    font-size: 16px;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    overflow: visible; /* 确保移动端不裁剪 */
    gap: 8px; /* 按钮间距 */
}

.apps-exhibition-filter span {
    margin-right: 10px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    font-size: 16px;
    flex-shrink: 0;
}

/* 调整分类按钮文字大小，和左边“筛选分类”文字一样 */
.apps-exhibition-filter .filter-btn {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 6px;
    padding: 6px 14px;
    background: #f0f2f5;
    color: #444;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* 这里调字体大小和行高 */
    font-size: 16px;   /* 修改为和“筛选分类”字体一致 */
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

.apps-exhibition-filter .filter-btn.active,
.apps-exhibition-filter .filter-btn:hover {
    background: #007bff;
    color: #fff;
    text-decoration: none;
}

/* --- 应用卡片 --- */
.apps-exhibition-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    cursor: pointer;
}

.apps-exhibition-item:hover {
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* 应用图标 */
.app-icon {
    width: 64px;
    height: 64px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 0;
}

/* 文字内容 */
.app-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
    overflow: hidden;
    transform: translateY(-4px);
}

.app-name {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.app-desc {
    margin-top: 4px;
    font-size: 14px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* --- 平台标签毛玻璃效果，背景颜色调整为蓝色 --- */
.app-platform-tags {
    margin-top: 6px;
}

.app-platform-tags .platform-tag {
    display: inline-block;
    background: rgba(0, 123, 255, 0.35); /* 蓝色毛玻璃背景 */
    color: #222;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 14px;
    margin-right: 6px;
    user-select: none;
    line-height: 1.2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 123, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.app-platform-tags .platform-tag:hover {
    background: rgba(0, 123, 255, 0.5);
    border-color: rgba(0, 123, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: #000;
}

/* --- 悬停操作区域与下载按钮 --- */
.app-hover-action {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
}

.apps-exhibition-item:hover .app-hover-action {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 调整下载按钮文字颜色对比度，悬停时文字更清晰 */
.download-btn {
    background-color: #007bff;
    color: #f0f0f0; /* 提升默认文字颜色对比度 */
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
    min-width: 80px;
    text-align: center;
    margin-left: 8px;
}

.download-btn:first-child {
    margin-left: 0;
}

.download-btn:hover,
.download-btn:focus {
    background-color: #004d99;
    color: #ffffff !important; /* 悬停时文字变纯白，增强可见度 */
    box-shadow: 0 5px 12px rgba(0, 77, 153, 0.6);
    outline: none;
}

.download-btn.download-btn-disabled {
    background-color: #ced4da;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- 移动端适配（重复定义，确保兼容） --- */
@media (max-width: 768px) {
    .apps-exhibition-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* 卡片整体保持横向flex，调整文字区域布局，使标题和描述紧邻图标右侧 */
    .apps-exhibition-item {
        padding: 12px;
        gap: 15px;
        align-items: flex-start;
        flex-direction: row; /* 恢复横向布局 */
        padding-right: 12px;
        min-height: auto;
    }

    .app-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        /* 调整向下移动，确保图标底部和描述文字底部对齐 */
        margin-top: 6px;  /* 这里调整的关键，数值根据实际需要微调 */
        flex-shrink: 0;
    }

    /* 强制 .app-text-content 仅包裹 标题和描述，纵向排列 */
    .app-text-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        line-height: 1.3;
        overflow: hidden;
        transform: none;
        margin-bottom: 0;
    }

    .app-name {
        font-size: 17px;
        margin-bottom: 2px;
    }

    .app-desc {
        font-size: 13px;
        margin-top: 0;
        -webkit-line-clamp: 2;
    }

    /* 保留平台标签、悬浮下载按钮默认样式，放置在右方悬浮，不做改动 */

    /* 移动端去掉悬停阴影和位移 */
    .apps-exhibition-item:hover {
        transform: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    }
}
