/* Home Page Styles */

/* Book List */
.book-list {
    background: #0C0C0C;
    padding: 0 20px 20px;
}

/* Best Sellers Section */
.best-sellers {
    background: #0C0C0C;
    margin-bottom: 20px;
}

/* 4-column grid layout */
.books-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 20px 15px;
    width: 100%;
}

/* Ensure 4 columns on all screen sizes */
@media (max-width: 1200px), (max-width: 900px), (max-width: 768px), (max-width: 500px), (max-width: 320px) {
    .books-container {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
    }
    
    .book-cover {
        border-radius: 4px;
    }
    
    .book-title {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .view-all {
        font-size: 11px;
    }
}

/* Top Picks For U Section */
.top-picks {
    background: #0C0C0C;
    margin-bottom: 20px;
}

.top-picks-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px 15px;
}

.top-pick-item {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.top-pick-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

/* 确保整个区域可点击 */
.top-pick-link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

/* 移除图片链接的默认样式 */
.top-pick-cover-wrapper {
    text-decoration: none;
    color: inherit;
}

.top-pick-cover {
    width: 100px;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.top-pick-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 0;
}

.top-pick-title {
    font-size: 16px;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 5px;
    line-height: 1.3;
}

.top-pick-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-pick-author {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.top-pick-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.top-pick-category,
.top-pick-chapters,
.top-pick-words,
.top-pick-score {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-pick-score {
    color: #FFD700;
    font-weight: bold;
}

/* Responsive Top Picks */
@media (max-width: 500px) {
    .top-pick-item {
        gap: 10px;
        padding: 8px;
    }
    
    .top-pick-cover {
        width: 80px;
    }
    
    .top-pick-title {
        font-size: 14px;
    }
    
    .top-pick-description {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    
    .top-pick-author {
        font-size: 11px;
    }
    
    .top-pick-score {
        font-size: 13px;
    }
}

/* Carousel Section */
.carousel-section {
    background: #0C0C0C;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-slider {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.indicator.active {
    background: #FFD700;
    transform: scale(1.2);
}

/* Recommended Books Section */
.recommended-books {
    background: #0C0C0C;
    margin-bottom: 20px;
}

.recommended-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 20px 15px;
    width: 100%;
}

/* Ensure 3 columns on all screen sizes */
@media (max-width: 1200px), (max-width: 900px), (max-width: 768px), (max-width: 500px), (max-width: 320px) {
    .recommended-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .carousel-slider {
        height: 150px;
    }
    
    .carousel-image {
        border-radius: 8px;
    }
}

/* Remove Category Tabs */
.category-tabs {
    display: none;
}

/* Hot New Releases Section */
.hot-releases {
    background: #0C0C0C;
    margin-bottom: 20px;
}

.hot-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 20px 15px;
    width: 100%;
}

/* Ensure 3 columns on all screen sizes */
@media (max-width: 1200px), (max-width: 900px), (max-width: 768px), (max-width: 500px), (max-width: 320px) {
    .hot-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
}