/* ==================== 下载页面样式 ==================== */

/* 页面主体区域 */
.downloads-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

/* 页面标题区域 */
.downloads-header {
    text-align: center;
    margin-bottom: 50px;
}

.header-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 15px 40px var(--glow-color);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.downloads-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.downloads-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-box {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.stat-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 32px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 5px 25px var(--glow-color);
}

.search-box > .fa-search {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: var(--hover-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: var(--accent-primary);
    color: white;
}

.search-clear.show {
    display: flex;
}

/* 无结果提示 */
.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.no-result i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 0.85rem;
}

.tab-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--hover-bg);
}

.tab-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 20px var(--glow-color);
}

/* 应用网格 */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

/* 应用卡片 */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

.app-card:hover::before {
    opacity: 1;
}

/* 应用图标 */
.app-icon-wrap {
    margin-bottom: 16px;
}

.app-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    padding: 10px;
    background: var(--bg-secondary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon-img {
    transform: scale(1.1);
}

/* 应用信息 */
.app-info {
    margin-bottom: 16px;
}

.app-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.app-developer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.app-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 应用操作区 */
.app-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.app-size {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--hover-bg);
    padding: 4px 10px;
    border-radius: 12px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-color);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-color);
}

.download-btn i {
    font-size: 0.8rem;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
}

.secondary-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--hover-bg);
    box-shadow: none;
}

/* 提示信息 */
.download-tips {
    margin-top: 40px;
}

.tip-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    border-left: 4px solid var(--accent-primary);
}

.tip-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.tip-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tip-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

/* 白天模式适配 */
body.light-mode .app-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .app-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

body.light-mode .tip-card {
    background: var(--bg-secondary);
}

body.light-mode .app-icon-img {
    background: #f5f5f5;
}

/* Hermes 图标主题切换 */
.hermes-light {
    display: none;
}
.hermes-dark {
    display: block;
}
body.light-mode .hermes-light {
    display: block;
}
body.light-mode .hermes-dark {
    display: none;
}

/* 响应式 */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .downloads-section {
        padding: 100px 0 60px;
    }
    
    .downloads-title {
        font-size: 2rem;
    }
    
    .header-stats {
        gap: 24px;
    }
    
    .stat-num {
        font-size: 1.5rem;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .app-card {
        padding: 20px;
    }
    
    .tip-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tip-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .downloads-title {
        font-size: 1.75rem;
    }
    
    .downloads-subtitle {
        font-size: 0.95rem;
    }
    
    .header-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .stat-box {
        min-width: 80px;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }
    
    .tab-btn {
        flex-shrink: 0;
    }
}
