/* Home CSS - 首页特有样式 */

/* 首页搜索框 */
.home-search-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.home-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.home-search-input:focus {
    outline: none;
    border-color: #165dff;
    box-shadow: 0 0 0 3px rgba(22,93,255,0.12);
}

.home-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #165dff;
    font-size: 16px;
}

.home-search-btn {
    background: #165dff;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.home-search-btn:hover {
    background: #0e48e5;
    box-shadow: 0 2px 8px rgba(22,93,255,0.2);
}

/* 热门搜索标签 */
.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.hot-search-label {
    color: #4e5969;
}

.hot-search-tag {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(22,93,255,0.1);
    color: #165dff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hot-search-tag:hover {
    background: rgba(22,93,255,0.15);
}

/* 最近更新模块 */
.latest-updates {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.latest-update-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 8px;
}

.latest-update-item:hover {
    background: #f7f8fa;
    border-radius: 6px;
    padding: 8px;
    margin: 0 -8px;
}

.latest-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #165dff;
    flex-shrink: 0;
}

.latest-cat {
    background: #165dff;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 最近热门数据模块 */
.hot-data-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hot-data-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.hot-data-item:hover {
    border-color: #165dff;
    background: rgba(22,93,255,0.05);
}

.hot-data-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.hot-data-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #ff7d00;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 资源下载模块 */
.resource-download-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.resource-download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .resource-download-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .resource-download-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 优质资源横幅 */
.featured-banner {
    background: linear-gradient(135deg, #165dff 0%, #ff7d00 100%);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(22,93,255,0.15);
}

.featured-banner h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.featured-banner p {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.6;
}

.featured-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.featured-stat {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.featured-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.featured-stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* 用户评价模块 */
.reviews-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.review-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

/* 随机文章模块 */
.random-articles {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.random-article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.random-article-item:hover {
    border-color: #165dff;
    background: rgba(22,93,255,0.05);
}

.random-article-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 暗黑模式下的首页样式 */
.dark .home-search-box,
.dark .latest-updates,
.dark .hot-data-section,
.dark .resource-download-section,
.dark .reviews-section,
.dark .random-articles {
    background: #111827;
    border-color: #1f2937;
}

.dark .home-search-input {
    background: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}

.dark .home-search-input:focus {
    border-color: #165dff;
    box-shadow: 0 0 0 3px rgba(22,93,255,0.12);
}

.dark .hot-search-tag {
    background: rgba(22,93,255,0.12);
}

.dark .latest-update-item:hover,
.dark .hot-data-item:hover,
.dark .random-article-item:hover {
    background: rgba(22,93,255,0.08);
}

.dark .review-card {
    border-color: #1f2937;
}

.dark .featured-stat {
    background: rgba(255,255,255,0.1);
}

/* 响应式首页 */
@media (max-width: 767px) {
    .latest-cat {
        display: none !important;
    }
    
    .latest-dot {
        display: inline-flex !important;
    }
    
    .featured-banner {
        padding: 12px 16px;
    }
    
    .featured-banner h3 {
        font-size: 1.125rem;
    }
    
    .featured-banner p {
        font-size: 0.8125rem;
    }
}
