/* ============ AI App Store 自定义样式 ============ */

/* 卡片横向布局 */
.card-app > .card-body {
    padding: 0.6rem 0.8rem;
}

.card-app.card {
    border-radius: .45rem !important;
    transition: all .2s ease-in-out;
}

.card-app.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: #5961f9 !important;
}

/* 应用图标圆形 */
.media.size-50 {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.app-rounded {
    border-radius: 22% !important;
    overflow: hidden;
}

.media.size-50 .media-content {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
}

/* 中间内容区 */
.app-content {
    min-width: 0;
}

.app-content .text-md {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.app-content .text-md:hover {
    color: #5961f9;
}

/* 平台图标 */
.app-platform {
    flex-shrink: 0;
    font-size: 14px;
    color: #999;
}

.app-platform i {
    color: #999;
    transition: color .2s;
}

.app-platform i:hover {
    color: #5961f9;
}

/* 分类标签 */
.tga a:not(.no-tag) {
    display: inline-block;
    padding: 1px 6px;
    background: #f3f4f5;
    border-radius: 3px;
    color: #6b7280;
    font-size: 11px;
    text-decoration: none;
    transition: all .2s;
}

.tga a:not(.no-tag):hover {
    background: #5961f9;
    color: #fff !important;
}

/* 下载数、点赞 */
.app-like .down,
.app-like .home-like {
    color: #999;
    font-size: 12px;
}

.app-like .icon-down,
.app-like .icon-heart {
    color: #999;
}

/* 点赞按钮（列表卡片 / 详情页相似应用、上一应用、下一应用）
   红色只在点赞成功后出现，覆盖灰色心形，不做叠加 */
.aiapp-like,
.home-like.js-app-like:hover,
.home-like.js-app-like:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.aiapp-like .icon-heart {
    color: #bbb;
}

.aiapp-like.liked .icon-heart {
    color: #e74c3c;
}

.aiapp-like {
    display: inline-block;
}

/* 自定义宽度（参考站设置） */
.customize-width {
    max-width: 1900px;
}

/* 参考站列定义：col-1a / col-md-2a / col-lg-3a / col-xl-4a */
.col-1a { flex: 0 0 auto; width: 100%; }
@media (min-width: 768px) {
    .col-md-2a { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-3a { flex: 0 0 auto; width: 33.333333%; }
}
@media (min-width: 1200px) {
    .col-xl-4a { flex: 0 0 auto; width: 25%; }
}

/* 分页样式（参考站 posts-nav / page-numbers） */
.posts-nav {
    text-align: center;
    margin: 1.5rem 0;
}
.posts-nav .page-numbers {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    border-radius: 4px;
    background: #f3f4f5;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    transition: all .2s;
}
.posts-nav .page-numbers:hover {
    background: #5961f9;
    color: #fff;
}
.posts-nav .page-numbers.current {
    background: #5961f9;
    color: #fff;
}
.posts-nav .page-numbers.dots {
    background: transparent;
    color: #999;
}

/* 子导航激活样式 */
.cat-nav .nav-pills .nav-link.active {
    background-color: #5961f9;
    color: #fff;
}

.cat-nav .nav-pills .nav-link {
    color: #555;
    transition: all .2s;
}

.cat-nav .nav-pills .nav-link:hover {
    color: #5961f9;
}

/* ============ 详情页 ============ */

/* 应用图标 */
.app-ico img {
    border-radius: 22%;
    background: #f5f5f5;
    object-fit: cover;
}

/* 简介：保留换行 */
.app-description {
    color: #555;
    line-height: 1.9;
    white-space: pre-line;
    word-break: break-word;
}

/* 下载地址条目：紧凑按钮（一行 3 个，按钮撑满列宽、文字居中、不溢出） */
.app-download-panel .row > div {
    display: flex;
    justify-content: flex-start;
}

.app-down-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: .55rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: .45rem;
    color: #333;
    text-decoration: none;
    transition: all .2s;
}

.app-down-item:hover {
    border-color: #5961f9;
    background: #f8f9ff;
    color: #5961f9;
    text-decoration: none;
}

.app-down-item span {
    flex: none;
    font-size: 14px;
    font-weight: 600;
}

/* 详情页顶部下载按钮组 */
.app-download .btn {
    border-radius: 50rem;
}

/* ============ 相似应用卡片（参考 ai-bot.cn 的 card-app.default.list-item） ============ */
.card-app.default.list-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    margin-bottom: 0;
    border-left: 0;
    border-radius: .45rem;
    word-wrap: break-word;
}

/* 图标：默认 .media 正方形（:after padding-top:100%），宽 = 列宽 */
.card-app.default.list-item .media {
    border-radius: 22%;
    overflow: hidden;
    flex-shrink: 0;
}

.card-app.default.list-item .list-content {
    padding: .5rem .25rem 0;
}

.card-app.default.list-item .list-title {
    display: block;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

.card-app.default.list-item .list-title:hover {
    color: #5961f9;
}

.card-app.default.list-item .list-footer {
    margin-top: .25rem;
}

.card-app.default.list-item .list-footer > div {
    line-height: 1.5;
}

/* ============ 安卓下载弹窗 ============ */
.aiapp-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
}

.aiapp-modal {
    width: 560px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: .6rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}

.aiapp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: #5961f9;
    color: #fff;
    border-radius: .6rem .6rem 0 0;
    font-size: 15px;
}

.aiapp-modal-close {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    opacity: .9;
}

.aiapp-modal-close:hover {
    color: #fff;
    opacity: 1;
    text-decoration: none;
}

.aiapp-modal-body {
    padding: 1rem;
}

.aiapp-modal-head {
    color: #888;
    font-size: 13px;
}

.aiapp-modal-line {
    height: 1px;
    background: rgba(136, 136, 136, .4);
    margin: .5rem 0;
}

.aiapp-modal-row {
    align-items: center;
    padding: .55rem 0;
    font-size: 14px;
}

.aiapp-modal-row + .aiapp-modal-row {
    border-top: 1px dashed rgba(136, 136, 136, .2);
}

.aiapp-down-btn {
    display: inline-block;
    padding: .2rem .8rem;
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
}

.aiapp-down-btn:hover {
    background: #d0453c;
    color: #fff;
    text-decoration: none;
}

.aiapp-modal-tip {
    margin-top: .8rem;
    padding: .5rem .75rem;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: .35rem;
    color: #888;
    font-size: 12px;
    line-height: 1.6;
}


