/* =========================================
   首页专用样式 - index.css
   ========================================= */

/* =========================================
   3. Hero 区域
   ========================================= */
.hero-area {
    background-color: var(--primary);
    color: white;
    padding: 40px 0 70px 0;
    text-align: center;
    position: relative;
    box-shadow: inset 0 -20px 30px -10px rgba(0,0,0,0.1);
}

.hero-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-search-wrapper {
    max-width: 640px;
    margin: 0 auto 20px;
    display: flex;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    background: white;
    padding: 4px;
}

.hero-search-input {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border-radius: var(--radius);
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text-main);
}

.hero-search-btn {
    width: 100px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.hero-search-btn:hover {
    background: var(--primary-hover);
}

.hero-tags {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.hero-tags a {
    color: white;
    margin: 0 8px;
    opacity: 0.9;
}

/* =========================================
   4. 分类栏
   ========================================= */
.cat-bar-wrapper {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
}

.cat-bar {
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 1px;
    padding: 12px 0;
    display: flex;
    justify-content: space-evenly;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    padding: 8px 16px;
    border-radius: 1px;
    transition: all 0.2s;
}

.cat-item:hover {
    color: var(--primary);
    background: var(--blue-light);
}

.cat-icon {
    display: flex;
    align-items: center;
    color: inherit;
}
.cat-icon.c-blue { color: var(--primary); }
.cat-icon.c-green { color: #10b981; }
.cat-icon.c-purple { color: #8b5cf6; }
.cat-icon.c-orange { color: #f59e0b; }
.cat-icon.c-cyan { color: #06b6d4; }
.cat-icon.c-red { color: #ef4444; }
.cat-icon.c-pink { color: #ec4899; }
.cat-icon.c-yellow { color: #eab308; }
.cat-icon.c-0 { color: var(--primary); }
.cat-icon.c-1 { color: #10b981; }
.cat-icon.c-2 { color: #8b5cf6; }
.cat-icon.c-3 { color: #f59e0b; }
.cat-icon.c-4 { color: #06b6d4; }
.cat-icon.c-5 { color: #ef4444; }
.cat-icon.c-6 { color: #ec4899; }
.cat-icon.c-7 { color: #eab308; }

/* =========================================
   5. 通用版块
   ========================================= */
.section { padding: 24px 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: none;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon { color: var(--primary); }

.section-more {
    font-size: 13px;
    color: var(--text-sub);
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
}

.section-more:hover {
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
}

.filter-tab {
    font-size: 13px;
    color: var(--text-sub);
    padding: 4px 12px;
    border-radius: 20px;
    background: #f5f5f5;
    transition: 0.2s;
}

.filter-tab:hover {
    color: var(--primary);
    background: #e8f4ff;
}

.filter-tab.active {
    color: #fff;
    background: var(--primary);
}

/* =========================================
   6. 最新更新列表
   ========================================= */
.list-group { display: flex; flex-direction: column; gap: 16px; }

.list-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.list-icon {
    width: 44px;
    height: 44px;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    margin-right: 16px;
    flex-shrink: 0;
}

/* 软件图标图片 */
.list-icon-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    margin-right: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.list-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-info { flex: 1; min-width: 0; width: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-width: 0; overflow: hidden; }
.list-title-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.cat-tag {
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f5ff;
    color: #3b82f6;
}
.cat-tag.t-blue { background: #eff6ff; color: #2563eb; }
.cat-tag.t-green { background: #f0fdf4; color: #16a34a; }
.cat-tag.t-red { background: #fef2f2; color: #dc2626; }
.cat-tag.t-orange { background: #fff7ed; color: #ea580c; }
.cat-tag.t-purple { background: #faf5ff; color: #9333ea; }
.cat-tag.t-c0 { background: #eff6ff; color: #2563eb; }
.cat-tag.t-c1 { background: #f0fdf4; color: #16a34a; }
.cat-tag.t-c2 { background: #faf5ff; color: #9333ea; }
.cat-tag.t-c3 { background: #fff7ed; color: #ea580c; }
.cat-tag.t-c4 { background: #ecfeff; color: #06b6d4; }
.cat-tag.t-c5 { background: #fef2f2; color: #dc2626; }

/* 右上角斜角标 */
.list-item { position: relative; overflow: hidden; }
.corner-badge {
    position: absolute;
    top: 8px;
    right: -22px;
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 24px;
    transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(255,140,66,0.3);
}
.list-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.list-desc {
    font-size: 13px;
    color: var(--text-sub);
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.badge { font-size: 10px; padding: 2px 6px; border-radius: 1px; font-weight: 600; letter-spacing: 0.5px; }
.badge-new { background: #fee2e2; color: #dc2626; }
.badge-hot { background: #ffedd5; color: #ea580c; }

.list-meta { text-align: right; margin-left: 10px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; height: 44px; }
.time { font-size: 12px; color: var(--text-light); font-weight: 500; }
.time.time-new { color: #e53935; }

/* =========================================
   7. 热门软件卡片
   ========================================= */
.card {
    background: #FFFFFF;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    border-radius: 1px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 1px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 卡片缩略图 */
.card-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.card-icon { font-size: 26px; font-weight: 800; }
.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-main);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.card-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
}
.card-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 20px;
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.card-action { display: flex; justify-content: center; align-items: center; gap: 12px; }
.score { font-size: 14px; color: var(--orange); font-weight: 700; }

.btn-sm {
    font-size: 13px;
    background: var(--bg-body);
    color: var(--text-main);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-sm:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* =========================================
   8. 热门专题
   ========================================= */
.topic-card {
    display: block;
    height: 160px;
    border-radius: 1px;
    color: white;
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.15);
}

.topic-inner {
    padding: 24px;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.topic-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 1px;
    align-self: flex-start;
    margin-bottom: 12px;
}

.topic-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.topic-desc {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: auto;
    font-weight: 400;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topic-btn {
    align-self: flex-start;
    background: white;
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.topic-card:hover .topic-btn {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   9. 下载排行
   ========================================= */
.rank-panel {
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
    border-radius: 1px;
    padding: 20px;
    border: 1px solid transparent;
    transition: 0.3s;
    overflow: hidden;
}

.rank-panel:hover {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

.rank-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-header::before {
    content: '';
    width: 4px;
    height: 16px;
    background: currentColor;
    border-radius: 1px;
}

.rank-list { display: flex; flex-direction: column; gap: 8px; }

.rank-row {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 1px;
    transition: background 0.2s;
    min-width: 0;
}

.rank-row:hover { background: var(--bg-body); }
.rank-row:hover .rank-app { color: var(--primary); }

.rank-num {
    width: 20px;
    height: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    line-height: 20px;
    border-radius: 1px;
    margin-right: 12px;
    font-weight: 700;
}

.rank-num.no-1 { background: #fee2e2; color: #ef4444; }
.rank-num.no-2 { background: #ffedd5; color: #f97316; }
.rank-num.no-3 { background: #fef3c7; color: #f59e0b; }

.rank-app {
    flex: 1;
    color: var(--text-main);
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rank-data { font-size: 12px; color: var(--text-light); font-weight: 400; flex-shrink: 0; margin-left: 8px; }

/* =========================================
   10. 资讯 & 页脚
   ========================================= */
.news-list-box {
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
    border-radius: 1px;
    padding: 10px 0;
}

.news-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--bg-body);
    font-size: 14px;
    transition: all 0.2s;
}

.news-row:last-child { border-bottom: none; }
.news-row:hover { padding-left: 24px; }
.news-row:hover .news-link { color: var(--primary); }

.news-tag { margin-right: 12px; font-weight: 600; font-size: 12px; }
.news-link {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-main);
}
.news-date { color: var(--text-light); font-size: 12px; margin-left: 10px; }

/* =========================================
   11. 友情链接卡片
   ========================================= */
.friend-links-card {
    background: #FFFFFF;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.friend-links-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-body);
}

.friend-links-header svg {
    color: var(--primary);
}

.friend-links-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.friend-links-body a {
    font-size: 13px;
    color: var(--text-sub);
    transition: color 0.2s;
}

.friend-links-body a:hover {
    color: var(--primary);
}

.friend-links-body .link-apply {
    color: var(--primary);
    font-weight: 500;
}

.friend-links-body .link-apply:hover {
    text-decoration: underline;
}
