@charset "UTF-8";

/* 分类页面样式 */

/* 页面主体 - 为固定头部留出空间 */
main.container {
    padding-top: 100px;
    padding-bottom: 60px;
}

/* 分类页标题 */
.category-header {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.category-description {
    color: var(--gray-color);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* 分类页面主体布局 - 左右结构 */
.category-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧分类导航 */
.category-sidebar {
    flex: 0 0 250px;
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

.category-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: var(--dark-color);
}

.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    padding: 14px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-item:hover {
    background-color: #f5f5f5;
}

.category-item.active {
    background-color: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.category-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.category-name {
    font-size: 1rem;
    flex: 1;
}

.category-count {
    background-color: #f0f0f0;
    color: var(--gray-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.category-item.active .category-count {
    background-color: var(--primary-color);
    color: white;
}

/* 右侧内容区域 */
.category-content {
    flex: 1;
    min-width: 0;
}

/* 当前分类信息 */
.current-category-header {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 25px;
}

.current-category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.current-category-info {
    flex: 1;
}

.current-category-info h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.current-category-stats {
    display: flex;
    gap: 20px;
    color: var(--gray-color);
}

/* 筛选区域 */
.filter-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: bold;
    color: var(--dark-color);
    min-width: 60px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 分类下的漫画列表 */
.category-comics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.category-comics-header h4 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.sort-btn:hover {
    background-color: #e0e0e0;
}

.sort-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .category-layout {
        flex-direction: column;
    }
    
    .category-sidebar {
        position: static;
        flex: 0 0 auto;
    }
    
    .category-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .category-item {
        flex: 1;
        min-width: 150px;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .category-header h2 {
        font-size: 1.8rem;
    }
    
    .current-category-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .current-category-stats {
        justify-content: center;
    }
    
    .category-comics-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .filter-label {
        min-width: 50px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .category-item {
        min-width: 140px;
    }
    
    .current-category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .current-category-info h3 {
        font-size: 1.5rem;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .category-list {
        flex-direction: column;
    }
    
    .category-item {
        min-width: 100%;
    }
}
