/*
首页样式文件
包含首页特有的样式和布局
注意：头部导航样式已移动到main.css中
*/

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    padding: var(--space-20) 0 var(--space-16);
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-xl);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* 分类网格 */
.featured-categories {
    padding: var(--space-16) 0;
}

.section-title {
    font-size: var(--font-3xl);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-8);
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

.category-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.category-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.category-link:hover {
    color: inherit;
    text-decoration: none;
}

.category-icon {
    font-size: var(--font-4xl);
    margin-bottom: var(--space-4);
    line-height: 1;
}

.category-name {
    font-size: var(--font-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.category-count {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* 小说网格 */
.latest-updates, .popular-novels {
    padding: var(--space-16) 0;
}

.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

.novel-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.novel-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.novel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.novel-card:hover .novel-cover img {
    transform: scale(1.05);
}

.novel-info {
    padding: var(--space-4);
}

.novel-title {
    font-size: var(--font-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.novel-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.novel-title a:hover {
    color: var(--primary-color);
}

.novel-author {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.author-label {
    color: var(--text-muted);
}

.author-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.novel-category {
    margin-bottom: var(--space-3);
}

.category-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: var(--font-xs);
    font-weight: 500;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.category-tag:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
    text-decoration: none;
}

.novel-description {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.latest-chapter {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

.latest-label {
    color: var(--text-muted);
}

.latest-link {
    color: var(--primary-color);
    text-decoration: none;
}

.latest-link:hover {
    text-decoration: underline;
}

/* 热门小说列表 */
.novel-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.novel-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.novel-item:hover {
    box-shadow: var(--shadow-light);
    border-color: var(--primary-color);
}

.novel-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: 700;
    font-size: var(--font-sm);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.novel-cover-small {
    width: 60px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.novel-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.novel-item .novel-info {
    flex: 1;
    padding: 0;
}

.novel-item .novel-title {
    font-size: var(--font-base);
    margin-bottom: var(--space-1);
}

.novel-item .novel-meta {
    margin-bottom: 0;
}

/* 更多链接 */
.section-more {
    text-align: center;
    margin-top: var(--space-8);
}

.more-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.more-link:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    text-decoration: none;
}

/* 底部 */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: var(--space-2);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-sm);
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: var(--font-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .nav-menu {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .nav-list {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .hero-title {
        font-size: var(--font-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-lg);
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-4);
    }

    .novel-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .novel-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }

    .novel-rank {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .hero-section {
        padding: var(--space-8) 0 var(--space-6); /* 进一步减小hero区padding */
    }

    .hero-title {
        font-size: var(--font-2xl); /* 减小标题字体 */
        margin-bottom: var(--space-3);
    }

    .hero-subtitle {
        font-size: var(--font-base); /* 减小副标题字体 */
    }

    .featured-categories,
    .latest-updates,
    .popular-novels {
        padding: var(--space-6) 0; /* 减小各区块的padding */
    }

    .category-card {
        padding: var(--space-4);
    }

    .section-title {
        font-size: var(--font-xl); /* 进一步减小section标题 */
        margin-bottom: var(--space-4);
    }
}