/* 首页专用样式 */

/* 重置首页布局，确保所有内容可见且在一屏内 */
* {
    box-sizing: border-box;
}

body {
    overflow-y: auto !important;
    margin: 0;
    padding: 0;
}

.hero-section {
    min-height: 50vh !important;
    height: auto !important;
    padding: 6rem 1rem 2rem !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.brand-logo {
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    width: 100% !important;
    animation: none !important;
}

.brand-logo h1 {
    font-size: 2.5rem !important;
    margin: 0 !important;
    display: block !important;
}

.brand-logo img,
.site-logo-img {
    max-width: 180px !important;
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.search-wrapper {
    width: 100% !important;
    max-width: 600px !important;
    margin-bottom: 1.5rem !important;
}

.footer {
    position: relative !important;
    margin-top: auto !important;
    padding: 2rem 1rem !important;
    width: 100% !important;
}

.footer-links {
    font-size: 0.75rem !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px !important;
    }
    
    .home-rankings {
        display: none !important;
    }
    
    .hero-section {
        min-height: calc(70vh - 80px) !important;
        padding: 6rem 1rem 2rem !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .brand-logo {
        margin-bottom: 2.5rem !important;
    }
    
    .brand-logo h1 {
        font-size: 2rem !important;
    }
    
    .site-logo-img {
        max-width: 150px !important;
        max-height: 60px !important;
    }
    
    .footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin-top: 0 !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05) !important;
        z-index: 100 !important;
    }
    
    .footer-links {
        font-size: 0.688rem !important;
    }
}

/* 首页排名框样式 */
.home-rankings {
    max-width: 900px;
    margin: 0 auto 0.5rem;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ranking-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 0.875rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.ranking-box-title {
    font-size: 0.813rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid #f1f5f9;
}

.ranking-item-home {
    display: flex;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s;
}

.ranking-item-home:hover {
    padding-left: 0.2rem;
}

.ranking-item-home:last-child {
    border-bottom: none;
}

.rank-num {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.625rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #92400e; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #475569; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #e9a86a); color: #78350f; }
.rank-other { background: #f1f5f9; color: #64748b; }

.ranking-content {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-title a {
    color: #1e293b;
    text-decoration: none;
}

.ranking-title a:hover {
    color: #667eea;
}

.keyword-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e293b;
}

.ranking-count {
    color: #667eea;
    font-weight: 600;
    font-size: 0.688rem;
    flex-shrink: 0;
}
