/* APP下载列表样式 */

/* 导航栏样式 */
.navbar .fas.fa-mobile-alt {
    font-size: 1.5rem;
}

/* 初始化加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 评分更新动画 */
.rating-updated {
    animation: ratingPulse 1s ease-in-out;
}

@keyframes ratingPulse {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.2);
        color: #ffc107;
        font-weight: bold;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

/* 幻灯片样式 */
.hero-slider {
    max-height: 400px;
    overflow: hidden;
}

.hero-slider img {
    height: 400px;
    object-fit: cover;
}

.hero-slider .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
}

/* 主容器样式 */
.main-container {
    padding: 2rem 0;
}

/* 筛选区域样式 */
.filter-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-section h5 {
    margin-bottom: 1rem;
    color: #333;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-select {
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* APP卡片样式 */
.app-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    padding: 5px;
}

.app-badges .badge {
    font-size: 0.75rem;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover .app-badges .badge {
    opacity: 1;
}

.app-badges .badge::before,
.app-badges .badge::after {
    content: none !important;
}

/* APP卡片内容布局 */
.app-content {
    display: flex;
    padding: 1.5rem;
    position: relative;
}

/* APP图标样式 */
.app-icon-container {
    flex-shrink: 0;
    margin-right: 1rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    background: #f8f9fa;
}

/* APP信息样式 */
.app-info {
    flex: 1;
    min-width: 0;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-title a, .app-description a {
    color: #333 !important;
    text-decoration: none !important;
}

.app-title a:hover, .app-description a:hover {
    text-decoration: none !important;
}

.app-icon-container a {
    display: block;
}

.app-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #666;
}

.app-meta i {
    margin-right: 0.25rem;
}

.app-description {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.app-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #999;
    margin-bottom: 1rem;
}

/* 徽章悬停显示效果 */
.app-badges .badge {
    position: relative;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-badges:hover .badge {
    opacity: 1;
}

/* 按钮样式 */
.download-btn {
    background: #16a085;
    border-color: #16a085;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #148f77;
    border-color: #148f77;
}

.download-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(22, 160, 133, 0.25);
}

/* 热门下载区域样式 */
.hot-downloads {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    position: sticky;
    top: 2rem;
}

.hot-downloads h5 {
    margin-bottom: 1rem;
    color: #333;
}

.hot-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 热门APP项样式 */
.hot-app-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.hot-app-item:hover {
    background: #f1f1f1;
}

/* 排名样式 */
.hot-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: 600;
    color: #999;
    background: #f8f9fa;
    border-radius: 50%;
}

.hot-rank .rank-number.top-rank {
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 热门APP图标样式 */
.hot-app-icon {
    margin-right: 1rem;
}

.hot-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 热门APP信息样式 */
.hot-app-info h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #333;
}

.hot-app-info h6 a {
    color: inherit;
    text-decoration: none;
}

.hot-app-info h6 a:hover {
    color: #16a085;
}

.hot-app-info p {
    margin: 0;
    font-size: 0.8125rem;
    color: #999;
}

.hot-app-info p i {
    margin-right: 0.25rem;
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: #16a085;
}

.pagination .page-item.active .page-link {
    background: #16a085;
    border-color: #16a085;
}

.pagination .page-link:hover {
    color: #148f77;
}

/* 收藏按钮样式 - 已收藏状态 */
.btn-outline-secondary.btn-sm.active {
    background-color: white !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

/* 确保收藏按钮在悬停和聚焦时也保持白色背景 */
.btn-outline-secondary.btn-sm.active:hover,
.btn-outline-secondary.btn-sm.active:focus {
    background-color: white !important;
    border-color: #c82333 !important;
    color: #c82333 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .app-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-icon-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .app-icon {
        width: 100px;
        height: 100px;
    }
    
    .app-meta {
        justify-content: center;
    }
    
    .app-details {
        justify-content: center;
    }
}